b2c-config

Installation
SKILL.md

B2C Config Skill

The B2C CLI (@salesforce/b2c-cli) is a command-line tool for Salesforce B2C Commerce development. It provides commands organized by topic: auth, code, webdav, sandbox, mrt, scapi, slas, ecdn, job, logs, sites, content, cip, setup, and more. Use b2c --help or b2c <topic> --help for a full list.

Tip: If b2c is not installed globally, use npx @salesforce/b2c-cli instead (e.g., npx @salesforce/b2c-cli setup inspect).

How the CLI Discovers Configuration (read this first)

The CLI automatically detects instance hostname, credentials, tenant ID, MRT API key, and other settings from multiple sources. You usually do not need to pass --server, --client-id, --client-secret, --username, --password, --tenant-id, --short-code, or --api-key as flags — the CLI picks them up from the environment or config files.

Sources, in resolution order (highest priority first):

  1. CLI flags and environment variables — explicit values always win. Includes .env files in the current project directory (auto-loaded).
  2. Plugin sources (high priority) — custom configuration plugins (e.g., secret managers).
  3. dw.json — searched starting at the current directory and walking up the directory tree. Supports a single instance or a configs[] array with active: true / -i <name> selection.
  4. ~/.mobify — home-directory file (MRT API key only).
  5. Plugin sources (low priority).
  6. package.json under the b2c key — non-sensitive project defaults (e.g., shortCode, clientId, mrtProject). Sensitive fields like clientSecret/password are intentionally not allowed here.
Installs
95
GitHub Stars
45
First Seen
Feb 11, 2026
b2c-config — salesforcecommercecloud/b2c-developer-tooling