PLEASE, PLEASE actually DESCRIBE how to use environment variables to pass in an api key to, say, OpenAI tools
Issue Category
Undocumented feature or missing documentation
Affected Documentation Page URL
https://docs.continue.dev/faqs#managing-local-secrets-and-environment-variables
Issue Description
This page anchor LITERALLY talks about environment variables. BUT you NEVER actually tell us HOW to access the environment variables.
eg. Ive added OPENAI_API_KEY to my shell environment. But Continue never sees it. It never accesses my API key.
I've wasted HOURS trying to figure this out. Please just put it in your documentation
Expected Content
I expect details on how to use environment variables with my API key in them, to be used by Continue
Related issues:
- #8158 - Cannot use Cloudflare model as environment variable (specific bug with
@character in env vars) - #1729 - Storing API keys in plain text (security concerns about config storage)
- #8484 - Multiple local configs is not explained clearly (confusion about config file structure and secrets)
- #8166 - docs: clarify secrets vs inputs syntax usage (PR that clarified
${{ secrets.X }}vs${{ inputs.X }}) - #8533 - Missing explanation and example for on premise proxy (related to secrets management)
The documentation does exist in the FAQs (https://docs.continue.dev/faqs#managing-local-secrets-and-environment-variables) but may need to be more prominently featured or cross-referenced in the model provider documentation.
The documentation does NOT exist for how to use an environment variable of OPENAI_API_KEY in Continue.
All that faq page does is mention things about .env.
Which is NOT an environment variable. At least in terms of a value that can be returned using
In Windows
echo $env:OPENAI_API_KEY
Hi @normancates,
- for the CLI you can pass them in like a normal terminal experience e.g. macos
export OPENAI_API_KEY=xxxx && cn. This will NOT work in vscode or jetbrains - for the extensions you can put them in
.envfiles in the workspace root, or in.continuein the workspace or the global~/.continuefolder - You can also add them as secrets in the Continue hub if you are signed in
References at https://docs.continue.dev/faqs#managing-local-secrets-and-environment-variables:
When interpolating the environment variables within an MCP server config:
From my experience there seems to be a discrepancy in the documentation. I am using a locally placed .env file at the project root level.