Install AI Tools

B2C Commerce tools, documentation, and skills for your assistant.

Claude

Install the plugin Recommended

bash
claude plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
claude plugin install b2c-dx-mcp@b2c-developer-tooling

Start a new Claude Code session. To install for the current project only, run it from your project directory with --scope project.

Manual MCP setup
bash
claude mcp add --transport stdio --scope user b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest

Start a new session. To configure the current project only, run it from your project directory with --scope project. See Claude Code MCP setup.

Claude Desktop setup

Codex

Install the plugin Recommended

bash
codex plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
codex plugin add b2c-dx-mcp@b2c-developer-tooling

Start a new Codex session in your project. This setup also works with the Codex IDE extension and the ChatGPT Work desktop app.

Manual MCP setup
bash
codex mcp add b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest

Or add this to ~/.codex/config.toml (or $CODEX_HOME/config.toml if customized):

toml
[mcp_servers.b2c-dx-mcp]
command = "npx"
args = ["-y", "@salesforce/b2c-dx-mcp@latest"]

Start a new session. See Codex MCP configuration.

ChatGPT online setup

VS Code

Install the plugin Recommended

  1. Open the Command Palette (Cmd/Ctrl+Shift+P) and run Chat: Install Plugin from Source.
  2. Enter SalesforceCommerceCloud/b2c-developer-tooling.
  3. Select b2c-dx-mcp and follow the installation prompts.
  4. Start a new chat in GitHub Copilot.
Manual MCP setup

Add this to .vscode/mcp.json in your workspace:

json
{
  "servers": {
    "b2c-dx-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@salesforce/b2c-dx-mcp@latest"]
    }
  }
}

See VS Code MCP setup.

Copilot CLI setup

Cursor

Reload the MCP server in Cursor after installation.

Manual MCP setup

Add this to .cursor/mcp.json in your project:

json
{
  "mcpServers": {
    "b2c-dx-mcp": {
      "command": "npx",
      "args": ["-y", "@salesforce/b2c-dx-mcp@latest"]
    }
  }
}

For all projects, use ~/.cursor/mcp.json instead.

See Cursor's MCP documentation.

OpenCode

Add this to opencode.json in your project:

json
{
  "mcp": {
    "b2c-dx-mcp": {
      "type": "local",
      "command": ["npx", "-y", "@salesforce/b2c-dx-mcp@latest"],
      "enabled": true
    }
  }
}

Restart OpenCode. For all projects, use ~/.config/opencode/opencode.json. See OpenCode MCP setup.

Gemini

Run:

bash
gemini mcp add --scope user b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest

Start a new Gemini CLI session. To configure the current project only, run it from your project directory with --scope project. See Gemini CLI MCP setup.

No separate skills plugins needed.

Other clients and manual setup →
Skip to content
View as Markdown
View as Markdown

Setup Commands ​

Commands for viewing configuration, setting up the development environment, and generating IDE integration scripts.

b2c setup inspect ​

Display the resolved configuration from all sources, showing which values are set and where they came from. Useful for debugging configuration issues.

The Safety section summarizes the settings in use, including your instance, global safety file, and environment variables. Add --verbose to see all rules in the order they are checked. --json always includes the complete settings.

The source column shows where each setting came from. SafetyFile refers to the global file listed in Sources; SafetyEnv refers to environment variables. "Level confirmation" controls approval for requests the selected level would normally block. Individual confirm rules still ask for approval when this setting is disabled. See Safety Mode.

Alias: b2c setup config

Usage ​

bash
b2c setup inspect [FLAGS]

Flags ​

FlagDescriptionDefault
--unmaskShow sensitive values unmasked (passwords, secrets, API keys)false
--verboseShow the full ordered safety rulesetfalse
--account-manager-hostAccount Manager hostname for OAuthaccount.demandware.com
--cloud-originMRT cloud origin URLhttps://cloud.mobify.com
--jsonOutput results as JSONfalse

Examples ​

bash
# Display resolved configuration (sensitive values masked)
b2c setup inspect

# Include the full safety ruleset
b2c setup inspect --verbose

# Display configuration with sensitive values unmasked
b2c setup inspect --unmask

# Output as JSON for scripting
b2c setup inspect --json

# Debug configuration with a specific instance
b2c setup inspect -i staging

Output ​

