These flags go before the command:
bcli [global-options] <command> [command-options]| Flag | Short | Description |
|---|---|---|
--profile <name> |
-p |
Use a specific profile |
--env <name> |
-e |
Override environment name |
--company <id-or-alias> |
-c |
Override company (alias, GUID, or all) |
--format <type> |
-f |
Output format: table, json, csv, ndjson, raw |
--verbose |
-v |
Show resolved URLs and timing |
--debug |
Show full HTTP request/response | |
--dry-run |
Preview without executing | |
--quiet |
-q |
Suppress context banner |
--version |
-V |
Show version |
Interactive setup wizard. Defaults to browser auth and discovers companies automatically.
bcli config init
bcli config init --automation
bcli config init --headless| Option | Description |
|---|---|
--auth <method> |
browser, client-credentials, or device-code |
--automation |
Shortcut for client credentials |
--headless |
Shortcut for device code |
--scoped |
Hide standard APIs; only imported endpoints are visible |
--import <file> |
Import custom endpoints after profile creation |
Print resolved configuration (secrets redacted).
bcli config showSet a configuration value.
bcli config set <key> <value>Key format: defaults.<field> or profiles.<name>.<field>
bcli config set defaults.format json
bcli config set profiles.prod.environment ProductionSwitch the active profile.
bcli config use <profile-name>Authenticate and cache a token.
bcli auth login [--method <method>] [--incognito]| Option | Short | Description |
|---|---|---|
--method <method> |
-m |
browser, device, or client_credentials (default: profile's auth_method) |
--incognito |
-i |
Open the browser in incognito/private mode — useful for logging in as a different user |
Examples:
bcli auth login # uses profile's auth_method
bcli auth login --method browser # browser OAuth (user's BC permissions, PKCE)
bcli auth login --method device # device code flow
bcli auth login --method client_credentials # service-to-serviceSee Authentication for method details.
Show token cache and keychain status.
bcli auth statusClear cached tokens for the active profile.
bcli auth logoutStore client secret in the OS keychain.
bcli auth store-secretRemove client secret from the OS keychain.
bcli auth delete-secretList available BC environments.
bcli env listSet the default environment. Clears company selection.
bcli env use <environment-name>List all companies in the current environment.
bcli company listSet the default company.
bcli company use <company-id-or-alias>Assign a nickname to a company.
bcli company alias <name> <company-id> [--name <display-name>]Show all configured aliases.
bcli company aliasesList all known endpoints.
bcli endpoint list [--custom] [--standard] [--category <name>]Fuzzy search endpoints.
bcli endpoint search <query>Show detailed metadata for an endpoint.
bcli endpoint info <entity-set-name>Import custom API endpoints.
bcli registry import --from-postman <file.json> [--profile <name>]
bcli registry import --from-json <file.json> [--profile <name>]
bcli registry import --from-metadata [--profile <name>]Show imported registries.
bcli registry listQuery records from an entity.
bcli get <endpoint> [<record-id>] [options]| Option | Description |
|---|---|
--filter <expr> |
OData $filter expression |
--select <fields> |
Comma-separated field names |
--expand <navs> |
Comma-separated navigation properties |
--orderby <expr> |
OData $orderby expression |
--top <n> |
Maximum records to return |
--skip <n> |
Records to skip |
--count |
Include total record count |
--all |
Follow pagination for all records |
--publisher <name> |
Custom API publisher override |
--group <name> |
Custom API group override |
--version <name> |
Custom API version override |
Create a new record.
bcli post <endpoint> --data <json-or-@file> [--publisher ...] [--group ...] [--version ...]Update an existing record.
bcli patch <endpoint> <record-id> --data <json-or-@file> [--etag <tag>] [--publisher ...] [--group ...] [--version ...]Delete a record.
bcli delete <endpoint> <record-id> [--etag <tag>] [--publisher ...] [--group ...] [--version ...]Test auth and API reachability.
bcli test connectionTest authentication only.
bcli test authTest a specific endpoint (GET $top=1).
bcli test endpoint <entity-set-name>Execute a YAML batch file. Supports workflow-style step chaining, parameters, and result capture.
bcli batch run <file.yaml> [options]| Option | Short | Description |
|---|---|---|
--dry-run |
Print resolved requests without executing | |
--output <path> |
-o |
Save full results (all steps + records + metadata) to a JSON file |
--format <fmt> |
-f |
Print each step's returned data inline (table, json, csv, ndjson) |
--set key=value |
Set a workflow parameter (repeatable). Values auto-typed (YAML scalar rules). | |
--params <file> |
Load workflow parameters from a YAML mapping file |
Examples:
# Preview only
bcli batch run workflow.yaml --dry-run
# Run with parameters and save JSON
bcli batch run workflow.yaml --set vendor=V00011 --set month=2026-03 -o results.json
# Run with a params file and print each step's rows as a table
bcli batch run workflow.yaml --params month-end.yaml -f tableSee Batch Operations for step chaining, parameter syntax, and ${{ steps.<id>.data }} references.
Dump LLM-ready usage instructions for the CLI. Useful for priming Claude / agents.
bcli ai-context [--format json|text]Emits a compact reference covering command syntax, OData filter quirks, output formats, and common workflows. Pipe the output into a system prompt or save it as context for LLM agents.
Extract Business Central data via dlt pipelines. Available only when the etl extra is installed (pip install 'bc-cli[etl]').
List entities available for ETL extraction.
bcli etl entities [--include-standard]By default shows only custom API endpoints for the active profile. Pass --include-standard to include the 79 built-in v2.0 entities.
Extract data and load to a dlt destination.
bcli etl sync [options]| Option | Short | Description |
|---|---|---|
--entities <list> |
Comma-separated entity names (default: all custom endpoints) | |
--destination <dest> |
-d |
dlt destination: filesystem, duckdb, iceberg (default: filesystem) |
--dataset <name> |
Dataset name in destination (default: bc_raw) |
|
--pipeline <name> |
Pipeline name for state tracking (default: bcli_etl) |
|
--full-refresh |
Ignore cursor; reload everything | |
--include-standard |
Also sync standard v2.0 entities (skipped by default — usually handled by Fivetran) |
Examples:
bcli etl sync --destination filesystem
bcli etl sync --entities customers,vendors --destination duckdb
bcli etl sync --full-refresh --destination iceberg