Skip to content
CLI Configuration

CLI Configuration

The DCM CLI (dcm) connects to the DCM API gateway to manage resources. It can be configured through command-line flags, environment variables, or a configuration file.

For installation instructions, see Setting Up the CLI.

Configuration File

The CLI reads its configuration from ~/.dcm/config.yaml by default. Here is an example with all available fields:

api-gateway-url: http://localhost:9080
output-format: table
timeout: 30
tls-ca-cert: ""
tls-client-cert: ""
tls-client-key: ""
tls-skip-verify: false

Configuration Priority

Settings are resolved in the following order (highest priority first):

  1. Command-line flags
  2. Environment variables (prefixed with DCM_)
  3. Configuration file
  4. Built-in defaults

Global Flags

The following flags are available on all commands:

FlagShortDefaultDescription
--api-gateway-urlhttp://localhost:9080URL of the DCM API gateway
--output-otableOutput format (table, json, yaml)
--timeout30Request timeout in seconds
--config~/.dcm/config.yamlPath to configuration file

TLS Configuration

To connect to a TLS-secured API gateway, use the following flags:

FlagDescription
--tls-ca-certPath to CA certificate file for TLS verification
--tls-client-certPath to client certificate file for mutual TLS
--tls-client-keyPath to client private key file for mutual TLS
--tls-skip-verifySkip TLS certificate verification (not recommended for production)

Output Formats

All commands support three output formats via the -o flag:

  • table (default) — Human-readable tabular output.
  • json — Structured JSON output, useful for scripting and automation.
  • yaml — YAML output.

For example, to list providers as JSON:

dcm sp provider list -o json

Shell Completion

Generate shell completion scripts with the dcm completion command:

# Bash
source <(dcm completion bash)

# Zsh
source <(dcm completion zsh)

# Fish
dcm completion fish | source

# PowerShell
dcm completion powershell | Out-String | Invoke-Expression

To make completion persistent, add the appropriate command to your shell profile (e.g., ~/.bashrc, ~/.zshrc).