Skip to main content
Early Access - The Dcycle CLI is currently available for enterprise customers. Contact us to learn more about access.

Version & Updates

Check Version

Output:

Check for Updates

If an update is available:

Update

JSON Output


Configuration

The CLI stores configuration in a YAML file. View the file location with:

View Configuration

Output of config list:

Get / Set Values

config set validates values before saving:
  • host must be a URL (http:// or https://) or a known alias (production, staging, dev, local)
  • organization_id must be a valid UUID

Clear a Value

Remove a single config value without resetting everything:
Sensitive values (token, api_key) are redacted in the confirmation output.
Use config unset when you need to clear a single value. Use config reset when you want to start fresh.

Reset Configuration

Remove all stored credentials and settings:
This removes your authentication token, API key, and organization settings. You will need to log in again.

Import from Legacy CLI

If you previously used the Python-based dc CLI, import your existing settings:

Environment Management

The CLI supports multiple environments. Switch between them with config host:

List Environments

Output:

Switch Environment

After switching environments, you need to authenticate again for the new host: dcy auth login or set DCYCLE_API_KEY.

Environment Variables

Override config values without modifying the config file. Useful for CI/CD pipelines: Command-line flags always take precedence over environment variables. Use dcy config list to see which environment variables are currently active:

Automatic Retry

The CLI automatically retries failed requests caused by transient server issues: Retry behavior:
  • Up to 3 retries with exponential backoff (1s, 2s, 4s)
  • Transient connection errors (DNS, dial failures) are retried — but timeouts are not
  • Retry attempts are logged to stderr when --verbose is enabled
Since retries are built-in, you don’t need to wrap dcy commands in shell retry loops for transient failures. Shell-level retry is only useful for restarting after non-retryable errors like timeouts.

Health Check

Run dcy doctor to verify your CLI setup is working correctly:
Output:
When environment variables override config file values, doctor reports them:

What it checks

JSON Output

Returns an array of check objects:
dcy doctor returns exit code 1 when any check fails or warns, so you can gate scripts on it: dcy doctor && dcy facility list
Use dcy doctor --json | jq '.[] | select(.status != "ok")' to quickly find issues.

Shell Completions

Enable tab completion for commands, flags, and values.

Bash

Zsh

Fish

PowerShell

Completions include context-aware values — --status suggests valid status values, --type suggests valid types, and --format suggests text or json.

Troubleshooting

Error Format

When a command fails, the CLI prints an error message and a recovery hint:
The hint suggests the most likely recovery action based on the error type. With --json (or --format json), errors are output as structured JSON to stderr:
This lets scripts parse errors consistently:

Token Expired

Wrong Organization

Missing Configuration

Connection Issues

For timeouts, the hint suggests increasing the timeout:
The --verbose flag shows the full HTTP request and response on stderr, which helps diagnose API issues without interfering with JSON output.

Exit Codes

The CLI returns typed exit codes so scripts can distinguish between error categories:

Reset Everything

Next Steps

Authentication

Set up OAuth login or API key authentication

Organizations

Manage organizations and members