Environment Variables

CodeCLI behavior can be configured through environment variables. These control authentication, feature flags, experimental features, permissions, network settings, and development options. Environment variables take precedence over configuration files.

iNote
All environment variables are prefixed with CODECLI_ (for CLI-specific settings) or use standard names like API_BASE_URL for server endpoints.

Core

Fundamental configuration variables that control the CLI behavior.

VariableTypeDefaultDescription
CODECLI_CONFIGstring---Path to a specific codecli.json config file to load
CODECLI_CONFIG_DIRstring~/.config/codecliDirectory for configuration files, sessions, and cached data
CODECLI_CONFIG_CONTENTstring---Inline JSON config content (overrides config file). Useful in CI/CD pipelines.
CODECLI_PERMISSIONstringaskDefault permission mode: ask, auto, deny. Controls how tool permissions are handled.
CODECLI_ADD_DIRstring---Colon-separated list of directories to add to the workspace on startup
CODECLI_CLIENTstringautoHTTP client backend: auto, fetch, axios. Controls which HTTP library is used for API calls.

Feature Flags

Disable specific features or default behaviors. All flags are boolean (set to 1 or true to enable).

VariableDefaultDescription
CODECLI_DISABLE_PROJECT_CONFIGfalseDo not read project-level .codecli/config.json or CLAUDE.md files
CODECLI_DISABLE_DEFAULT_PLUGINSfalseDo not load default plugins on startup. Only load explicitly configured plugins.
CODECLI_DISABLE_LSP_DOWNLOADfalsePrevent automatic downloading of LSP servers for code intelligence features
CODECLI_DISABLE_AUTOCOMPACTfalseDisable automatic context compaction when the conversation exceeds the token limit
CODECLI_DISABLE_PRUNEfalseDisable automatic pruning of old sessions and cached data
CODECLI_DISABLE_MODELS_FETCHfalseDo not fetch the latest model list from the server on startup
CODECLI_DISABLE_CLAUDE_CODEfalseDisable the built-in Claude Code integration layer
CODECLI_DISABLE_EXTERNAL_SKILLSfalseDo not load external skills from the skill registry. Only use built-in skills.

Experimental

These variables enable experimental features that may be unstable. Use with caution in production environments.

VariableDefaultDescription
CODECLI_EXPERIMENTALfalseMaster switch to enable all experimental features at once
CODECLI_EXPERIMENTAL_FILEWATCHERfalseEnable real-time file watching for automatic context updates
CODECLI_EXPERIMENTAL_LSP_TOOLfalseEnable the LSP tool for code intelligence (go-to-def, references, etc.)
CODECLI_EXPERIMENTAL_MARKDOWNfalseEnable markdown rendering in the TUI output panel
CODECLI_ENABLE_EXAfalseEnable Exa-powered enhanced web search with deeper result extraction
CODECLI_ENABLE_OFFICEfalseEnable Office document tools (docx, xlsx, pptx read/write)

Permission

Variables that affect security and permission handling. These can bypass or modify the standard permission flow.

VariableTypeDefaultDescription
CODECLI_DANGEROUSLY_SKIP_PERMISSIONSbooleanfalseSkip all tool permission prompts. Tools execute immediately without confirmation. Use only in trusted environments.
CODECLI_BAREbooleanfalseRun in bare mode: no project config, no plugins, no default system prompt additions
CODECLI_APPEND_SYSTEM_PROMPTstring---Append arbitrary text to the system prompt. Useful for adding project-specific instructions.
CODECLI_VAULT_PASSWORDstring---Password for decrypting the secrets vault. Avoid setting this in shell configs -- prefer interactive entry.
Danger
CODECLI_DANGEROUSLY_SKIP_PERMISSIONS bypasses all safety checks. Only use in fully trusted, isolated environments such as CI containers. Never set this on developer workstations.

API and Network

Configure server endpoints and proxy settings.

VariableTypeDefaultDescription
API_BASE_URLstringhttps://api.poly.incBase URL for the Polysystems API server
ACCOUNTS_BASE_URLstringhttps://dev.poly.incBase URL for the Accounts dashboard (auth, billing)
CHAT_BASE_URLstringhttps://chat.poly.incBase URL for the Chat / streaming API
POLY_BUILDstringproductionBuild environment: production, staging, development. Affects API endpoints and logging.
HTTP_PROXYstring---HTTP proxy URL for all HTTP requests (e.g. http://proxy.corp.com:8080)
HTTPS_PROXYstring---HTTPS proxy URL for all HTTPS requests. Takes precedence over HTTP_PROXY for HTTPS calls.

Development

Variables for developing and debugging codecli itself. Not intended for normal use.

VariableTypeDefaultDescription
CODECLI_DEVbooleanfalseEnable development mode with verbose logging, hot reload, and relaxed error handling
CODECLI_FAKE_VCSbooleanfalseSimulate VCS operations without a real git repository. For testing only.
CODECLI_MODELS_URLstring---Override URL for fetching the model catalog
CODECLI_MODELS_PATHstring---Path to a local JSON file to use as the model catalog (bypasses remote fetch)
CODECLI_FFI_LIBstring---Path to a custom FFI native library. Used for testing alternative backends.
PreviousKeyboard ShortcutsNextCLI Flags