Command Reference
sfdt ships 46 commands. They are grouped
here by area — every table below is generated from the CLI’s own command registry (the
catalog , regenerated on every
command change), so this index cannot drift from the code. Every command accepts --help, and
most operational commands accept --json for scripting and --dry-run to preview.
Core & DeploymentMetadata & Source ControlTesting & QualityAI & IntelligenceOrg Health & OperationsConfig & UtilitiesPlatform & Bridge
Core & Deployment
| Command | Description |
|---|---|
sfdt init | Initialize sfdt configuration for a Salesforce DX project |
sfdt deploy | Deploy to a Salesforce org (interactive manifest flow, or --smart delta deploy) |
sfdt release | Generate a release manifest and optionally AI-powered release notes |
sfdt preflight | Run pre-deployment validation checks |
sfdt rollback | Roll back a deployment to a target org |
sfdt smoke | Run post-deployment smoke tests against a target org |
sfdt ci | Generate CI/CD pipeline templates (monitoring, smart deploy, release, scratch-org CI) |
sfdt pr | Pull-request helpers (post deploy/monitor/audit results as comments) |
Metadata & Source Control
| Command | Description |
|---|---|
sfdt pull | Pull metadata changes from the default org |
sfdt drift | Detect metadata drift between local source and a target org |
sfdt manifest | Smart package.xml generator from git diffs (with optional AI dependency cleanup) |
sfdt compare | Compare metadata between two orgs or an org and local source |
sfdt scan | Fetch complete metadata inventory from an org |
sfdt dependencies | Show metadata dependencies for a component (references + referenced-by) |
sfdt flow | Flow-specific analyses (CLI uses @sfdt/flow-core, matching the Chrome extension) |
sfdt retrofit | Retrofit metadata from a source org: retrieve → commit → smart-deploy to a target org |
sfdt soql | SOQL/SOSL toolkit — schema search/describe, relationships, query validation, plans, bounded execution |
Testing & Quality
| Command | Description |
|---|---|
sfdt test | Run Apex tests with the enhanced test runner (or --logic for unified Apex + Flow tests) |
sfdt agent-test | Run an Agentforce agent test as a CI gate (via `sf agent test run`), with pass/fail exit code, optional notification, and PR decoration |
sfdt apex | Apex observability — trace flags, debug log retrieve/watch, Anonymous Apex execution (complements `sfdt test`) |
sfdt quality | Run code quality analysis and optionally generate an AI fix plan |
sfdt changelog | Manage project CHANGELOG |
sfdt coverage | Report Apex code coverage (org-wide + per-class) |
AI & Intelligence
| Command | Description |
|---|---|
sfdt review | AI-powered Salesforce code review of current branch changes |
sfdt explain | AI-powered analysis of a Salesforce deployment error log |
sfdt pr-description | Generate a PR description or Slack message from deployment changes |
sfdt ai | AI utilities |
Org Health & Operations
| Command | Description |
|---|---|
sfdt notify | Send a notification (events: deploy-success, deploy-failure, test-failure, release-created, harness-escalation, snapshot) |
sfdt audit | Diagnose org health — audit trail, licenses, MFA coverage & enforcement readiness, SOAP login() retirement, unused/unreferenced Apex, inactive users/flows/validations/workflows, API versions, permission sets, connected apps, field descriptions, object & field access |
sfdt monitor | Monitor org health — limits (incl. elastic async Apex), Apex failures, security score, org info & release version, deployment history, legacy API usage, paused flows, and metadata backup |
sfdt docs | Generate project documentation (objects, Apex, flows) with optional AI overview and diagrams |
sfdt data | Import/export org data sets (native sf tree commands) for sandbox & scratch seeding |
sfdt scratch | Create, delete, list, and pool Salesforce scratch orgs |
sfdt history | Show recent sfdt run history (audit, monitor, quality, test, deploy, agent-test, …) from the local run index |
sfdt versions | Audit Salesforce API versions across local source and the org (Apex, Flow, LWC, Aura vs the org max) |
Config & Utilities
| Command | Description |
|---|---|
sfdt completion | Output shell completion script (bash, zsh, or fish) |
sfdt update | Update sfdt to the latest version from npm |
sfdt config | Read and write .sfdt config values |
sfdt version | Print the sfdt version |
Platform & Bridge
| Command | Description |
|---|---|
sfdt ui | Launch the local SFDT web dashboard (test results, drift, preflight) |
sfdt extension | Manage the Chrome extension bridge (native messaging host) |
sfdt feature-flags | Manage the extension kill-switch (.sfdt/feature-flags.json). Disabled features are skipped at extension boot. |
sfdt doctor | Diagnose the local sfdt environment and extension stack |
sfdt mcp | Manage the Model Context Protocol (MCP) server |
sfdt plugin | Manage sfdt CLI plugins |
sfdt skills | Manage sfdt agent skills |
Last updated on