b2c-mrt
B2C MRT Skill
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).
Command Structure
mrt
├── org (list, b2c) - Organizations and B2C connections
├── project - Project management
│ ├── member - Team member management
│ └── notification - Deployment notifications
├── env - Environment management
│ ├── var - Environment variables
│ ├── redirect - URL redirects
│ └── access-control - Access control headers
├── bundle - Bundle and deployment management
└── user - User profile and settings
Quick Examples
Deploy a Bundle
# 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
Manage Environments
# List environments
b2c mrt env list -p my-storefront
# Create a new environment
b2c mrt env create qa -p my-storefront --name "QA Environment"
# Get environment details
b2c mrt env get -p my-storefront -e production
# Invalidate CDN cache
b2c mrt env invalidate -p my-storefront -e production
Environment Variables
# 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
View Deployment History
# 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
Project Management
# 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 user@example.com -p my-storefront --role developer
URL Redirects
# 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
Configuration
dw.json
Configure MRT settings in your project's dw.json:
{
"mrtProject": "my-storefront",
"mrtEnvironment": "staging"
}
Environment Variables
export MRT_API_KEY=your-api-key
export MRT_PROJECT=my-storefront
export MRT_ENVIRONMENT=staging
~/.mobify Config
Store your API key in ~/.mobify:
{
"api_key": "your-mrt-api-key"
}
Detailed References
- Project Commands - Projects, members, and notifications
- Environment Commands - Environments, variables, redirects
- Bundle Commands - Deployments, history, downloads
More Commands
See b2c mrt --help for a full list of available commands and options.
More from salesforcecommercecloud/b2c-developer-tooling
b2c-docs
Search and read B2C Commerce Script API documentation and XSD schemas using the b2c CLI. Use this skill whenever the user needs to look up class methods, understand API signatures, find available properties on commerce objects (baskets, orders, products, customers), or check XML schema formats for imports. Also use when writing server-side scripts and needing API reference — even if they just say "what methods does Basket have" or "what fields can I import for products".
116b2c-webdav
List, upload, download, and manage files on B2C Commerce instances via WebDAV. Use this skill whenever the user needs to upload files to IMPEX directories, download exports from an instance, list remote files, create or delete directories, or zip/unzip files on the server. Also use when managing file transfers to sandboxes or browsing instance file systems -- even if they just say 'upload a file to the instance' or 'check what's in the IMPEX folder'.
103b2c-slas-auth-patterns
Implement SLAS authentication patterns in B2C Commerce including passwordless login (email OTP, SMS OTP, passkeys), session bridging between PWA Kit/Storefront Next and SFRA, hybrid authentication (B2C 25.3+), token refresh flows, trusted system on behalf of (TSOB), and JWT validation. Use this skill whenever the user asks about shopper authentication beyond basic login, token exchange flows, passwordless or biometric auth, keeping sessions alive across storefronts, handling 409 Conflict errors on token endpoints, refreshing shopper tokens, or validating JWTs — even if they don't mention SLAS by name.
90b2c-config
Inspect and debug CLI configuration, instance connections, and authentication. Use this skill whenever the user needs to check which dw.json or credentials are active, manage multiple instance profiles, retrieve OAuth tokens for scripting, troubleshoot authentication failures or connection errors, or integrate with VS Code or other editors. Also use when environment variables override config or the wrong sandbox is being targeted -- even if they just say 'why is it connecting to the wrong instance' or 'get me an access token'.
90b2c-controllers
Create storefront controllers using SFRA or classic patterns with server.get/post, middleware chains, and res.render/json. Use this skill whenever the user needs to build a page route, handle form submissions, create AJAX endpoints, extend or override existing controllers, or add middleware to a request pipeline. Also use when debugging route registration or response rendering -- even if they just say 'new page endpoint' or 'handle a POST request'.
86b2c-scapi-schemas
Browse and retrieve SCAPI OpenAPI schema specifications. Use this skill whenever the user needs to list available SCAPI APIs, inspect endpoint paths or request/response shapes, explore data models for products or orders, check which fields an API returns, or understand SCAPI versioning. Also use when looking up API details before building an integration -- even if they just say 'what fields does the product API return' or 'show me the SCAPI endpoints'.
84