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 --scope project

Start a new Claude Code session in your project. Use --scope user instead for all projects.

Manual MCP setup

From your project directory:

bash
claude mcp add --transport stdio --scope project b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest

Start a new session. Use --scope user instead for all projects. 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

From your project directory, run:

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

Start a new Gemini CLI session. Use --scope user instead for all projects. See Gemini CLI MCP setup.

No separate skills plugins needed.

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

Scaffold Commands

The b2c scaffold commands help you generate B2C Commerce components from templates (scaffolds). Built-in scaffolds include cartridges, controllers, hooks, custom APIs, job steps, and Page Designer components.

Commands Overview

CommandDescription
b2c scaffold listList available scaffolds
b2c scaffold generate <id>Generate files from a scaffold
b2c scaffold info <id>Show scaffold details and parameters
b2c scaffold search <query>Search scaffolds by name/tags
b2c scaffold init <name>Create a custom scaffold
b2c scaffold validate <path>Validate a scaffold manifest

b2c scaffold list

List available project scaffolds with optional filtering.

B2C CLI listing scaffolds for cartridges, controllers, Custom APIs, hooks, job steps, Page Designer components, and services.

Usage

bash
b2c scaffold list [--category <category>] [--source <source>]

Flags

FlagDescription
--category, -cFilter by category (built-in scaffolds use cartridge; custom scaffolds may use other categories)
--source, -sFilter by source: built-in, user, project, plugin
--columnsColumns to display (comma-separated)
--extended, -xShow all columns including description and path

Output

Default columns: id, displayName, category, source

Extended columns (with -x): adds description and path

Examples

bash
# list all available scaffolds
b2c scaffold list

# list only cartridge scaffolds
b2c scaffold list --category cartridge

# list project-local scaffolds
b2c scaffold list --source project

# show extended information
b2c scaffold list -x

b2c scaffold generate

Generate files from a scaffold template. You can also use the shorthand b2c scaffold <id>.

Usage

bash
b2c scaffold generate <scaffoldId> [--name <name>] [--option key=value] [--output <dir>]
b2c scaffold <scaffoldId>  # shorthand

Arguments

ArgumentDescription
scaffoldIdID of the scaffold to generate (required)

Flags

FlagDescription
--name, -nPrimary name parameter (shorthand for --option name=VALUE)
--output, -oOutput directory (defaults to scaffold default or current directory)
--optionParameter value in key=value format (repeatable)
--dry-runPreview files without writing them
--force, -fSkip prompts, use defaults, and overwrite existing files

Examples

bash
# generate a cartridge interactively
b2c scaffold generate cartridge

# generate with name specified
b2c scaffold cartridge --name app_custom

# generate with multiple options
b2c scaffold generate controller --option controllerName=Account --option cartridgeName=app_custom

# preview what would be generated
b2c scaffold generate cartridge --name app_custom --dry-run

# skip all prompts and use defaults
b2c scaffold generate cartridge --name app_custom --force

# generate to a specific directory
b2c scaffold generate cartridge --name app_custom --output ./src/cartridges

b2c scaffold info

Show detailed information about a scaffold including its parameters and usage.

Usage

bash
b2c scaffold info <scaffoldId>

Arguments

ArgumentDescription
scaffoldIdID of the scaffold to get info for (required)

Output

Displays:

  • Scaffold ID, category, source, and description
  • Tags (if any)
  • Parameters with types, requirements, defaults, and conditions
  • Usage example with required parameters
  • Post-generation instructions (if any)

Examples

bash
# show info for the cartridge scaffold
b2c scaffold info cartridge

# show info for the controller scaffold
b2c scaffold info controller

Search for scaffolds by name, description, or tags.

Usage

bash
b2c scaffold search <query> [--category <category>]

Arguments

ArgumentDescription
querySearch query (required)

Flags

FlagDescription
--category, -cFilter results by category
--columnsColumns to display (comma-separated): id, displayName, category, source, description
--extended, -xShow all columns including extended fields

Output

Default columns: id, displayName, category, description

Extended columns (with -x): adds source

Examples

bash
# search for scaffolds related to API
b2c scaffold search api

# search within a specific category
b2c scaffold search template --category page-designer

b2c scaffold init

Create a new custom scaffold template.

Usage

bash
b2c scaffold init [name] [--project | --user | --output <dir>]

Arguments

ArgumentDescription
nameName for the new scaffold (kebab-case, optional - prompts if not provided)

Flags

FlagDescription
--projectCreate in project scaffolds directory (.b2c/scaffolds/)
--userCreate in user scaffolds directory (~/.b2c/scaffolds/)
--output, -oCustom output directory for the scaffold
--force, -fOverwrite existing scaffold if it exists

Examples

bash
# create a project-local scaffold interactively
b2c scaffold init --project

# create a user scaffold with a specific name
b2c scaffold init my-component --user

# create a scaffold in a custom directory
b2c scaffold init my-scaffold --output ./custom-scaffolds

b2c scaffold validate

Validate a custom scaffold manifest and templates.

Usage

bash
b2c scaffold validate <path> [--strict]

Arguments

ArgumentDescription
pathPath to the scaffold directory (required)

Flags

FlagDescription
--strictTreat warnings as errors

Validation Checks

  • Manifest structure (scaffold.json)
  • Required fields and types
  • Parameter definitions and validation patterns
  • Template file existence
  • Orphaned template files
  • EJS syntax in templates

Examples

bash
# validate a custom scaffold
b2c scaffold validate ./.b2c/scaffolds/my-scaffold

# validate with strict mode
b2c scaffold validate ./my-scaffold --strict

Built-in Scaffolds

ScaffoldCategoryDescription
cartridgecartridgeB2C cartridge with standard directory structure
controllercartridgeSFRA controller with route handlers and middleware
hookcartridgeHook implementation with hooks.json registration
servicecartridgeB2C web service using LocalServiceRegistry
custom-apicartridgeCustom SCAPI endpoint with OAS 3.0 schema
job-stepcartridgeCustom job step with steptypes.json registration
page-designer-componentcartridgePage Designer component with meta/script/template

Use b2c scaffold info <id> to see the parameters for each scaffold.