Add CLI API key authentication documentation (#7887)

* Add CLI API key authentication documentation

* Update docs/guides/cli.mdx

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
Nate Sesti 2025-09-22 13:33:56 -07:00 • committed by GitHub
parent 238d03f0b6
commit e4351e2bf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -87,6 +87,12 @@ cn --ask Bash(curl*)
cn --exclude Fetch
```
## API Key Authentication
For automation in CI or other headless environments, you can use an API key to authenticate with Continue. First, obtain your personal API key [here](https://hub.continue.dev/settings/api-keys). Then, set it as the `CONTINUE_API_KEY` environment variable. You can now use `cn -p` (headless mode) without needing to log in.
If you wish to run an automation on behalf of your organization you can obtain an organization-scoped API key by going to [your organization's settings](https://hub.continue.dev/settings/organizations) -> API Keys.
## Troubleshooting
Run `cn` with the `--verbose` flag to see more detailed logs. These will be output to `~/.continue/logs/cn.log`.