The command displays configuration organized by category:

  • Instance: hostname, webdavHostname, codeVersion
  • Authentication (Basic): username, password
  • Authentication (OAuth): clientId, clientSecret, and configured OAuth options
  • Authentication (JWT Bearer): JWT certificate, key, and passphrase settings (when configured)
  • Authentication (SLAS): SLAS client settings (when configured)
  • SCAPI: shortCode and tenantId
  • On-Demand Sandbox (ODS): sandbox API host and realm (when configured)
  • Commerce Intelligence (CIP): CIP host override (when configured)
  • Managed Runtime (MRT): mrtProject, mrtEnvironment, mrtApiKey, mrtOrigin
  • Project: configured deployment, content, and documentation defaults
  • Metadata: siteId, instanceName, and projectDirectory (when configured)
  • Safety: safety configuration (when configured)
  • Sources: List of configuration sources that contributed values

Each value shows its source in brackets (e.g., [dw.json], [SFCC_CLIENT_ID], [~/.mobify]).

Example output:

Configuration
────────────────────────────────────────────────────────────

Instance
  hostname              my-sandbox.dx.commercecloud.salesforce.com  [DwJsonSource]
  webdavHostname        -
  codeVersion           version1                                     [DwJsonSource]

Authentication (Basic)
  username              admin                                        [DwJsonSource]
  password              admi...REDACTED                              [DwJsonSource]

Authentication (OAuth)
  clientId              my-client-id                                 [password-store]
  clientSecret          my-c...REDACTED                              [password-store]
  accountManagerHost    -

SCAPI
  shortCode             abc123                                       [DwJsonSource]

Managed Runtime (MRT)
  mrtProject            my-project                                   [MobifySource]
  mrtApiKey             mrtk...REDACTED                              [MobifySource]

Sources
────────────────────────────────────────────────────────────
  1. DwJsonSource         /path/to/project/dw.json
  2. MobifySource         /Users/user/.mobify
  3. password-store       pass:b2c-cli/_default

Sensitive Values ​

By default, sensitive fields are masked to prevent accidental exposure:

  • password - Basic auth access key
  • clientSecret - OAuth client secret
  • jwtPassphrase - JWT private key passphrase
  • slasClientSecret - SLAS private client secret
  • mrtApiKey - MRT API key

Use --unmask to reveal the actual values when needed for debugging.

The Sources section lists the project and shared default dw.json files. An * marks the file used for the selected instance. Values from the shared default file show [default] in the source column. JSON output also identifies that file with "scope": "global".

See Also ​

Global Default Configuration ​

Use a global dw.json when you want the CLI, MCP server, and B2C DX VS Code extension to share instances across projects. An explicit --config, SFCC_CONFIG, project .env selection, or project-local dw.json remains the primary file.

Instances from the primary and global files are shown as one catalog. --instance / -i searches the primary file first, so a same-name primary instance shadows the global one. Instance fields are not combined across files.

b2c setup instance create writes to the primary file when it exists and otherwise uses the global dw.json. List, remove, and set-active operate across both files, checking the primary file first.

b2c setup default-config set ​

Set the shared global dw.json. The file must exist and use the dw.json format.

Paths are normally stored as absolute paths. When the configuration file is inside the shared B2C settings directory, the command stores a relative path such as ./dw.json, making it easy to keep the files together.

bash
b2c setup default-config set /Users/you/code/dw.json
b2c setup default-config set ./shared.dw.json --json

b2c setup default-config get ​

Show the configured path and report if the file is missing.

bash
b2c setup default-config get
b2c setup default-config get --json

b2c setup default-config unset ​

Remove the global dw.json setting without changing or deleting the file itself.

bash
b2c setup default-config unset

b2c setup ide ​

Show help for IDE integration setup commands.

Usage ​

bash
b2c setup ide

Examples ​

bash
# Show setup ide subcommands
b2c setup ide --help

# Vendor Script API TypeScript definitions for IDE IntelliSense
b2c setup ide vscode-types

# Print TS Server plugin path for LSP-based editors (Neovim, Helix, Zed, etc.)
b2c setup ide tsserver-plugin --json

b2c setup ide vscode-types ​

