/b2c-cli:b2c-mrtfrom b2c-cli
Deploys and manages Salesforce B2C Managed Runtime (MRT) storefronts via the b2c CLI. Handles PWA Kit bundle deployment, environment variables, URL redirects, project management, and organization connections.
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 to manage Managed Runtime (MRT) projects, environments, bundles, and deployments for PWA Kit storefronts.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cliinstead (e.g.,npx @salesforce/b2c-cli mrt bundle deploy).
The CLI resolves the MRT API key from MRT_API_KEY (or SFCC_MRT_API_KEY), dw.json, ~/.mobify, or configuration plugins. Project and environment defaults can also come from package.json under b2c (mrtProject, mrtEnvironment) or environment variables. package.json cannot supply API keys or other secrets. Flags like --api-key, -p, and -e are usually unnecessary when defaults are configured — only pass them to override.
Run b2c setup inspect to see the resolved configuration and which source provided each value (use --json for scripting; keep secrets masked unless the user explicitly requests their values). For precedence rules and troubleshooting, see the b2c-cli:b2c-config skill.
Most MRT commands run against the legacy MRT Cloud API (API key). Several commands can also run over the SCAPI MRT backend: mrt bundle history, mrt bundle list, mrt bundle deploy (both the local-build push and deploying an existing <bundleId>), the mrt env var family (list / set / push / delete), the mrt env redirect family (list / create / get / update / delete / clone), the mrt env access-control family (list / create / get / delete), and the mrt project family (list / create / get / update / delete). Choose with --mrt-backend (MRT_BACKEND / SFCC_MRT_BACKEND, or mrtBackend in dw.json):
legacy (default) — always the MRT Cloud API.auto — use SCAPI when it's configured (--short-code + --tenant-id + client-credentials or JWT Bearer auth), otherwise legacy. Falls back to legacy on safe pre-execution errors. Each command requests its own scopes: bundle commands use sfcc.storefront.deployments[.rw]; env var, redirect, and access-control commands use sfcc.storefront.environments[.rw]; project commands use sfcc.storefront.storefronts[.rw] (reads accept either tier, writes require .rw).scapi — always SCAPI, with no fallback; errors if prerequisites are missing. Also errors on unsupported commands (every MRT command except the bundle, env var, redirect, access-control, and project commands above — note mrt project member and mrt project notification remain legacy-only).Notes:
--json, these commands emit the serving backend's native shape (e.g. bundle history is legacy {count, next, previous, deployments} vs SCAPI {limit, offset, total, data}; env var list is legacy {count, variables} vs the SCAPI native environment-variables map). The human table is normalized; --json is not. Pin legacy or scapi when a script needs a stable shape.set and delete apply a merge-PATCH (only the keys you pass change; delete sends the key with a null value); values are always masked by both backends. push resolves the backend once from its initial read and pins every write to it, so a single push never crosses backends.get and delete key on the header UUID; create takes the header value as a positional argument (201 Created returns the full masked header). Header values are always masked by both backends — the CLI never displays or reconstructs the plaintext value.from_path), SCAPI keys on a redirect ID (UUID) — so get / update / delete take a neutral identifier positional (source path on legacy, UUID on SCAPI). update is a partial update (only the fields you pass change; the source path cannot be changed); clone copies all redirects from a distinct source environment and rejects a same-source clone.--tenant-id). Backend-specific flags: create legacy needs --organization, SCAPI needs ≥1 --site (--type defaults to storefront_next); update cannot rename over SCAPI (no --name/--url) and its --site fully replaces the assigned-sites set (not incremental); SCAPI create/delete return 202 and complete asynchronously. mrt project member / notification stay legacy-only and reject --mrt-backend scapi.--api-key, --cloud-origin / -u, --credentials-file / -c) are ignored — with a warning — when SCAPI serves the request.--storefront (long) and -s (short) are aliases of --project / -p — the SCAPI storefront ID is the project slug, so all four are interchangeable on every mrt command. On mrt project create this flag sets the new project's slug (auto-generated from the name if omitted); mrt bundle save uses -d for --save-dir, keeping -s free for the storefront alias.mrt
├── org - Organizations and B2C connections
│ ├── member - Organization-level member management
│ └── cert - Custom domain certificates
├── project - Project management
│ ├── member - Team member management
│ └── notification - Deployment notifications
├── env - Environment management (incl. clone)
│ ├── var - Environment variables
│ ├── redirect - URL redirects
│ └── access-control - Access control headers
├── bundle - Bundle and deployment management (incl. delete)
└── user - User profile and settings
# Push local build to staging
b2c mrt bundle deploy -p my-storefront -e staging
# Push to production with release message
b2c mrt bundle deploy -p my-storefront -e production -m "Release v1.0.0"
# Deploy existing bundle by ID
b2c mrt bundle deploy 12345 -p my-storefront -e production
# Build and upload a v2-format bundle (add -e <env> to also deploy). `upload-v2` is deprecated.
b2c mrt bundle deploy --v2 -p my-storefront
# List environments
b2c mrt env list -p my-storefront
# Create a new environment
b2c mrt env create qa -p my-storefront --name "QA Environment"
# Clone an existing environment (-e is the source; positional arg is the new slug)
b2c mrt env clone qa -p my-storefront -e staging --clone-redirects --clone-env-vars
# Get environment details
b2c mrt env get -p my-storefront -e production
# Promote an environment to primary (SCAPI backend only)
b2c mrt env set-primary -p my-storefront -e production --mrt-backend scapi
# Invalidate CDN cache
b2c mrt env invalidate -p my-storefront -e production
# List variables
b2c mrt env var list -p my-storefront -e production
# Set variables
b2c mrt env var set API_KEY=secret DEBUG=true -p my-storefront -e staging
# Delete a variable
b2c mrt env var delete OLD_VAR -p my-storefront -e production
# List bundles in project
b2c mrt bundle list -p my-storefront
# View deployment history for environment
b2c mrt bundle history -p my-storefront -e production
# Download a bundle artifact
b2c mrt bundle download 12345 -p my-storefront
# Delete one or more bundles (uses bulk-delete for >1)
b2c mrt bundle delete 12345 -p my-storefront
b2c mrt bundle delete 12345 12346 12347 -p my-storefront --force
Organization members are distinct from project members; they hold a role at the organization level. Custom-domain certificates are organization-scoped and referenced by b2c mrt env create/update/clone via --certificate-id.
# List, add, update, remove organization members
b2c mrt org member list --org my-org
b2c mrt org member add [email protected] --org my-org --role member --view-all-projects
b2c mrt org member update [email protected] --org my-org --no-cert-permission
b2c mrt org member remove [email protected] --org my-org
# Manage custom domain certificates
b2c mrt org cert list --org my-org
b2c mrt org cert create shop.example.com --org my-org # output includes the DNS validation record
b2c mrt org cert get 123 --org my-org
b2c mrt org cert restart-validation 123 --org my-org
b2c mrt org cert delete 123 --org my-org
# List projects
b2c mrt project list
# Get project details
b2c mrt project get -p my-storefront
# List project members
b2c mrt project member list -p my-storefront
# Add a member
b2c mrt project member add [email protected] -p my-storefront --role developer
# List redirects
b2c mrt env redirect list -p my-storefront -e production
# Create a redirect
b2c mrt env redirect create -p my-storefront -e production \
--from "/old-path" --to "/new-path"
# Clone redirects between environments
b2c mrt env redirect clone -p my-storefront --source staging --target production
Configure MRT settings in your project's dw.json:
{
"mrtProject": "my-storefront",
"mrtEnvironment": "staging"
}
export MRT_API_KEY=your-api-key
export MRT_PROJECT=my-storefront
export MRT_ENVIRONMENT=staging
export MRT_BACKEND=legacy # legacy (default) | auto | scapi
Store your API key in ~/.mobify:
{
"api_key": "your-mrt-api-key"
}
See b2c mrt --help for a full list of available commands and options.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
salesforce-b2c, pwa-kit, mrt, storefront-deployment, b2c-cli
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