/b2c-cli:b2c-sitesfrom b2c-cli
Lists B2C Commerce storefront sites, checks online/offline status, and views or edits site and Business Manager cartridge paths via the b2c CLI.
Ships in b2c-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use the b2c CLI plugin to list and manage storefront sites on Salesforce B2C Commerce instances.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli sites list).
The CLI auto-discovers the target instance and credentials from SFCC_* environment variables (including project .env), the selected project-local or shared dw.json, and configuration plugins. package.json supplies only non-sensitive defaults. Flags like --server, --client-id, and --client-secret are usually unnecessary — only pass them to override what's auto-detected.
Run b2c setup inspect to see the resolved configuration and which source provided each value (use --json for scripting; secrets stay masked by default). For precedence rules and troubleshooting, see the b2c-cli:b2c-config skill.
b2c sites listLists all sites on a B2C Commerce instance, showing site ID, display name, and storefront status.
# list all sites on the configured instance
b2c sites list
# list sites on a specific server
b2c sites list --server my-sandbox.demandware.net
# list sites with JSON output (useful for parsing/automation)
b2c sites list --json
# use a specific instance from config
b2c sites list --instance production
# enable debug logging
b2c sites list --debug
Manage the ordered list of active cartridges on a site. The singular alias sites cartridge also works.
# list the cartridge path for a storefront site
b2c sites cartridges list --site-id RefArch
# list the Business Manager cartridge path
b2c sites cartridges list --bm
# add a cartridge to the beginning of a site's path (default)
b2c sites cartridges add plugin_applepay --site-id RefArch
# add a cartridge to the end
b2c sites cartridges add plugin_applepay --site-id RefArch --position last
# add a cartridge after a specific cartridge
b2c sites cartridges add plugin_applepay --site-id RefArch --position after --target app_storefront_base
# add a cartridge to Business Manager
b2c sites cartridges add bm_extension --bm --position first
# remove a cartridge from a site
b2c sites cartridges remove old_cartridge --site-id RefArch
# replace the entire cartridge path
b2c sites cartridges set "app_storefront_base:plugin_applepay:plugin_wishlists" --site-id RefArch
# JSON output for automation
b2c sites cartridges list --site-id RefArch --json
What the listed path contains. list (and the cartridges field of sites list --json) shows the effective path: your custom cartridges, followed by the platform plugin cartridges the instance appends (for example payment plugins). Pass only your own cartridges to set; copying the full listed path adds the platform cartridges a second time. To check a path in a script, compare its leading entries.
Site archive imports reset the path. A sites/<site-id>/site.xml imported without <custom-cartridges> clears the site's cartridge path. Include <custom-cartridges> in any site.xml you import (for example, one that only changes the storefront status), or set the path again afterwards.
Site and Business Manager cartridge paths replicate from staging with the site (b2c-cli:b2c-replication), so on production and development set them on staging and replicate.
When OCAPI direct permissions for /sites/*/cartridges are unavailable, cartridge commands automatically fall back to site archive import/export. Business Manager (--bm) updates use SCAPI (sfcc.sites.rw), then site archive import; OCAPI can't update the BM site.
Key flags (inherited from InstanceCommand):
| Flag | Short | Description |
|---|---|---|
--server | -s | B2C instance hostname (env: SFCC_SERVER) |
--json | Output full site data as JSON | |
--instance | Named instance from config | |
--debug | Enable debug logging |
Output columns: ID, Display Name, Status (storefront_status).
JSON output returns the full site objects including all properties (useful for extracting channel IDs, custom preferences, and other site metadata not shown in the table).
Site reads and cartridge-path writes run over SCAPI (the site/sites API) when shortCode, tenantId, and the sfcc.sites / sfcc.sites.rw scopes are configured. auto temporarily falls back to deprecated OCAPI on safe SCAPI rejections, and writes can fall back again to site archive import when direct APIs are unavailable.
Finding site IDs for other commands: Many commands (e.g., site import/export) require a site ID. Use sites list to discover valid IDs:
b2c sites list
# then use the ID in other commands
b2c job export --site RefArch --site-data content,site_preferences
Checking site status: The status column shows the storefront status (online/offline) for each site, useful for verifying deployment state.
Scripting and automation: Use --json to get machine-readable output for CI/CD pipelines:
b2c sites list --json | jq '.data[].id'
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub salesforcecommercecloud/b2c-developer-tooling --plugin b2c-cli28 skills in this plugin
/b2c-amManage Account Manager resources including API clients, users, roles, and organizations. Use this skill whenever the user needs to create or update API clients, onboard or offboard developers, assign Account Manager roles scoped to tenants, audit user permissions, look up organizations, or provision API clients for CI/CD pipelines. Also use when managing AM role assignments or querying Account Manager data — even if they just say "add a new developer" or "set up an API client". For instance-level Business Manager administration (BM roles, BM users, BM access keys, BM whoami), defer to the `b2c-cli:b2c-bm-users-roles` skill./b2c-bm-users-rolesManage Business Manager users, access roles, role permissions, and per-user access keys on a B2C Commerce instance using the b2c CLI. Use this skill whenever the user needs to list or search BM users on a sandbox or production instance, identify which BM user an OAuth token resolves to ("whoami"), assign or revoke instance-level access roles, edit role permissions, look up a user's WebDAV / OCAPI / Storefront access key, or rotate access keys for SSO-managed users. Also use when the user asks "what's my BM login on sandbox X", "rotate my WebDAV password", "how do I make a custom BM role", "audit BM users on this instance", or "delete a stale BM user from a sandbox"./b2c-capManage Commerce App Packages (CAPs), also called commerce apps or apps, and commerce features using the b2c CLI. Use this skill whenever the user needs to validate, package, install, uninstall, list, or pull commerce apps on B2C Commerce instances, view configuration tasks, or pull app sources for cartridge deployment or Storefront Next development. Also use when checking which apps are installed on an instance, inspecting app details or versions, or managing app lifecycle — even if they just say "what apps do I have", "list my commerce apps", "which CAPs are installed", "install this app", "pull app sources", or "show installed apps"./b2c-cipQuery CIP/CCAC sales, merchandising, payment, traffic, and API/controller analytics with the B2C CLI or MCP. Discover reports/tables, scope SQL, export results, and resolve analytics access./b2c-codeDeploy, download, and manage cartridge code versions on B2C Commerce instances. Use this skill whenever the user needs to upload or download cartridges to/from a sandbox, activate or delete code versions, watch for local file changes during development, or deploy a subset of cartridges. Also use when pushing code to an instance, pulling code from an instance, or setting up a dev workflow with live reload -- even if they just say 'push my code to the sandbox', 'download the code', or 'how do I activate the new version'./b2c-configConfigure B2C CLI/MCP authentication, instances, and project defaults; troubleshoot missing credentials, wrong targets, or configuration precedence. Routine inspection can use config_inspect or b2c setup inspect directly.Other plugins' skills for the same job