Configuration
Config precedence
Section titled “Config precedence”The CLI resolves settings in this order (highest priority first):
- CLI flags —
--api-key - Environment variables —
ANCLA_API_KEY - Local config —
.ancla/config.yamlin the current directory or any parent - Global config —
~/.ancla/config.yaml
Config file format
Section titled “Config file format”api_key: ancla_your_key_herePer-project config
Section titled “Per-project config”Create a .ancla/config.yaml in your project root to override global settings for that project. The CLI walks up from the current working directory looking for a .ancla/ directory.
mkdir .anclaecho 'api_key: ancla_project_specific_key' > .ancla/config.yamlThis is useful for using different API keys per project or workspace.
Managing settings
Section titled “Managing settings”View current settings
Section titled “View current settings”ancla settings showAPI keys are masked in output.
Set a value
Section titled “Set a value”ancla settings set api_key ancla_your_key_hereOpen in editor
Section titled “Open in editor”ancla settings editOpens the config file in $EDITOR (defaults to vi).
Show config file paths
Section titled “Show config file paths”ancla settings pathShows both the global and local (if found) config file locations.