# Complete Guide to Continue Dev Environment Variables: Configuration, API Keys, and CLI Settings

> Discover how to configure Continue Dev environment variables for API keys, CLI settings, and more. Master Continue Dev without editing config files for seamless integration.

- Repository: [Continue/continue](https://github.com/continuedev/continue)
- Tags: how-to-guide
- Published: 2026-06-18

---

**Continue Dev supports over 30 environment variables that control API authentication, CLI output limits, network proxies, telemetry, and feature flags without modifying config files.**

The `continuedev/continue` repository uses environment variables as the primary mechanism for runtime configuration across its CLI, VS Code extension, and core SDK. Whether you are providing LLM provider credentials in CI, limiting output lengths for automation, or routing traffic through corporate proxies, these variables allow you to customize behavior without touching the codebase.

## LLM Provider API Keys

Continue reads standard API keys for major model providers directly from the environment. These are typically checked in the OpenAI adapters test suite and core SDK initialization.

- **`OPENAI_API_KEY`** – Authenticates requests to OpenAI models. Referenced in [`packages/openai-adapters/src/test/vercel-sdk.test.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/test/vercel-sdk.test.ts).
- **`ANTHROPIC_API_KEY`** – Required for Claude model access. Found in [`packages/openai-adapters/src/test/vercel-sdk.test.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/test/vercel-sdk.test.ts).
- **`GEMINI_API_KEY`** – Google Gemini authentication. Defined in [`packages/openai-adapters/src/test/main.test.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/test/main.test.ts).
- **`MISTRAL_API_KEY`** – For Mistral AI models. Located in [`packages/openai-adapters/src/test/main.test.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/test/main.test.ts).
- **`VOYAGE_API_KEY`** – Voyage AI embedding models. Source: [`packages/openai-adapters/src/test/main.test.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/test/main.test.ts).
- **`AZURE_OPENAI_GPT41_API_KEY`** – Specific to Azure OpenAI GPT-4.1 deployments. Found in [`packages/openai-adapters/src/test/main.test.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/test/main.test.ts).
- **`RELACE_API_KEY`** and **`INCEPTION_API_KEY`** – Experimental provider keys accessed in [`packages/openai-adapters/src/test/main.test.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/test/main.test.ts).

Set these in your shell or CI environment before running Continue:

```bash
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GEMINI_API_KEY="..."

```

## Continue-Specific Configuration

The SDK and CLI expose dedicated variables for Continue's proxy service and global directory management.

- **`CONTINUE_API_KEY`** – Primary key for the Continue proxy service, validated in [`packages/continue-sdk/typescript/tests/continue.test.ts`](https://github.com/continuedev/continue/blob/main/packages/continue-sdk/typescript/tests/continue.test.ts).
- **`CONTINUE_GLOBAL_DIR`** – Overrides the default `~/.continue` directory for configuration and indexing. Useful for CI or isolated testing environments. Implemented in [`extensions/cli/vitest.global-dir-setup.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/vitest.global-dir-setup.ts).
- **`CONTINUE_USE_AI_SDK`** – Forces the SDK to use the new AI-SDK layer when set. Checked in [`packages/openai-adapters/src/index.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/index.ts).
- **`CONTINUE_PROJECT_DIR`** – Exported to child processes pointing to the current workspace root. Found in [`extensions/cli/src/hooks/hookRunner.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/hooks/hookRunner.ts).
- **`CLAUDE_PROJECT_DIR`** – Mirrors `CONTINUE_PROJECT_DIR` for Claude-specific tooling integrations.

Example for CI isolation:

```bash
export CONTINUE_GLOBAL_DIR="/tmp/continue-ci"
export CONTINUE_API_KEY="proxy-key-123"

```

## CLI Output and Execution Limits

When running the Continue CLI in automated environments, you can enforce strict limits on tool outputs to prevent token overflow or excessive logging.

- **`CONTINUE_CLI_FETCH_MAX_OUTPUT_LENGTH`** – Caps data returned from fetch commands. Source: [`extensions/cli/src/tools/fetch.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/tools/fetch.ts).
- **`CONTINUE_CLI_BASH_MAX_OUTPUT_CHARS`** and **`CONTINUE_CLI_BASH_MAX_OUTPUT_LINES`** – Restrict bash command output. Implemented in [`extensions/cli/src/tools/runTerminalCommand.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/tools/runTerminalCommand.ts).
- **`CONTINUE_CLI_READ_FILE_MAX_OUTPUT_CHARS`** and **`CONTINUE_CLI_READ_FILE_MAX_OUTPUT_LINES`** – Limit file reading operations. Found in [`extensions/cli/src/tools/readFile.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/tools/readFile.ts).
- **`CONTINUE_CLI_SEARCH_CODE_MAX_RESULTS`** and **`CONTINUE_CLI_SEARCH_CODE_MAX_RESULT_CHARS`** – Bound search results. Source: [`extensions/cli/src/tools/searchCode.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/tools/searchCode.ts).
- **`CONTINUE_CLI_DIFF_MAX_OUTPUT_LENGTH`** – Truncates diff command output. Located in [`extensions/cli/src/tools/viewDiff.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/tools/viewDiff.ts).

Usage in automation scripts:

```bash
CONTINUE_CLI_FETCH_MAX_OUTPUT_LENGTH=5000 \
CONTINUE_CLI_BASH_MAX_OUTPUT_LINES=100 \
CONTINUE_CLI_SEARCH_CODE_MAX_RESULTS=10 \
continue run analysis.ts

```

## Network Proxy and Certificate Configuration

For corporate environments or debugging, Continue respects standard proxy variables and custom certificate bundles.

- **`HTTPS_PROXY`**, **`https_proxy`**, **`HTTP_PROXY`**, **`http_proxy`** – Proxy configuration for outbound HTTP(S) calls. Parsed in [`packages/fetch/src/util.ts`](https://github.com/continuedev/continue/blob/main/packages/fetch/src/util.ts).
- **`NO_PROXY`**, **`no_proxy`** – Hosts that bypass the proxy. Checked in [`packages/fetch/src/util.ts`](https://github.com/continuedev/continue/blob/main/packages/fetch/src/util.ts).
- **`NODE_EXTRA_CA_CERTS`** – Path to custom CA bundles for SSL validation. Used in [`packages/fetch/src/certs.ts`](https://github.com/continuedev/continue/blob/main/packages/fetch/src/certs.ts).
- **`VERBOSE_FETCH`** – Enables detailed HTTP request logging for debugging. Implemented in [`packages/fetch/src/fetch.ts`](https://github.com/continuedev/continue/blob/main/packages/fetch/src/fetch.ts).
- **`FEATURE_FLAG_DISABLE_CUSTOM_FETCH`** – Disables the custom fetch wrapper when set. Found in [`packages/openai-adapters/src/util.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/util.ts).

Debug network issues:

```bash
export VERBOSE_FETCH=1
export HTTPS_PROXY="http://proxy.company.com:8080"
export NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-bundle.pem"
continue chat "Debug this API call"

```

## Telemetry and Privacy Controls

Continue provides granular control over data collection and user identification.

- **`CONTINUE_CLI_ENABLE_TELEMETRY`** – Set to `0` to disable CLI telemetry; any other value enables it (default enabled). Source: [`extensions/cli/src/telemetry/telemetryService.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/telemetry/telemetryService.ts).
- **`CONTINUE_ALLOW_ANONYMOUS_TELEMETRY`** – Legacy flag for anonymous telemetry control. Found in [`extensions/cli/vitest.setup.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/vitest.setup.ts).
- **`CONTINUE_METRICS_ENABLED`** – `"0"` disables all metric collection, `"1"` enables it. Overrides other telemetry flags when set. Located in [`extensions/cli/src/telemetry/telemetryService.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/telemetry/telemetryService.ts).
- **`CONTINUE_USER_ID`** – Manually assigns a persistent user identifier instead of deriving it from the machine. Implemented in [`extensions/cli/src/util/uniqueId.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/util/uniqueId.ts).

Disable tracking completely:

```bash
CONTINUE_CLI_ENABLE_TELEMETRY=0 \
CONTINUE_ALLOW_ANONYMOUS_TELEMETRY=0 \
CONTINUE_METRICS_ENABLED=0 \
continue chat "Hello"

```

## Testing and Development Flags

Internal and testing environments use specific flags to alter behavior.

- **`CONTINUE_CLI_TEST`** – Puts the CLI into test mode, disabling interactive prompts and side effects. Checked in [`extensions/cli/src/util/stdin.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/util/stdin.ts).
- **`CONTINUE_REMOTE`** – Signals remote execution (e.g., CI), disabling certain interactive behaviors. Found in [`extensions/cli/src/util/git.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/util/git.ts).
- **`CONTINUE_CLI_AUTO_UPDATED`** – Prevents repeated auto-updates in the same session. Source: [`extensions/cli/src/services/UpdateService.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/services/UpdateService.ts).
- **`CONTINUE_E2E_NON_NEXT_EDIT_TEST`** – Toggles special test modes for VS Code end-to-end suites. Located in [`extensions/vscode/src/extension/VsCodeExtension.ts`](https://github.com/continuedev/continue/blob/main/extensions/vscode/src/extension/VsCodeExtension.ts).
- **`IGNORE_API_KEY_TESTS`** – Skips tests requiring live API keys when set to `"true"`. Found in [`packages/openai-adapters/src/test/main.test.ts`](https://github.com/continuedev/continue/blob/main/packages/openai-adapters/src/test/main.test.ts).
- **`IS_BINARY`** – Internal flag indicating the process runs as a packaged binary. Used in [`packages/fetch/src/certs.ts`](https://github.com/continuedev/continue/blob/main/packages/fetch/src/certs.ts).

CI testing configuration:

```bash
CONTINUE_CLI_TEST=1 \
CONTINUE_REMOTE=1 \
IGNORE_API_KEY_TESTS=true \
npm test

```

## Feature Flags and Provider Selection

Toggle specific functionality without code changes.

- **`CONTINUE_USE_BEDROCK`** – When set to `"1"`, automatically selects AWS Bedrock during onboarding. Implemented in [`extensions/cli/src/onboarding.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/onboarding.ts).
- **`CONTINUE_CLI_DISABLE_COMMIT_SIGNATURE`** – Skips GPG signing for commits when set. Found in [`extensions/cli/src/systemMessage.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/systemMessage.ts).

Force Bedrock selection:

```bash
export CONTINUE_USE_BEDROCK=1
continue chat "Generate Terraform for AWS"

```

## Summary

- **API Authentication**: Set `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`, and provider-specific keys to authenticate LLM requests without hardcoding credentials.
- **Output Control**: Use `CONTINUE_CLI_*_MAX_*` variables to limit fetch, bash, file read, and search output lengths in automation.
- **Network Configuration**: Configure `HTTPS_PROXY`, `NODE_EXTRA_CA_CERTS`, and `VERBOSE_FETCH` for corporate proxies and debugging.
- **Privacy**: Disable telemetry with `CONTINUE_CLI_ENABLE_TELEMETRY=0` and `CONTINUE_METRICS_ENABLED=0`.
- **Testing**: Enable `CONTINUE_CLI_TEST` and `CONTINUE_REMOTE` for CI environments to suppress interactive prompts.

## Frequently Asked Questions

### What is the difference between CONTINUE_API_KEY and OPENAI_API_KEY?

`OPENAI_API_KEY` authenticates directly with OpenAI's API, while `CONTINUE_API_KEY` is used specifically for the Continue proxy service as implemented in [`packages/continue-sdk/typescript/tests/continue.test.ts`](https://github.com/continuedev/continue/blob/main/packages/continue-sdk/typescript/tests/continue.test.ts). The proxy key allows you to route requests through Continue's infrastructure rather than calling providers directly.

### How do I disable telemetry in the Continue CLI?

Set `CONTINUE_CLI_ENABLE_TELEMETRY=0` and `CONTINUE_METRICS_ENABLED=0` before running commands. According to [`extensions/cli/src/telemetry/telemetryService.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/src/telemetry/telemetryService.ts), these variables completely disable metric collection and telemetry transmission. You can also set `CONTINUE_ALLOW_ANONYMOUS_TELEMETRY=0` for legacy compatibility.

### How do I configure Continue to work behind a corporate proxy?

Export `HTTPS_PROXY` (or lowercase `https_proxy`) with your proxy URL, and if needed, `NODE_EXTRA_CA_CERTS` pointing to your custom CA bundle. The fetch utility in [`packages/fetch/src/util.ts`](https://github.com/continuedev/continue/blob/main/packages/fetch/src/util.ts) reads these variables for proxy routing, while [`packages/fetch/src/certs.ts`](https://github.com/continuedev/continue/blob/main/packages/fetch/src/certs.ts) handles the custom certificates.

### What is CONTINUE_GLOBAL_DIR used for?

`CONTINUE_GLOBAL_DIR` overrides the default `~/.continue` directory where the CLI stores configuration, indexes, and session data. This is essential for CI pipelines or ephemeral environments where you want to isolate Continue's state or point it to a pre-configured directory, as demonstrated in [`extensions/cli/vitest.global-dir-setup.ts`](https://github.com/continuedev/continue/blob/main/extensions/cli/vitest.global-dir-setup.ts).