Loading...
Loading...
View and debug b2c CLI configuration and understand where credentials come from. Always reference when using the CLI to inspect configuration, manage instances, retrieve OAuth tokens, or set up IDE integration. Also use when authentication fails, connection errors occur, or the wrong instance is being used.
npx skill4agent add salesforcecommercecloud/b2c-developer-tooling b2c-configb2c setup inspectb2c setup instanceTip:still works as an alias. Ifb2c setup configis not installed globally, useb2cinstead (e.g.,npx @salesforce/b2c-cli).npx @salesforce/b2c-cli setup inspect
b2c setup inspectb2c setup instance# Display resolved configuration (sensitive values masked by default)
b2c setup inspect
# View configuration for a specific instance from dw.json
b2c setup inspect -i staging
# View configuration with a specific config file
b2c setup inspect --config /path/to/dw.json# Show actual passwords, secrets, and API keys (use with caution)
b2c setup inspect --unmask# Output as JSON for parsing in scripts
b2c setup inspect --json
# Pretty-print with jq
b2c setup inspect --json | jq '.config'
# Check which sources are loaded
b2c setup inspect --json | jq '.sources'b2c setup ide prophetdw.js# Generate ./dw.js in the current project
b2c setup ide prophet
# Overwrite existing file
b2c setup ide prophet --force
# Custom path
b2c setup ide prophet --output .vscode/dw.jsb2c setup inspect --json --unmaskdw.jsoncartridgesPathsiteIDstorefrontPassword# Show all instances from dw.json
b2c setup instance list
# Output as JSON
b2c setup instance list --json# Interactive mode - prompts for all values
b2c setup instance create staging
# With hostname
b2c setup instance create staging --hostname staging.example.com
# Create and set as active
b2c setup instance create staging --hostname staging.example.com --active
# Non-interactive mode (for scripts)
b2c setup instance create staging \
--hostname staging.example.com \
--username admin \
--password secret \
--force# Set staging as the default instance
b2c setup instance set-active staging
# Now commands use staging by default
b2c code list # Uses staging# Remove with confirmation prompt
b2c setup instance remove staging
# Remove without confirmation
b2c setup instance remove staging --forcesetup inspect[DwJsonSource][MobifySource][SFCC_*][password-store]-admi...REDACTED--unmaskb2c auth token# Get access token (outputs raw token to stdout)
b2c auth token
# Get token with specific scopes
b2c auth token --auth-scope sfcc.orders --auth-scope sfcc.products
# Get token as JSON (includes expiration and scopes)
b2c auth token --json
# Use in curl for OCAPI calls
curl -H "Authorization: Bearer $(b2c auth token)" \
"https://your-instance.dx.commercecloud.salesforce.com/s/-/dw/data/v24_1/sites"clientIdclientSecretclientIdb2c setup --helpb2c setup skills