Vendor B2C Commerce Script API TypeScript definitions and write a jsconfig.json into the workspace so any IDE that drives tsserver (plain VS Code, WebStorm, IntelliJ Ultimate, Neovim, Helix, Zed, Sublime Text) gets dw/* IntelliSense, hover docs, and signature help in cartridge JavaScript files.

The Salesforce B2C Commerce VS Code extension does not need this command — it injects the same TypeScript Server plugin at runtime without writing files into your repo. Use this command only when you're not running the extension.

Usage ​

bash
b2c setup ide vscode-types [FLAGS]

Flags ​

FlagDescriptionDefault
--output, -oPath for the generated jsconfig.json (relative to project root)jsconfig.json
--force, -fOverwrite output files if they already existfalse
--[no-]copyCopy bundled types into ./.b2c-script-types/true
--jsonOutput results as JSONfalse

The generated paths mappings are written relative to the repo root, so --output is only intended for renaming the file itself (e.g., --output jsconfig.cartridges.json), not for relocating it into a subdirectory.

Examples ​

bash
# Default: write ./jsconfig.json and ./.b2c-script-types/types/ at the repo root
b2c setup ide vscode-types

# Re-vendor after upgrading the CLI
b2c setup ide vscode-types --force

# Regenerate jsconfig only (skip the type bundle copy; types must already be vendored)
b2c setup ide vscode-types --no-copy --force

Output ​

The command produces:

  • ./.b2c-script-types/types/ — vendored copy of the Script API definitions, version-pinned to the CLI release. Safe to commit.
  • ./jsconfig.json (or the path passed to --output) — TypeScript Language Service configuration mapping dw/* to the vendored types. Cartridge-relative requires (~/cartridge/..., */cartridge/...) can't be expressed in standalone TypeScript paths mappings and will appear unresolved without the Salesforce B2C Commerce VS Code extension.

See the IDE Integration guide for editor-specific setup notes (Neovim, Helix, Zed, etc.).

b2c setup ide tsserver-plugin ​

Print absolute paths to the bundled @salesforce/b2c-script-types TypeScript Server plugin and types directory. Use this when configuring an LSP-based editor (Neovim, Helix, Zed, Sublime, etc.) to load the plugin via init_options.plugins[] — full feature parity with the Salesforce B2C Commerce VS Code extension, including cartridge-relative require resolution.

The command performs no filesystem writes; it just resolves and prints paths.

Usage ​

bash
b2c setup ide tsserver-plugin [FLAGS]

Flags ​

FlagDescriptionDefault
--jsonOutput results as JSONfalse

Examples ​

bash
# Human-readable
b2c setup ide tsserver-plugin

# JSON for tooling (e.g. nvim-sfcc)
b2c setup ide tsserver-plugin --json

Output ​

json
{
  "pluginName": "@salesforce/b2c-script-types",
  "pluginPath": "/usr/local/lib/node_modules/@salesforce/b2c-cli/dist/script-types",
  "typesPath": "/usr/local/lib/node_modules/@salesforce/b2c-cli/dist/script-types/types",
  "version": "26.9.0"
}

Pass pluginName as name and pluginPath as location in your editor's tsserver init_options.plugins[] entry. The plugin auto-discovers cartridges in the project root and honors dw.json's cartridges field for ordering — no host-side wiring needed.

b2c setup instance list ​

List all configured B2C Commerce instances from dw.json.

Usage ​

bash
b2c setup instance list [FLAGS]

Flags ​

FlagDescriptionDefault
--columns, -cColumns to display (comma-separated): name, hostname, source, activeAll
--extended, -xShow all columns including extended fieldsfalse
--jsonOutput results as JSONfalse

Examples ​

bash
# List all configured instances
b2c setup instance list

# Output as JSON
b2c setup instance list --json

Output ​

The command displays a table of configured instances:

Instances
────────────────────────────────────────────────────────────
Name           Hostname                          Source        Active
production     prod.demandware.net               DwJsonSource
staging        staging.demandware.net            DwJsonSource  ✓
development    dev.demandware.net                DwJsonSource

b2c setup instance create ​

Create a new B2C Commerce instance configuration in dw.json.

Usage ​

bash
b2c setup instance create [NAME] [FLAGS]

Arguments ​

ArgumentDescriptionRequired
NAMEInstance nameYes (or prompted)

Flags ​

FlagDescriptionDefault
--hostname, -sB2C instance hostnamePrompted
--usernameWebDAV username
--passwordWebDAV passwordPrompted if username set
--client-idOAuth client ID
--client-secretOAuth client secretPrompted if client-id set
--short-codeSCAPI short code (optional; enables SCAPI-first code-version detection)
--tenant-idSCAPI tenant/organization ID (optional; enables SCAPI-first detection)
--api-backendSaved API preference: auto, scapi, or ocapiauto
--code-versionCode versionAuto-detected or prompted
--activeSet as active instancefalse
--forceNon-interactive modefalse
--jsonOutput results as JSONfalse

Examples ​

bash
# Interactive mode (prompts for all values)
b2c setup instance create staging

# Create with hostname
b2c setup instance create staging --hostname staging.example.com

# Create and set as active
b2c setup instance create staging --hostname staging.example.com --active

# Non-interactive mode (CI/CD)
b2c setup instance create staging --hostname staging.example.com --username admin --password secret --force

Interactive Mode ​

