Skip to Content
CLIInstallation

Installation

Install from npm

npm install -g @sfdt/cli

Verify the install:

sfdt version

Install with Homebrew

On macOS/Linux, tap the formula repo once, then install sfdt by name:

brew tap scoobydrew83/sfdt brew install sfdt

sfdt ships from a third-party tap, so it won’t appear in Homebrew’s website search (formulae.brew.sh only indexes the official homebrew-core). Tapping scoobydrew83/sfdt is what makes the sfdt formula resolvable — after that, brew upgrade sfdt picks up new releases like any other formula.

One-line install script

The bootstrap script checks prerequisites (Node, sf, bash, jq) and then installs via npm:

curl -fsSL https://raw.githubusercontent.com/scoobydrew83/sfdt/main/install.sh | bash

Run with Docker

For CI/CD or a zero-install run, use the official multi-arch image — no local Node or sf needed:

docker run --rm -v "$PWD:/project" ghcr.io/scoobydrew83/sfdt:latest --help

See Docker for image tags, volume mounts, and auth passthrough.

Install as a Salesforce CLI plugin

If your team standardizes on sf plugins, install sfdt as a plugin and run every command as sf sfdt <command>:

sf plugins install @sfdt/plugin sf sfdt --help

See Salesforce CLI Plugin for details.

Requirements

RequirementNotes
Node.js >= 22.15.0Uses the built-in node:sqlite module, unflagged in Node 22.15+
Salesforce CLI (sf)Installed and authenticated to your target orgs
bash 4.0+macOS ships bash 3.2 — install a newer one with brew install bash
jq 1.6+Required by several shell scripts

Optional integrations:

ToolEnables
Claude Code CLI AI features with the claude provider (default)
Gemini CLI AI features with the gemini provider
Codex CLI AI features with the openai provider
GitHub CLI  (gh)PR creation during deployments

AI is entirely optional. See AI Providers for setup, or skip it — every AI command degrades gracefully when AI is disabled.

Initialize a project

Run sfdt init once from your Salesforce DX project root. It walks you through an interactive setup and creates the .sfdt/ configuration directory.

Change into your project

cd your-salesforce-project

Run the initializer

sfdt init

It asks for a project name, default org alias, coverage threshold, and whether to enable AI (and which provider). It also scans your packageDirectories for Apex test classes (*Test.cls) to populate test-config.json automatically.

Ignore local overrides

Add environment-specific overrides to your .gitignore:

echo '.sfdt/*.local.json' >> .gitignore

See Configuration for the full schema of what sfdt init creates.

Updating

sfdt update # update to the latest version from npm sfdt update --force # force the update

If a self-update fails, sfdt prints an actionable error with a manual retry command (typically npm install -g @sfdt/cli@latest).

Install from source

For development or to track main:

git clone https://github.com/scoobydrew83/sfdt.git cd sfdt npm install npm link # makes `sfdt` available globally from your checkout npm run build:gui # build the web dashboard (see the Web Dashboard page) npm test npm run lint

After npm link, the sfdt command points to your local checkout.

Shell completion

Print a completion script for your shell and source it from your profile:

sfdt completion bash >> ~/.bashrc
Last updated on