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

WebDAV Commands ​

Commands for file operations on B2C Commerce instance WebDAV.

Global WebDAV Flags ​

These flags are available on all WebDAV commands:

Root Directory ​

FlagDescriptionDefault
--root, -rWebDAV root directoryIMPEX

Available roots:

  • impex - Impex directory (default)
  • temp - Temporary files
  • cartridges - Code cartridges
  • realmdata - Realm data
  • catalogs - Product catalogs
  • libraries - Content libraries
  • static - Static resources
  • dynamic - Site-specific files, including Velocity templates
  • logs - Log files
  • securitylogs - Security log files

Dynamic Site Files ​

Use --root=dynamic to manage files under Sites/Dynamic/<site-id>/, independently of code deployments. Include the site ID as the first segment of the remote path:

bash
b2c webdav ls --root=dynamic MySite/
b2c webdav mkdir --root=dynamic MySite/mockData
b2c webdav put --root=dynamic ./mock.vm MySite/mockData/
b2c webdav get --root=dynamic MySite/mockData/mock.vm -o ./mock.vm

The site ID directory is managed by the instance and must match an existing site. The same path format works with rm, zip, and unzip. This location is used by dw.template.Velocity.renderTemplate() for site-specific Velocity templates.

Authentication ​

WebDAV commands require authentication to access instance files.

Basic Auth provides better performance for WebDAV operations using your Business Manager username and WebDAV access key:

bash
export SFCC_USERNAME=my-user
export SFCC_PASSWORD=my-webdav-access-key
b2c webdav ls

Or via flags:

bash
b2c webdav ls -u my-user -p my-access-key

OAuth ​

OAuth can also be used with an Account Manager API Client:

bash
export SFCC_CLIENT_ID=my-client
export SFCC_CLIENT_SECRET=my-secret
b2c webdav ls

Mixed Authentication ​

For operations that require both WebDAV and OCAPI (like code deploy), you can provide both:

bash
export SFCC_USERNAME=my-user
export SFCC_PASSWORD=my-access-key
export SFCC_CLIENT_ID=my-client
export SFCC_CLIENT_SECRET=my-secret
b2c code deploy

For complete setup instructions, see the Authentication Guide.


b2c webdav ls ​

List files and directories in a WebDAV location.

B2C CLI listing import and export archives in WebDAV with their file sizes.

Usage ​

bash
b2c webdav ls [PATH]

Arguments ​

ArgumentDescriptionDefault
PATHPath relative to rootRoot directory

Flags ​

FlagDescriptionDefault
-c, --columnsColumns to display (comma-separated). Available: name, type, size, modified, contentTypename, type, size
-x, --extendedShow all columns including extended fieldsfalse

Examples ​

bash
# List root of Impex
b2c webdav ls

# List a subdirectory
b2c webdav ls src/instance

# List cartridges
b2c webdav ls --root=cartridges

# List log files
b2c webdav ls --root=logs

# Output as JSON
b2c webdav ls --root=logs --json

Output ​

Name                Size       Modified
──────────────────────────────────────────────────────
src/                -          12/20/2024, 10:00 AM
archive.zip         45.2 KB    12/19/2024, 3:30 PM
data.xml            12.8 KB    12/18/2024, 9:15 AM

b2c webdav get ​

Download a file from WebDAV.

Usage ​

bash
b2c webdav get <REMOTE>

Arguments ​

ArgumentDescriptionRequired
REMOTERemote file path relative to rootYes

Flags ​

FlagDescriptionDefault
-o, --outputOutput file path (use - for stdout)Filename in current directory

Examples ​

bash
# Download to current directory
b2c webdav get src/instance/export.zip

# Download to specific location
b2c webdav get src/instance/export.zip -o ./downloads/export.zip

# Download a log file
b2c webdav get --root=logs customerror.log

# Download from cartridges
b2c webdav get --root=cartridges app_storefront_base/cartridge/templates/default/home.isml

b2c webdav put ​

Upload a file to WebDAV.

Usage ​

bash
b2c webdav put <LOCAL> <REMOTE>

Arguments ​

ArgumentDescriptionRequired
LOCALLocal file path to uploadYes
REMOTERemote destination (directory or file path)Yes

Examples ​

bash
# Upload to root directory
b2c webdav put ./export.zip /

# Upload to subdirectory (keeps filename)
b2c webdav put ./export.zip src/instance/

# Upload with renamed file
b2c webdav put ./data.xml src/instance/renamed.xml

# Upload to temp directory
b2c webdav put ./file.tar.gz / --root=temp

Notes ​

  • If REMOTE ends with / or is /, the source filename is used
  • Missing parent directories under the root are created automatically

b2c webdav mkdir ​

Create a directory on WebDAV.

Usage ​

bash
b2c webdav mkdir <PATH>

Arguments ​

ArgumentDescriptionRequired
PATHDirectory path to create (relative to root)Yes

Examples ​

bash
# Create in Impex
b2c webdav mkdir src/instance/my-folder

# Create in temp directory
b2c webdav mkdir --root=temp my-temp-dir

# Create in cartridges
b2c webdav mkdir --root=cartridges new-cartridge

b2c webdav rm ​

Delete a file or directory from WebDAV.

Usage ​

bash
b2c webdav rm <PATH>

Arguments ​

ArgumentDescriptionRequired
PATHPath to delete relative to rootYes

Flags ​

FlagDescriptionDefault
--force, -fSkip confirmation promptfalse

Examples ​

bash
# Delete a file (with confirmation)
b2c webdav rm src/instance/old-export.zip

# Delete without confirmation
b2c webdav rm src/instance/old-export.zip --force

# Delete from temp directory
b2c webdav rm --root=temp my-temp-dir --force

Notes ​

  • Deleting a directory removes all contents recursively
  • Use --force to skip the confirmation prompt

b2c webdav zip ​

Create a zip archive of a remote file or directory.

Usage ​

bash
b2c webdav zip <PATH>

Arguments ​

ArgumentDescriptionRequired
PATHRemote path to zip (relative to root)Yes

Examples ​

bash
# Zip a directory in Impex
b2c webdav zip src/instance/data

# Zip a cartridge
b2c webdav zip --root=cartridges my-cartridge

Notes ​

  • The zip file is created in the same location with .zip extension
  • This operation is performed server-side

b2c webdav unzip ​

Extract a remote zip archive.

Usage ​

bash
b2c webdav unzip <PATH>

Arguments ​

ArgumentDescriptionRequired
PATHRemote zip file path (relative to root)Yes

Examples ​

bash
# Extract in Impex
b2c webdav unzip src/instance/export.zip

# Extract a cartridge archive
b2c webdav unzip --root=cartridges my-cartridge.zip

Notes ​

  • Contents are extracted to the same directory as the zip file
  • This operation is performed server-side