sfd documentation
@syntax-syllogism/sfd runs common Salesforce CLI operations through a long-lived local daemon, so each call skips the 5–20 seconds sf spends loading oclif and its plugins. A warm call answers in about 0.2 seconds. It is meant for agents and scripts that make many small org calls in a row.
npm install --global @syntax-syllogism/sfdsfd query "SELECT Id, Name FROM Account LIMIT 5" -o my-orgInstalled CLI users can browse these guides with sfd help -a or print one with sfd help <guide>. A guide whose name matches a command is listed with a -guide suffix (for example discover-guide), and the query guide is query-output, so neither shadows the command manual.
Commands
- Query output: the row limit, the CSV layout, the output mode for each flag combination, the sf-compatible
--sf-jsonenvelope, and the truncation trailer. - Source tracking, retrieve and deploy:
sfd retrieve,sfd tracking, howsfd deploykeeps source tracking in step, the shared queue, and what a client disconnect stops. - Debug logs:
sfd logs,sfd logs getandsfd test --logs, the TraceFlag setup they trigger, and the filtered output format. - Metadata listing:
sfd list-metadata-typesandsfd list-metadata, folder-based types, output formats and the--jsonshape. - Org list: which local orgs are listed, what
--statuschecks, the--jsonallowlist and the no-token rule. - Save impact:
sfd impact, the save-time automation for an object or field in execution order, the Agentforce actions that call it, and the component dependency graph. - Record inspection:
sfd record <id>, which resolves an Id to its sObject and shows labeled fields, lookup names, the last modifier and recent field history. - Safety policy: how built-in commands and plugin operations are gated by declared effects and target org type.
Daemon
- Daemon: the local socket protocol, request limits and read deadline, signal shutdown, client-disconnect aborts, runtime directory checks, and how the daemon survives bad requests and unexpected errors.
- Logging: the daemon log’s JSON-lines format, per-request access records, redaction, rotation, the flush before exit, plugin worker stderr, and the boot log.
- Request limits: the bounded fan-out in
org list --statusandlist-metadata, backoff for reads that hit a Salesforce request limit, and the API usage shown bysfd status. - Auth and cache invalidation: how cached orgs, connections, traces, metadata types, safety types, impact results and plugin worker connections are dropped.
Agents
- Agent hooks:
sfd hooklets coding agents runsfcommands through the warm daemon. - Agent snippet:
sfd agents-snippetprints a short Markdown block that tells coding agents to prefersfdoversf. - Discover:
sfd discoverreads local transcripts, classifies each shell call and estimates the savings.
Help
- Help topics:
sfd helpshows command manuals and concept guides. - CLI help and version: how
--helpand--versionare generated from the command registry.
Plugins
- Plugins: run experimental v0 plugin operations in isolated warm worker processes.
- Plugin API v0: the manifest, operations and test helpers for plugin authors.