3rd Party Plugins
The B2C CLI can be extended with community-developed plugins that add new functionality or integrate with external tools.
Installing Plugins
Plugins can be installed directly from GitHub or npm:
# Install from GitHub (owner/repo format)
b2c plugins install sfcc-solutions-share/b2c-plugin-intellij-sfcc-config
# Install from npm
b2c plugins install @some-org/b2c-plugin-example
# List installed plugins
b2c plugins
# Uninstall a plugin
b2c plugins uninstall b2c-plugin-intellij-sfcc-configAvailable Plugins
IntelliJ SFCC Config Plugin
Repository: sfcc-solutions-share/b2c-plugin-intellij-sfcc-config
Loads B2C instance configuration from the IntelliJ SFCC plugin settings. This allows you to share configuration between your IDE and the CLI without duplicating settings.
Installation
b2c plugins install sfcc-solutions-share/b2c-plugin-intellij-sfcc-configFeatures
- Reads connection settings from
.idea/misc.xml - Optionally decrypts credentials from the IntelliJ SFCC plugin's encrypted credentials file
- Supports the
--instanceflag to select specific connections - Provides hostname, username, code version, client ID, and more
Environment Variables
| Variable | Description | Default |
|---|---|---|
SFCC_INTELLIJ_PROJECT_FILE | Path to .idea/misc.xml | ./.idea/misc.xml |
SFCC_INTELLIJ_CREDENTIALS_FILE | Path to encrypted credentials file | (none) |
SFCC_INTELLIJ_CREDENTIALS_KEY | Decryption key for credentials | (none) |
SFCC_INTELLIJ_ALGORITHM | Encryption algorithm | aes-192-ecb |
Usage
# Basic usage - reads from .idea/misc.xml in current directory
cd /path/to/intellij-project
b2c code list
# Select a specific instance
b2c code list --instance staging
# With credentials decryption
export SFCC_INTELLIJ_CREDENTIALS_FILE=~/.intellij-sfcc-credentials
export SFCC_INTELLIJ_CREDENTIALS_KEY="your-24-byte-key"
b2c code deploymacOS Keychain Plugin
Repository: sfcc-solutions-share/b2c-plugin-macos-keychain
Loads B2C credentials from the macOS Keychain. This allows secure storage of sensitive credentials without keeping them in files like dw.json.
macOS Only
This plugin only works on macOS.
Installation
b2c plugins install sfcc-solutions-share/b2c-plugin-macos-keychainFeatures
- Stores credentials as JSON blobs in the macOS Keychain
- Supports global defaults via a
*account (shared OAuth credentials) - Supports instance-specific credentials that override globals
- Optional
defaultInstanceto auto-select an instance - Merges with other config sources (dw.json, environment variables)
Storing Credentials
# Store global OAuth credentials (shared across all instances)
security add-generic-password -s 'b2c-cli' -a '*' \
-w '{"clientId":"shared-id","clientSecret":"shared-secret","defaultInstance":"staging"}' -U
# Store instance-specific credentials
security add-generic-password -s 'b2c-cli' -a 'staging' \
-w '{"username":"user@example.com","password":"my-webdav-key"}' -UEnvironment Variables
| Variable | Description | Default |
|---|---|---|
SFCC_KEYCHAIN_SERVICE | Service name in keychain | b2c-cli |
SFCC_KEYCHAIN_INSTANCE | Fallback instance name | (none) |
Usage
# Use with explicit instance
b2c code deploy --instance staging
# Uses defaultInstance from * config if set
b2c code deploy
# Global OAuth merges with dw.json for other settings
b2c code deployCreating Your Own Plugin
Want to create a plugin? See the Extending the CLI guide for documentation on:
- The
b2c:config-sourceshook for custom configuration sources - Base command classes for building new commands
- Plugin structure and packaging
Submitting Plugins
If you've created a plugin you'd like listed here, please submit a pull request to the B2C Developer Tooling repository.