Bolt uses a layered configuration system: a global config file for user-wide defaults, and a per-project config file for repository-specific settings. Both files use the JSONC format (JSON with comments), and both are automatically created with aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/bolt-builder/bolt-cli/llms.txt
Use this file to discover all available pages before exploring further.
$schema pointer that enables editor autocompletion.
Config file locations
Per-project config
Created automatically on first run inside your project:Global config
Applies to all projects on your machine. Bolt looks for the first matching file in your OS config directory:Where is the global config directory?
Where is the global config directory?
Bolt follows the XDG Base Directory Specification on Linux and macOS (
~/.config/bolt/) and %APPDATA%\bolt\ on Windows. Run bolt debug config to print the full resolved configuration on your machine.Minimal config example
$schema field enables IntelliSense and validation in editors that support JSON Schema. Bolt writes this field automatically if it is missing.
Configuration reference
provider
Configure provider-specific options such as custom base URLs, region settings, or named credentials:
mcp
Register Model Context Protocol servers that the agent can call as tools:
bolt mcp add, bolt mcp list, bolt mcp auth, and bolt mcp debug.
instructions
Append custom system instructions that are injected into every session. Useful for enforcing coding conventions, style guides, or project-specific rules:
plugin
Load Bolt plugins. Plugins can add new tools, providers, context sources, and hooks:
Remote config via url
Fetch config from a remote URL at startup. Useful for centralised team configuration:
Variable substitution
Config values can reference environment variables using a$VAR_NAME or ${VAR_NAME} syntax. Substitution happens at load time, before the config is parsed:
How do I use environment variables in config?
How do I use environment variables in config?
Reference any environment variable with
$VAR_NAME or ${VAR_NAME} anywhere in a string config value. Bolt substitutes the value at load time. If the variable is not set the literal string $VAR_NAME is used — Bolt does not fail silently or throw an error for missing substitutions.Environment variable overrides
These environment variables let you redirect or override the config entirely, which is useful for CI, containers, and testing:| Variable | Description |
|---|---|
OPENCODE_CONFIG | Absolute path to a config file to load instead of the project-local one |
OPENCODE_CONFIG_DIR | Override the directory that Bolt searches for config files |
OPENCODE_CONFIG_CONTENT | Provide raw JSONC config content as a string — no file needed |
OPENCODE_CONFIG_CONTENT is especially handy in containerised environments where mounting a file is inconvenient:
Which config takes precedence when multiple sources are active?
Which config takes precedence when multiple sources are active?
Bolt merges configs in this order (later entries win):
- Global config file (
bolt.jsonc/bolt.jsonin the OS config dir) - Remote configs fetched from
urlentries in the global config - Per-project config files (
.bolt/bolt.jsonc,.bolt/bolt.json) OPENCODE_CONFIGfile (if set)OPENCODE_CONFIG_CONTENT(if set)
instructions are concatenated across sources rather than replaced. Object fields are deep-merged with later values winning on conflicts.