Skip to main content
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 a $schema pointer that enables editor autocompletion.

Config file locations

Per-project config

Created automatically on first run inside your project:
Commit this file to share provider configuration, MCP servers, and custom instructions with the rest of your team. Sensitive credentials should never go here — use environment variables or the global config instead.

Global config

Applies to all projects on your machine. Bolt looks for the first matching file in your OS 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

The $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:
Manage MCP servers interactively with 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:
Instructions from multiple config files (global + project) are merged and deduplicated automatically.

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:
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: BOLT_CONFIG_CONTENT is especially handy in containerised environments where mounting a file is inconvenient:
Bolt merges configs in this order (later entries win):
  1. Global config file (bolt.jsonc / bolt.json in the OS config dir)
  2. Remote configs fetched from url entries in the global config
  3. Per-project config files (.bolt/bolt.jsonc, .bolt/bolt.json)
  4. BOLT_CONFIG file (if set)
  5. BOLT_CONFIG_CONTENT (if set)
Array fields such as instructions are concatenated across sources rather than replaced. Object fields are deep-merged with later values winning on conflicts.