When run without --force, the command provides an interactive experience:

  1. Prompts for instance name (if not provided)
  2. Prompts for hostname (if not provided)
  3. Prompts for authentication type (Basic, OAuth, Both, or Skip)
  4. Prompts for credentials based on selection
  5. Tries SCAPI-first/OCAPI-compatible active code-version detection when OAuth is configured, then prompts for manual entry if detection is unavailable
  6. Asks whether to set as active instance
  7. Shows summary and confirms before creating

b2c setup instance remove ​

Remove a B2C Commerce instance configuration from dw.json.

Usage ​

bash
b2c setup instance remove NAME [FLAGS]

Arguments ​

ArgumentDescriptionRequired
NAMEInstance name to removeYes

Flags ​

FlagDescriptionDefault
--forceSkip confirmation promptfalse
--jsonOutput results as JSONfalse

Examples ​

bash
# Remove with confirmation
b2c setup instance remove staging

# Remove without confirmation
b2c setup instance remove staging --force

b2c setup instance set-active ​

Set a B2C Commerce instance as the default (active) instance.

Usage ​

bash
b2c setup instance set-active NAME [FLAGS]

Arguments ​

ArgumentDescriptionRequired
NAMEInstance name to set as activeYes

Flags ​

FlagDescriptionDefault
--jsonOutput results as JSONfalse

Examples ​

bash
# Set staging as the active instance
b2c setup instance set-active staging

# Set production as active
b2c setup instance set-active production

How Active Instance Works ​

The active instance is used as the default when no --instance or -i flag is provided to other commands. This allows you to work with multiple instances without specifying which one to use each time.

Example workflow:

bash
# Configure multiple instances
b2c setup instance create staging --hostname staging.example.com
b2c setup instance create production --hostname prod.example.com

# Set staging as active
b2c setup instance set-active staging

# Commands now use staging by default
b2c code list              # Uses staging
b2c code list -i production # Uses production

b2c setup openshell ​

Beta

The OpenShell integration is in beta, and OpenShell itself is alpha software.

Create an NVIDIA OpenShell sandbox for the B2C CLI from your current configuration. Your secrets are stored on the OpenShell gateway, and the sandbox can reach only the B2C Commerce hosts your configuration uses, at your Safety Mode level. Run the command again to apply changes. See Agent Sandboxing.

Usage ​

bash
b2c setup openshell [FLAGS]

Flags ​

FlagDescriptionDefault
--nameSandbox nameb2c-<instance>
--directory, -dDirectory for the generated files.openshell/<sandbox>
--safety-levelWhat the sandbox may do on B2C hosts: READ_ONLY, NO_DELETE, or NONEYour Safety Mode level, or NONE
--allow-hostAdditional host the sandbox may reach (repeatable)
--mcpAlso install the B2C DX MCP server in the sandbox imagefalse
--imageUse this container image instead of building one
--[no-]sandboxCreate the sandbox. Use --no-sandbox to only store the credentialstrue
--recreateDelete and recreate an existing sandboxfalse
--forceReplace an edited policy.yaml with a newly generated onefalse
--dry-runWrite the files and print the commands without running themfalse
--jsonOutput results as JSON (never includes secrets)false

Instance and authentication flags such as --instance select the configuration to use.

Examples ​

bash
# Create a sandbox for the active instance at your Safety Mode level
b2c setup openshell

# Read-only sandbox
b2c setup openshell --safety-level READ_ONLY

# Allow writes but not deletes
b2c setup openshell --safety-level NO_DELETE

# Create a sandbox for another instance
b2c setup openshell --instance staging --name b2c-staging

# Include the MCP server in the image
b2c setup openshell --mcp

# Review the generated files and commands without changing anything
b2c setup openshell --dry-run

See Also ​

b2c setup skills ​

Install agent skills from the B2C Developer Tooling project to AI-powered IDEs.

This command downloads skills from GitHub releases and installs them to the configuration directories of supported IDEs. Skills teach AI assistants about B2C Commerce development, CLI commands, and best practices.

Usage ​

bash
b2c setup skills [SKILLSET]

Arguments ​

ArgumentDescriptionDefault
SKILLSETSkill set to install: b2c, b2c-cli, storefront-next, or cap-devPrompted interactively

Flags ​

FlagDescriptionDefault
--list, -lList available skills without installingfalse
--skillInstall specific skill(s) (can be repeated)
--ideTarget IDE(s): claude-code, cursor, windsurf, vscode, codex, opencode, agentforce-vibes, manualAuto-detect
--directory, -dCustom installation directory (overrides IDE default path)
--global, -gInstall to user home directory (global scope)false
--update, -uUpdate existing skills (overwrite)false
--versionSpecific release versionlatest
--forceSkip confirmation prompts (non-interactive)false
--columns, -cColumns to display (comma-separated): name, description, skillSet, hasReferences
--extended, -xShow all columns including extended fieldsfalse
--jsonOutput results as JSONfalse

