sf-cli-reference

Construct Salesforce CLI commands with flags and decision trees.

13|2|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/jiten-singh-shahi/salesforce-claude-code --skill sf-cli-reference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-cli-reference
Source: https://github.com/jiten-singh-shahi/salesforce-claude-code/tree/main/.cursor/skills/sf-cli-reference
Command: npx skills add https://github.com/jiten-singh-shahi/salesforce-claude-code --skill sf-cli-reference

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the guesswork when selecting and constructing Salesforce CLI commands and flags, preventing incorrect invocations and costly CI/CD failures by providing clear command choices for common tasks.

Core Features & Use Cases

  • Command decision trees for authentication, deploy and retrieve, Apex execution and testing, data operations, scratch orgs, packages, and agentforce workflows.
  • Flag and pattern guidance showing the typical flags to use for CI, interactive use, validation vs quick deploy, bulk data operations, and log streaming.
  • Use Case: Build a CI-friendly sequence that logs in via JWT, runs project deploy validate with RunLocalTests, captures the validation job ID, and then performs a quick deploy using that job ID.

Quick Start

Ask for the recommended sf org login jwt command for CI authentication and the corresponding sf project deploy validate invocation to run tests and return a job id.

Frequently Asked Questions about sf-cli-reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I construct a Salesforce CLI command for CI/CD project deployment and validation?

To construct a Salesforce CLI command for CI/CD project deployment, use the project deploy validate command with RunLocalTests to capture a validation job ID, then execute a quick deploy using that specific job ID to finalize changes.

What is the difference between validate and quick deploy in the sf CLI?

The sf CLI validate command runs Apex tests and checks metadata without deploying to the org, returning a job ID. Quick deploy uses that job ID to rapidly finalize the deployment, bypassing the need to rerun tests during the actual deployment phase.

How do I authenticate a Salesforce scratch org using the sf CLI for local development?

Authenticate a Salesforce scratch org using the sf org login jwt command for CI environments, or interactive web login for local development. Command decision trees provide specific flag patterns based on your authentication workflow requirements.

Can I run SOQL data queries and bulk data operations using Salesforce CLI commands?

Yes, Salesforce CLI commands support SOQL data queries and bulk data operations. The CLI provides specific flag and pattern guidance for executing data operations, including bulk imports and exports for efficient scratch org data management.

Does the sf CLI support executing Apex tests and streaming debug logs?

Yes, the sf CLI supports executing Apex tests and streaming debug logs. Command patterns include typical flags for running test executions and log streaming, providing guidance for interactive use and automated CI workflows.