Config & Utilities
sfdt config
Read and write individual .sfdt/config.json values from the command line using dot notation.
sfdt config get defaultOrg
sfdt config get deployment.coverageThreshold
sfdt config set deployment.coverageThreshold 80
sfdt config set features.ai true| Subcommand | Description |
|---|---|
get <key> | Print a value (dot notation, e.g. deployment.coverageThreshold) |
set <key> <value> | Set a value (dot notation) |
Values are coerced automatically: "true"/"false" become booleans, numeric strings become
numbers, everything else stays a string. See Configuration for the full
schema.
sfdt completion
Prints a shell completion script for bash, zsh, or fish.
sfdt completion bash >> ~/.bashrc
sfdt completion zsh >> ~/.zshrc
sfdt completion fish > ~/.config/fish/completions/sfdt.fishsfdt version
Prints the current sfdt version.
sfdt versionsfdt update
Updates sfdt to the latest version from npm.
sfdt update
sfdt update --force| Option | Description |
|---|---|
--force | Force the update |
If a self-update fails, sfdt prints an actionable error with a manual retry command.
sfdt ledger
The append-only record of every org change sfdt makes, and how to reverse one.
sfdt ledger list # what has sfdt changed?
sfdt ledger show <id> # including the state it replaced
sfdt ledger verify # has the file been tampered with?
sfdt ledger undo <id> # put it back| Subcommand | Description |
|---|---|
list | Recorded changes, newest first |
show <id> | One change in full, including the state that preceded it |
verify | Check the hash chain |
undo <id> | Reverse a change, restoring the state it replaced |
A record, not a gate. Writes apply immediately; the recorded before-state is what makes them reversible afterwards — which is when you usually find out a change was wrong. A stage-and-approve queue only ever looks forward.
Hash-chained. Each entry’s hash covers its content plus the previous entry’s, so editing or
deleting any line breaks the chain. verify names the first break by both its recorded sequence
number and its current line — when those diverge, the gap is itself the evidence.
Nothing is ever mutated. Undo appends a compensating entry rather than flipping a flag on the
original, so verify still passes afterwards. A second undo of the same change is refused.
| Status | Meaning |
|---|---|
applied | The write succeeded |
failed | Attempted and rejected |
undone | Reversed by a later entry |
pending | Recorded, but its outcome never was — the command may have been interrupted mid-write. Check the org before undoing it. |
undo is itself an org write and carries the same brakes as the change it reverses — a production
guard and a confirmation. Undoing a permissions grant revokes access. The target org comes from
the recorded entry, so undo takes no --org.
Common options: --limit <n> (list), --yes, --production, --json.