arrow_backBack to Chapter

Module: Install Salesforce CLI

Interactive Module
infoYou're viewing as a guest — progress won't be saved. Sign in to track your progress.

Install Salesforce CLI

After completing this module, learners will understand the role of the Salesforce CLI and be able to install it via the command line.

The CLI as the Agent's Interface

In a traditional developer workflow, the Salesforce CLI (sf) is a tool for humans to push and pull metadata. In an agentic engineering workflow using Claude Code, the CLI serves a much more critical role: it acts as the "eyes and hands" of the AI. When you ask Claude Code to "create a new Custom Object for a demo," the agent does not log into a web browser; instead, it generates the necessary XML and executes sf project deploy start in your local workspace.

The Infrastructure for AI Agency

For a Solution Engineer, the Salesforce CLI is the programmatic bridge that enables Claude Code to perform Automated Metadata Operations. By installing the CLI on your host machine, you provide the infrastructure required for the agent to:

  • Query Schema: Understand the existing objects and fields in your demo org.
  • Execute Deployments: Build and ship complex demo components autonomously.
  • Manage Environments: Authenticate, switch, and create scratch orgs or sandboxes.

Without the CLI, Claude Code is limited to being a text-based advisor. With it, Claude becomes an autonomous assistant capable of configuring and building entire Salesforce environments directly from the terminal.

Test Your Understanding

Complete this check to unlock the Discovery Checklist and Implementation Guide.

bolt

Knowledge Check

In a Claude Code workflow, what is the primary purpose of the Salesforce CLI?

How does Claude Code execute a metadata deployment to a Salesforce Org?

Which command-line executable must be in your system path for Claude Code to perform Salesforce operations?

Discovery Milestones

lockCOMPLETE QUIZ TO UNLOCK
lock

Install the Salesforce CLI using Homebrew

Finish previous step to unlock

lock

Verify installation and system path

Finish previous step to unlock

lock

Explore built-in documentation and plugins

Finish previous step to unlock

lightbulb
Expert Guidance

Work through each milestone in sequence. Opening the Implementation Blueprint for each step will give you the production-ready patterns you need to apply the concept immediately.