Skip to Content
CLICommand ReferenceOverview

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 & Deployment

CommandDescription
sfdt initInitialize sfdt configuration for a Salesforce DX project
sfdt deployDeploy to a Salesforce org (interactive manifest flow, or --smart delta deploy)
sfdt releaseGenerate a release manifest and optionally AI-powered release notes
sfdt preflightRun pre-deployment validation checks
sfdt rollbackRoll back a deployment to a target org
sfdt smokeRun post-deployment smoke tests against a target org
sfdt ciGenerate CI/CD pipeline templates (monitoring, smart deploy, release, scratch-org CI)
sfdt prPull-request helpers (post deploy/monitor/audit results as comments)

Metadata & Source Control

CommandDescription
sfdt pullPull metadata changes from the default org
sfdt driftDetect metadata drift between local source and a target org
sfdt manifestSmart package.xml generator from git diffs (with optional AI dependency cleanup)
sfdt compareCompare metadata between two orgs or an org and local source
sfdt scanFetch complete metadata inventory from an org
sfdt dependenciesShow metadata dependencies for a component (references + referenced-by)
sfdt flowFlow-specific analyses (CLI uses @sfdt/flow-core, matching the Chrome extension)
sfdt retrofitRetrofit metadata from a source org: retrieve → commit → smart-deploy to a target org
sfdt soqlSOQL/SOSL toolkit — schema search/describe, relationships, query validation, plans, bounded execution

Testing & Quality

CommandDescription
sfdt testRun Apex tests with the enhanced test runner (or --logic for unified Apex + Flow tests)
sfdt agent-testRun an Agentforce agent test as a CI gate (via `sf agent test run`), with pass/fail exit code, optional notification, and PR decoration
sfdt apexApex observability — trace flags, debug log retrieve/watch, Anonymous Apex execution (complements `sfdt test`)
sfdt qualityRun code quality analysis and optionally generate an AI fix plan
sfdt changelogManage project CHANGELOG
sfdt coverageReport Apex code coverage (org-wide + per-class)

AI & Intelligence

CommandDescription
sfdt reviewAI-powered Salesforce code review of current branch changes
sfdt explainAI-powered analysis of a Salesforce deployment error log
sfdt pr-descriptionGenerate a PR description or Slack message from deployment changes
sfdt aiAI utilities

Org Health & Operations

CommandDescription
sfdt notifySend a notification (events: deploy-success, deploy-failure, test-failure, release-created, harness-escalation, snapshot)
sfdt auditDiagnose 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 monitorMonitor 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 docsGenerate project documentation (objects, Apex, flows) with optional AI overview and diagrams
sfdt dataImport/export org data sets (native sf tree commands) for sandbox & scratch seeding
sfdt scratchCreate, delete, list, and pool Salesforce scratch orgs
sfdt historyShow recent sfdt run history (audit, monitor, quality, test, deploy, agent-test, …) from the local run index
sfdt versionsAudit Salesforce API versions across local source and the org (Apex, Flow, LWC, Aura vs the org max)

Config & Utilities

CommandDescription
sfdt completionOutput shell completion script (bash, zsh, or fish)
sfdt updateUpdate sfdt to the latest version from npm
sfdt configRead and write .sfdt config values
sfdt versionPrint the sfdt version

Platform & Bridge

CommandDescription
sfdt uiLaunch the local SFDT web dashboard (test results, drift, preflight)
sfdt extensionManage the Chrome extension bridge (native messaging host)
sfdt feature-flagsManage the extension kill-switch (.sfdt/feature-flags.json). Disabled features are skipped at extension boot.
sfdt doctorDiagnose the local sfdt environment and extension stack
sfdt mcpManage the Model Context Protocol (MCP) server
sfdt pluginManage sfdt CLI plugins
sfdt skillsManage sfdt agent skills
Last updated on