Docs Commands
Commands for searching and reading Script API documentation (dw.* classes/modules), the standard (system) job step catalog, bundled XSD schemas, and downloading fresh documentation from an instance.
The bundled corpus searched by docs search / docs read includes the catalog of built-in job step type IDs (for example ImportCatalog, ExportCatalog, ImportInventoryLists) that you add to Business Manager job flows. Read the catalog overview with b2c docs read job-steps, or a specific step with b2c docs read <TypeID>. See the b2c-cli:b2c-job and b2c:b2c-custom-job-steps skills for how standard steps fit into job flows.
Authentication
| Operation | Auth Required |
|---|---|
docs search | None (uses local bundled docs) |
docs read | None (uses local bundled docs) |
docs schema | None (uses local bundled schemas) |
docs download | Instance + WebDAV credentials |
For b2c docs download, configure instance and WebDAV access:
export SFCC_SERVER=my-sandbox.demandware.net
export SFCC_USERNAME=your-username
export SFCC_PASSWORD=your-passwordIn addition to these topic-specific options, all commands also support global flags.
b2c docs search
Search bundled Script API documentation using fuzzy matching.
Usage
b2c docs search [query]Arguments
| Argument | Description | Required |
|---|---|---|
query | Search query (class name, module path, or partial text) | No (required unless --list is used) |
Flags
| Flag | Description | Default |
|---|---|---|
--limit, -l | Maximum number of results to display | 20 |
--list | List all available documentation entries | false |
--columns, -c | Columns to display (comma-separated). Available: id, title, score | (none) |
--extended, -x | Show all columns including extended fields | false |
Examples
# Search by class name
b2c docs search ProductMgr
# Search with multiple terms
b2c docs search "catalog product"
# Limit result count
b2c docs search status --limit 5
# Find a standard job step by name
b2c docs search ImportCatalog
# List all available entries
b2c docs search --listThe same index also covers the standard job step catalog. Search by step type ID (for example
b2c docs search ExportInventoryLists) orb2c docs search job stepsfor the catalog overview.
Output
Default output is a table with ID, Title, and Match score. With --list, output shows all entries (ID and Title) plus a total count.
b2c docs read
Read Script API documentation for a specific class or module.
Usage
b2c docs read <query>Arguments
| Argument | Description | Required |
|---|---|---|
query | Class/module name or partial match | Yes |
Flags
| Flag | Description | Default |
|---|---|---|
--raw, -r | Output raw markdown (no terminal rendering) | false |
Examples
# Read a class doc
b2c docs read ProductMgr
# Read by fully qualified name
b2c docs read dw.catalog.ProductMgr
# Read a standard job step's purpose + configuration parameters
b2c docs read ImportCatalog
# Read the standard job step catalog overview
b2c docs read job-steps
# Output raw markdown for piping
b2c docs read ProductMgr --raw
# JSON output with selected entry + content
b2c docs read ProductMgr --jsonOutput
By default, markdown is rendered for terminal display. Raw markdown is emitted when using --raw (or when output is not a TTY).
b2c docs schema
Read bundled XSD schemas (import/export data format definitions).
Usage
b2c docs schema [query]Arguments
| Argument | Description | Required |
|---|---|---|
query | Schema name or partial match (for example catalog, order) | No (required unless --list is used) |
Flags
| Flag | Description | Default |
|---|---|---|
--list, -l | List all available schemas | false |
--path, -p | Print the filesystem path to the schema instead of its content | false |
Examples
# Read a specific schema
b2c docs schema catalog
# Fuzzy match by schema name
b2c docs schema order
# List available schemas
b2c docs schema --list
# JSON output
b2c docs schema catalog --json
# Get the filesystem path to a schema
b2c docs schema catalog --pathOutput
Without --json, the command writes schema XML directly to stdout. With --path, it prints the resolved filesystem path (useful for passing to XML validation tools). With --list, it prints available schema IDs and a total count.
Validating XML with xmllint
Use the --path flag to pass schema paths directly to xmllint for XML validation (requires installation of xmllint):
xmllint --schema "$(b2c docs schema catalog --path)" catalog.xml --nooutb2c docs download
Download Script API documentation from a B2C Commerce instance to a local directory.
Usage
b2c docs download <output>Arguments
| Argument | Description | Required |
|---|---|---|
output | Local output directory for extracted docs | Yes |
Flags
| Flag | Description | Default |
|---|---|---|
--keep-archive | Keep the downloaded archive file after extraction | false |
In addition to global flags, this command supports instance flags and authentication flags for WebDAV access.
Examples
# Download docs to a local directory
b2c docs download ./docs
# Keep the downloaded archive
b2c docs download ./docs --keep-archive
# Specify instance hostname directly
b2c docs download ./my-docs --server sandbox.demandware.net
# JSON output
b2c docs download ./docs --jsonOutput
The command reports the number of extracted files and output path. If --keep-archive is set, it also prints the saved archive location.