B2C CLI, MCP and Tooling SDK
The B2C Commerce Developer Tooling project is a modern, open-source monorepo designed to streamline developer workflows. It provides a unified command-line interface (CLI) and a programmatic Software Development Kit (SDK) for interacting with B2C Commerce instances, Managed Runtime (MRT), and On-Demand Sandboxes (ODS).
This project is available as a developer preview. Feature isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. All commands, parameters, and other features are subject to change or deprecation at any time, with or without notice. Don't implement functionality in production with these commands or tools.
- B2C CLI: An oclif-based command line interface for B2C operations.
- B2C Tooling SDK: A standalone Node.js library for authentication, code deployments, and instance management.
- B2C DX MCP Server: A Model Context Protocol (MCP) server for integrating B2C tools with AI-powered developer environments.
Here are some common tasks you can run end-to-end using the B2C Commerce CLI, which help you to quickly provision credentials, configure your environment, and manage platform resources:
- Create a SLAS client (private) for Shopper APIs:
- Update stored credentials and instance settings (guided setup):
b2c setup - Set environment variables for scripted workflows (realm, instance, shortcode):
export SFCC_REALM_ID=zzte SFCC_INSTANCE_ID=001 SFCC_SCAPI_SHORTCODE=kv7kzm78 - Create a Managed Runtime (MRT) project (verify exact flags with help):
b2c mrt project create --name "my-storefront"Or view options:b2c mrt project create --help
The B2C Commerce Developer Tooling can be used as a global command-line tool or integrated into your project as an SDK.
Before installation, ensure your environment meets the minimum requirements for Node.js and package management. For detailed installation instructions, command references, and getting started guides, visit the official B2C Developer Tooling Documentation Site.
Install the CLI globally to access B2C Commerce operations from any terminal:
If you use pnpm, you can use pnpm add -g @salesforce/b2c-cli.
If you're building custom scripts or integrations, add the SDK to your project’s dependencies:
Run the interactive setup to configure the CLI with your instance and Account Manager credentials:
Once installed, verify the CLI is ready for use by checking the version:
If you wish to contribute to the tools, report issues, or use the SDK to build custom integrations, refer to the B2C Developer Tooling GitHub Repository. The repository includes detailed information on:
- Monorepo Structure: How the CLI and SDK packages interact.
- Development Workflow: Local setup using
pnpm, running in development mode, and testing. - API Reference: Auto-generated TypeDoc documentation for the SDK modules (Auth, Instance, Platform, and Operations).
- Contribution Guidelines: How to submit pull requests and use Changesets for versioning.
- License: Apache-2.0
- Security: Report concerns to security@salesforce.com.
- Community: Provide feedback via GitHub Issues or the Unofficial Slack.
For usage information on the specific commands available in the B2C Commerce CLI, see the following references:
Managed Runtime (MRT) Commands – Manage MRT projects, environments, and bundle deployments. eCDN Commands – Manage eCDN zones, certificates, and WAF rules. Code Commands – Push, activate, and manage B2C Commerce code versions. Job Commands – Execute and monitor jobs or handle site import/export. On-Demand Sandbox (ODS) Commands – Create, start, stop, and delete On-Demand Sandboxes. SLAS Commands – Manage Shopper Login and Access Service (SLAS) API clients and tenants. WebDAV Commands – Perform file operations on B2C Commerce instance WebDAV servers.