Supported IDEs ​

IDE ValueIDE NameProject PathGlobal Path
claude-codeClaude Code.claude/skills/~/.claude/skills/
cursorCursor.cursor/skills/~/.cursor/skills/
windsurfWindsurf.windsurf/skills/~/.codeium/windsurf/skills/
vscodeVS Code / GitHub Copilot.github/skills/~/.copilot/skills/
codexOpenAI Codex CLI.codex/skills/~/.codex/skills/
opencodeOpenCode.opencode/skills/~/.config/opencode/skills/
agentforce-vibesAgentforce Vibes.a4drules/skills/~/Library/Application Support/Code/User/globalStorage (macOS)
manualManual.agents/skills/~/.agents/skills/

Use agentforce-vibes for Salesforce Agentforce for VS Code. Use manual for generic installation with a custom --directory path.

Examples ​

bash
# Interactive mode (prompts for skillset and IDEs)
b2c setup skills

# List available skills in a skillset
b2c setup skills b2c --list
b2c setup skills b2c-cli --list
b2c setup skills storefront-next --list

# Install b2c skills to Cursor (project scope)
b2c setup skills b2c --ide cursor

# Install b2c-cli skills to Cursor (global/user scope)
b2c setup skills b2c-cli --ide cursor --global

# Install to multiple IDEs
b2c setup skills b2c --ide cursor --ide windsurf

# Install specific skills only
b2c setup skills b2c-cli --skill b2c-code --skill b2c-webdav --ide cursor

# Install to Agentforce Vibes (.a4drules/skills/)
b2c setup skills b2c --ide agentforce-vibes

# Install to a custom directory
b2c setup skills b2c --ide manual --directory ./my-skills

# Update existing skills
b2c setup skills b2c --ide cursor --update

# Non-interactive mode (for CI/CD) - skillset required
b2c setup skills b2c-cli --ide cursor --global --force

# Install a specific version
b2c setup skills b2c --version v0.1.0 --ide cursor

# Output as JSON
b2c setup skills b2c --list --json

Interactive Mode ​

When run without --force, the command provides an interactive experience:

  1. Prompts you to select skill set(s) (if not provided as argument) - you can select multiple sets
  2. Downloads skills from the latest release (or specified version)
  3. Auto-detects installed IDEs
  4. Prompts you to select target IDEs
  5. Shows installation preview
  6. Confirms before installing
  7. Reports results

In non-interactive mode (--force), the skillset argument is required.

Claude Code Recommendation ​

For Claude Code users, we recommend using the plugin marketplace for automatic updates:

bash
claude plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
claude plugin install b2c-cli
claude plugin install b2c
claude plugin install storefront-next
# Add storefront-next-figma for Figma design-kit workflows (requires the Figma MCP server)
claude plugin install storefront-next-figma

The marketplace provides:

  • Automatic updates when new versions are released
  • Centralized plugin management
  • Version tracking

Use --ide manual if you prefer manual installation, or --ide agentforce-vibes to install to the .a4drules/skills/ directory used by Salesforce Agentforce for VS Code.

Skill Sets ​

Skill SetDescription
b2cB2C Commerce development patterns and practices
b2c-cliB2C CLI commands and operations
b2c-opsOperator and administrator runbooks for job health, checkout failures, and incident triage
storefront-nextStorefront Next development — routing, components, deployment
storefront-next-figmaStorefront Next Figma design-kit workflows (requires Figma MCP server)
cap-devCommerce App Package scaffolding, validation, and submission

Output ​

When installing, the command reports:

  • Successfully installed skills with paths
  • Skipped skills (already exist, use --update to overwrite)
  • Errors encountered during installation

Example output:

Downloading skills from release latest...
Detecting installed IDEs...
Installing 12 skills to Cursor (project)

Successfully installed 12 skill(s):
  - b2c-code → .cursor/skills/b2c-code/
  - b2c-webdav → .cursor/skills/b2c-webdav/
  ...

Environment ​

Skills are downloaded from the GitHub releases of the b2c-developer-tooling repository:

ArtifactContents
b2c-cli-skills.zipSkills for B2C CLI commands and operations
b2c-skills.zipSkills for B2C Commerce development patterns

Downloaded artifacts are cached locally at: ~/.cache/b2c-cli/skills/{version}/{skillset}/

See Also ​