| name | b2c-cap |
| description | Manage 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 CAP Skill
Use the b2c CLI plugin to validate, package, install, uninstall, list, and pull Commerce App Packages (CAPs) and commerce features on Salesforce B2C Commerce instances.
Tip: If b2c is not installed globally, use npx @salesforce/b2c-cli instead (e.g., npx @salesforce/b2c-cli cap list).
Configuration & Authentication
The CLI auto-discovers the target instance and credentials from SFCC_* environment variables, dw.json in the current or parent directories, ~/.mobify, package.json, and configuration plugins. Flags like --server, --client-id, and --client-secret are usually unnecessary — only pass them to override what's auto-detected.
Run b2c setup inspect to see the resolved configuration and which source provided each value (use --json for scripting, --unmask to reveal secrets). For precedence rules and troubleshooting, see the b2c-cli:b2c-config skill.
Examples
List Installed Features
b2c cap list
b2c cap list --site-id RefArch,SiteGenesis
b2c cap list --json
b2c cap list --local
Pull App Sources
Pull installed Commerce App source packages for cartridge deployment or Storefront Next (sfnext) development. Pulled apps are extracted into ./commerce-apps/{name}/ and contain cartridges, IMPEX data, and storefront-next/ extensions ready for use with the sfnext CLI.
b2c cap pull
b2c cap pull avalara-tax
b2c cap pull --output ./my-apps
b2c cap pull --site-id RefArch
View Configuration Tasks
b2c cap tasks avalara-tax --site-id RefArch
b2c cap tasks avalara-tax --site-id RefArch --json
Validate a CAP
b2c cap validate ./commerce-avalara-tax-app-v0.2.5
b2c cap validate ./commerce-avalara-tax-app-v0.2.5.zip
b2c cap validate ./commerce-avalara-tax-app-v0.2.5 --json
Package a CAP
b2c cap package ./commerce-avalara-tax-app-v0.2.5
b2c cap package ./commerce-avalara-tax-app-v0.2.5 --output ./dist/my-app.zip
Install a CAP
b2c cap install ./commerce-avalara-tax-app-v0.2.5 --site-id RefArch
b2c cap install ./commerce-avalara-tax-app-v0.2.5.zip --site-id RefArch
b2c cap install ./commerce-avalara-tax-app-v0.2.5 --site-id RefArch --timeout 600
b2c cap install ./commerce-avalara-tax-app-v0.2.5 --site-id RefArch --skip-validate
b2c cap install ./commerce-avalara-tax-app-v0.2.5 --site-id RefArch --clean-archive
Uninstall a CAP
b2c cap uninstall avalara-tax --site-id RefArch
More Commands
See b2c cap --help for a full list of available commands and options in the cap topic.
Related Skills
b2c-cli:b2c-job - For running general jobs and site archive import/export
b2c-cli:b2c-site-import-export - For site archive structure and metadata XML patterns
b2c-cli:b2c-code - For deploying cartridges pulled from Commerce Apps