Step-by-step from zero to your first Claude Code session in Salesforce. Each step checks first — only install if something is missing.
Check first:
sf --version→ Shows a version (e.g. @salesforce/cli/2.x.x)? Skip to Step 2.
→ command not found? Install below.
Install (no admin rights needed):
- Go to https://developer.salesforce.com/tools/salesforcecli
- Download "Windows (x64) - tar.xz" — the archive, not the installer
- Extract it anywhere you have write access, e.g.
C:\Users\YourName\Tools\sf - Add the
binfolder to your PATH:- Start → Search → "Edit the system environment variables"
- Click Environment Variables
- Under User variables (not System) → select Path → Edit → New
- Add:
C:\Users\YourName\Tools\sf\bin - Click OK — restart your terminal
- Verify: open a new terminal and run
sf --version
Check first:
git --version→ Shows a version? Skip to Step 3.
→ command not found? Install below.
Install:
- Download from git-scm.com — no admin needed if you choose "Install for current user only"
- During install: keep all defaults, just click Next
- Verify: open a new terminal and run
git --version
Check first:
node --version→ Shows a version (e.g. v20.x.x)? Skip to Step 4.
→ command not found? Install below.
Install:
- Download the LTS version from nodejs.org
- No admin needed if you choose "Install for current user only"
- Verify: open a new terminal and run
node --version
Check first:
claude --version→ Shows a version? Skip to Step 5.
→ command not found? Install below.
Install:
npm install -g @anthropic-ai/claude-codeIf that fails due to permissions:
npm install -g @anthropic-ai/claude-code --prefix C:\Users\YourName\AppData\Roaming\npmVerify: claude --version
Check first — is the project already cloned?
ls CLAUDE.md→ File exists? Skip to Step 6 — you already have the project.
→ No such file? Clone it:
In VS Code:
Ctrl+Shift+P→ type "Git: Clone" → paste the repo URL → choose your project folder → click "Open"
Or in terminal:
git clone https://github.com/NicoIO-beep/sf_cc_setup.git .Check first:
sf org list→ Your org aliases already listed? Skip to Step 7. → Empty or missing? Authenticate:
# Dev Sandbox
sf org login web --alias DEV_SANDBOX --instance-url https://test.salesforce.com
# UAT Sandbox (Team Lead only)
sf org login web --alias UAT_SANDBOX --instance-url https://test.salesforce.comReplace
DEV_SANDBOXandUAT_SANDBOXwith the aliases fromCLAUDE.md. For Production: use--instance-url https://login.salesforce.com
A browser window opens — log in with your Salesforce credentials.
Check first:
ls force-app→ Folder exists? Skip to Step 8. → Missing? Create it:
sf project generate --name MySalesforceProject --output-dir .This creates force-app/main/default/ — the folder where all your metadata lives.
Check first:
ls force-app/main/default/classes→ Apex classes already there? Skip this step. → Empty or missing? Pull from your org:
# Pull Apex classes
sf project retrieve start --metadata "ApexClass" -o DEV_SANDBOX
# Pull LWC components
sf project retrieve start --metadata "LightningComponentBundle" -o DEV_SANDBOX
# Pull everything at once (takes a while)
sf project retrieve start --metadata "ApexClass,ApexTrigger,LightningComponentBundle,Flow,CustomObject" -o DEV_SANDBOXCheck first — are the placeholders already replaced?
grep -r "DEV_SANDBOX" CLAUDE.md→ No output? Aliases are already replaced. Skip to Step 10. → Shows matches? Replace them:
PowerShell:
Get-ChildItem -Recurse -Include "*.md" | ForEach-Object {
(Get-Content $_.FullName) -replace 'DEV_SANDBOX','YOUR_DEV_ALIAS' -replace 'UAT_SANDBOX','YOUR_UAT_ALIAS' | Set-Content $_.FullName
}Git Bash / bash:
grep -rl "DEV_SANDBOX" . --include="*.md" | xargs sed -i 's/DEV_SANDBOX/YOUR_DEV_ALIAS/g'
grep -rl "UAT_SANDBOX" . --include="*.md" | xargs sed -i 's/UAT_SANDBOX/YOUR_UAT_ALIAS/g'Windows note:
sed -iin Git Bash on Windows can behave differently depending on the Git installation — it may create backup files or fail silently. If the replacement doesn't work, use the PowerShell variant above — it is the safer choice on Windows.
claudeThen use a skill:
/build Write me an Apex trigger for Account
/data SOQL query for all open Opportunities this quarter
/deploy Deploy AccountTrigger from dev to UAT
You're ready.
This lets Claude read and create Jira tickets directly inside your session.
Check first:
uvx --version→ Shows a version? Skip to 11b.
→ command not found? Install:
irm https://astral.sh/uv/install.ps1 | iexThen close and reopen your terminal. Verify:
uvx --versionNo admin rights needed — installs to
C:\Users\YourName\.local\bin\.
- Open Jira in your browser (you must be in the office or on VPN)
- Click your avatar (top right) → Profile
- Left sidebar → Personal Access Tokens → Create token
- Give it a name (e.g.
claude-code), no expiry, click Create - Copy the token now — it will not be shown again
# Copy the example (from repo root)
cp .claude/mcp.json.example .claude/mcp.jsonThen open .claude/mcp.json and:
- Replace
YourNamewith your Windows username - Replace
YOUR_JIRA_PAT_HEREwith the token from 11b
⚠️ .claude/mcp.jsonis in.gitignore— your token stays local and is never committed.
Check first — is this already set?
grep -r "enableAllProjectMcpServers" ~/.claude/settings.json→ Shows true? Skip — already enabled.
→ Not found? Add it:
Open ~/.claude/settings.json (create if missing) and add:
{
"enableAllProjectMcpServers": true
}Start Claude Code:
claudeIn the bottom status bar of VS Code, you should see atlassian-mcp-server: connected.
Test it by asking:
list my open Jira tickets from the current sprint
Tip: If you see
atlassian-mcp-server: failed, check that:
- Your PAT is correct and not expired
- You are in the office or on VPN (Jira is only reachable internally)
- The path to
uvx.exematches your username in.claude/mcp.json
sf: command not found after install
→ Close and reopen your terminal. Check that the bin path was added to User variables, not System variables.
sf org login web opens browser but fails to redirect
→ Try a different browser. Make sure pop-ups are not blocked.
sf org list shows orgs as expired
→ Re-authenticate: sf org login web --alias DEV_SANDBOX --instance-url https://test.salesforce.com
sf project generate fails with "directory not empty"
→ The folder already has files. Either use --force or skip — your existing project is fine.
npm install -g fails with permission error
→ Use the --prefix workaround shown in Step 4.
force-app/main/default/classes is empty after retrieve
→ Check org alias with sf org list. Try retrieving a single class first to verify the connection works.