Loading...
Loading...
Deploy and manage code versions/cartridges on B2C Commerce instances/sandboxes with the b2c cli. Always reference when using the CLI to upload cartridges, deploy code, activate code versions, manage code versions, or watch for file changes during development.
npx skill4agent add salesforcecommercecloud/b2c-developer-tooling b2c-codeb2cTip: Ifis not installed globally, useb2cinstead (e.g.,npx @salesforce/b2c-cli).npx @salesforce/b2c-cli code deploy
# deploy all cartridges from current directory
b2c code deploy
# deploy cartridges from a specific directory
b2c code deploy ./my-cartridges
# deploy to a specific server and code version
b2c code deploy --server my-sandbox.demandware.net --code-version v1
# deploy and reload (re-activate) the code version
b2c code deploy --reload
# delete existing cartridges before upload and reload
b2c code deploy --delete --reload
# deploy only specific cartridges
b2c code deploy -c app_storefront_base -c plugin_applepay
# exclude specific cartridges from deployment
b2c code deploy -x test_cartridge# watch cartridges and upload changes automatically
b2c code watch
# watch a specific directory
b2c code watch ./my-cartridges
# watch with specific server and code version
b2c code watch --server my-sandbox.demandware.net --code-version v1
# watch only specific cartridges
b2c code watch -c app_storefront_base
# watch excluding specific cartridges
b2c code watch -x test_cartridge# list code versions on the instance
b2c code list
# list with JSON output
b2c code list --json# activate a code version
b2c code activate <version-name>
# reload (re-activate) the current code version
b2c code activate --reload--reloadb2c-cli:b2c-scapi-custom# delete a code version
b2c code delete <version-name>b2c code --helpcodeb2c-cli:b2c-scapi-customb2c-cli:b2c-webdavb2c:b2c-custom-api-development