| name | salesforce-cli |
| description | Salesforce CLI (sf command) reference and best practices. Use this skill when working with Salesforce development, deployment, org management, data operations, or CI/CD workflows. Covers modern sf v2 commands from version 2.140.6 (June 28, 2026). |
Salesforce CLI (sf) Skill Group
The Salesforce CLI (sf command) is the modern command-line interface for Salesforce development. This skill set is divided into specialized sub-skills for easier navigation and reduced context overhead.
[!NOTE]
Current Version: 2.140.6 (June 28, 2026)
Official Documentation: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_unified.htm
Sub-Skills Reference
| Skill | Description |
|---|
| Auth | Authentication (Web, JWT, Access Token, etc.) |
| Org | Org Management, Scratch Orgs, Sandboxes, Permsets |
| Project | Deployment, Retrieval, Source Tracking, Manifests |
| Data | SOQL, CRUD, Bulk Data, SOSL, Tree Export/Import |
| Apex | Apex Classes, Triggers, Execution, Testing, Logging |
| Agent | Agentforce Agent Creation, Activation, Testing |
| Lightning | LWC, Aura, Lightning Dev Preview (JIT) |
| Package | UNLOCKED and MANAGED packaging, Versioning |
| System | CLI Config, Aliases, Plugins, Command Search |
| API | Raw REST, GraphQL, Custom Endpoints |
| Troubleshoot | Diagnostics (sf doctor), Common Issues, CI/CD |
| Reference | Metadata types, Global Flags |
Installation & Updates
npm install -g @salesforce/cli
sf update
sf --version
Global Command Structure
All sf commands follow the topic-action pattern:
sf <topic> <action> [flags]
sf org list
Use --target-org <alias> on org-scoped commands such as sf data query,
sf org display, sf project deploy start, and sf api request graphql.
Do not add it blindly to global commands such as sf org list; unsupported
flags fail the command even when --json is present.
For detailed guidance on a specific topic, please refer to the corresponding sub-skill linked above.