continue-custom/docs/cli/configuration.mdx
Patrick Erichsen f7f3ab7440 refactor: remove checks tab, hub/community refs, and clean up docs nav
- Remove Checks tab and all checks/ pages from docs
- Remove telemetry and CONTRIBUTING pages
- Make IDE Extensions the first/default tab
- Remove About Us/Blog/Changelog sidebar anchors
- Remove "Get Started" navbar link
- Update logo to link to docs instead of continue.dev
- Remove Sign In steps from install page
- Remove remaining Hub tabs from model roles docs
- Remove GitHub Discussions/community references
- Remove Authentication in CI section from headless mode
- Clean up CLI configuration to remove hub/org references
- Remove getting-started/extensions.mdx (dead redirect)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 14:25:58 -07:00

56 lines
1.4 KiB
Text

---
title: "Configuration"
---
`cn` resolves its configuration (models, MCP servers, rules, etc.) from several sources, in this order:
1. **`--config` flag** — a file path passed at launch
2. **Saved config** — the last-used configuration, persisted across sessions
3. **Default** — `~/.continue/config.yaml`
## `--config` flag
Point `cn` at a local YAML file:
```bash
cn --config ./my-config.yaml
```
This overrides any saved preference for the current session.
## Switching at runtime
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.yaml`
`cn` looks for `~/.continue/config.yaml`. This file uses the same format as the IDE extensions — see [config.yaml reference](/customize/deep-dives/configuration) for the full schema.
## CLI-specific flags
Several flags inject configuration at launch without editing a file:
```bash
# 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.
## Secrets
Store sensitive values (API keys, tokens) as environment variables. Reference them in config with:
```yaml
${{ secrets.MY_API_KEY }}
```