docs/cli/configuration.mdx
cn resolves its configuration (models, MCP servers, rules, etc.) from several sources, in this order:
--config flag — a file path passed at launch~/.continue/config.yaml--config flagPoint cn at a local YAML file:
cn --config ./my-config.yaml
This overrides any saved preference for the current session.
Use /config inside a TUI session to switch between available configurations:
> /config
This shows your available local configs. The selection is saved for next time.
config.yamlcn looks for ~/.continue/config.yaml. This file uses the same format as the IDE extensions — see config.yaml reference for the full schema.
Several flags inject configuration at launch without editing a file:
# Add rules (file path or inline string)
cn --rule ./rules/style.md
cn --rule "Always use TypeScript strict mode"
# Load an agent file
cn --agent my-org/pr-reviewer
All of these are repeatable — pass them multiple times to add multiple items.
Store sensitive values (API keys, tokens) as environment variables. Reference them in config with:
${{ secrets.MY_API_KEY }}