Skip to content

config

The config command provides subcommands for managing your clanker configuration. This includes initializing a default configuration file, viewing the current configuration, and scanning your system for available cloud credentials and API keys.

Usage

bash
clanker config <subcommand> [flags]

Subcommands

config init

Create a default configuration file at ~/.clanker.yaml. If a configuration file already exists at that path, the command will notify you and leave the existing file untouched.

The generated file includes commented-out sections for all supported providers and services, giving you a starting template that you can customize for your environment.

bash
clanker config init

Example:

bash
$ clanker config init
Configuration file created at /home/user/.clanker.yaml
Please edit the file to add your AI provider API key.

The default configuration includes template sections for:

  • AI providers: OpenAI, Anthropic (Claude), Gemini, AWS Bedrock, DeepSeek, Cohere, MiniMax, GitHub Models
  • Infrastructure providers: AWS (with multiple environment profiles), GCP
  • GitHub: Repository configuration and token
  • PostgreSQL: Database connection definitions
  • Terraform: Workspace paths and descriptions
  • Codebase: Paths for code analysis
  • General settings: Timeout values

config show

Display the contents of your current configuration file. This reads and prints the raw YAML from ~/.clanker.yaml. If no configuration file exists, it will prompt you to run config init.

bash
clanker config show

Example:

bash
$ clanker config show
Configuration file: /home/user/.clanker.yaml

# Clanker Configuration
ai:
  default_provider: openai
  providers:
    openai:
      model: gpt-5
      api_key_env: OPENAI_API_KEY
...

config scan

Scan your local system for available cloud provider credentials, CLI tools, and LLM API keys. This command checks default and custom file paths, environment variables, and installed CLIs to give you a comprehensive view of what credentials are available for use with clanker.

The scan covers:

  • AWS: Profiles from ~/.aws/credentials and ~/.aws/config
  • GCP: Application Default Credentials, gcloud CLI, and project configurations
  • Azure: Azure CLI availability and subscription list
  • Cloudflare: API token and account ID from environment variables
  • DigitalOcean: API token and doctl CLI availability
  • Hetzner: API token and hcloud CLI availability
  • LLM API keys: OpenAI, Anthropic, Gemini, DeepSeek, Cohere, and MiniMax
bash
clanker config scan [flags]

Flags

FlagShortTypeDefaultDescription
--output-ostring(table)Output format. Use json for machine-readable output
--aws-paths[]stringCustom AWS credential file paths to scan (comma-separated)
--gcp-paths[]stringCustom GCP credential file paths to scan (comma-separated)
--cloudflare-env[]stringCustom Cloudflare environment variable keys to check (comma-separated)
--llm-env[]stringCustom LLM API key environment variables to check (comma-separated)

Examples:

bash
# Run a full credential scan with human-readable output
clanker config scan

# Output scan results as JSON
clanker config scan -o json

# Scan additional AWS credential files
clanker config scan --aws-paths ~/.custom/aws-creds,~/.another/credentials

# Scan custom GCP credential paths
clanker config scan --gcp-paths ~/.config/gcloud/custom-creds.json

# Check custom LLM environment variable names
clanker config scan --llm-env MY_OPENAI_KEY,MY_ANTHROPIC_KEY

# Check custom Cloudflare environment variables
clanker config scan --cloudflare-env CF_TOKEN,MY_CF_ACCOUNT_ID

Sample output (table format):

=== System Credentials Scan ===

AWS Profiles:
  - default [us-east-1] (credentials)
  - production [us-west-2] (config)
  - staging [eu-west-1] (config)

GCP:
  Application Default Credentials: Found at /home/user/.config/gcloud/application_default_credentials.json
  gcloud CLI: true
  Projects: my-project-123

Azure:
  az CLI: true
  Subscriptions:
    - My Subscription (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) (default)

Cloudflare:
  API Token (env): true
  Account ID (env): true

Digital Ocean:
  API Token (env): false
  doctl CLI: false

Hetzner Cloud:
  API Token (env): false
  hcloud CLI: false

LLM API Keys (from environment):
  OpenAI: true
  Anthropic: true
  Gemini: false
  DeepSeek: false
  Cohere: false
  MiniMax: false

Typical Setup Workflow

A common workflow for setting up clanker on a new machine:

bash
# 1. Initialize the configuration file
clanker config init

# 2. Scan the system to see what credentials are already available
clanker config scan

# 3. Edit the config file to match your environment
#    (use the scan output to identify which profiles and keys to configure)
nano ~/.clanker.yaml

# 4. Verify the final configuration
clanker config show

See Also