# documentation

Docs

Everything you need to get Bolt running and configured. Short version: install it, run bolt in a project, start typing.

Installation

Bolt ships as a single global binary on npm. Use the shell installer on macOS and Linux, or the package manager you already have.

# npm (any platform)
$npm i -g @bolt-builder/bolt-cli
# shell installer (macOS / Linux)
$curl -fsSL https://raw.githubusercontent.com/bolt-builder/bolt-cli/dev/install | bash
# bun / pnpm / yarn
$bun add -g @bolt-builder/bolt-cli

First run

From any project directory. Bolt picks up your project context automatically.

$terminal
# Open the TUI in the current directory
bolt

# Run a prompt directly (non-interactive)
bolt run "explain this codebase"

# Attach to a running server (local or remote)
bolt attach

# Start a session with a specific agent
bolt run --agent ask "what does this project do?"

Configuration

Configuration lives in .bolt/bolt.jsonc in your project root, created on first run. It's JSONC, so comments are fine.

$.bolt/bolt.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    // Provider config goes here
  },
}

Schema: https://opencode.ai/config.json

Environment variables

VariableDescription
BOLT_<CONFIG_KEY>Override any config key (BOLT_MODEL, BOLT_THEME, ...), typo-checked
BOLT_PROFILESelect a named config profile
BOLT_LOG_LEVELLog level: DEBUG, INFO, WARN, ERROR
BOLT_PRINT_LOGSPrint logs to stderr
BOLT_PURERun without external plugins
BOLT_SERVER_PASSWORDBasic auth password for the server
BOLT_SERVER_USERNAMEBasic auth username for the server

CLI reference

All 86 commands. Run any of them with --help for flags.

CommandDescription
completiongenerate shell completion script (pass 'fish' for fish)
acpstart ACP (Agent Client Protocol) server
mcpmanage MCP (Model Context Protocol) servers
attachattach to a running bolt server
runrun bolt with a message
askask a one-shot question and print only the answer to stdout
arenarace agents on the same task in isolated worktrees and keep the best result
initinitialize bolt config, agents, and commands for a project
debugdebugging and troubleshooting tools
configinspect and manage configuration
providersmanage AI providers and credentials [aliases: auth]
agentmanage agents
upgradeupgrade bolt to the latest or a specific version [aliases: update]
uninstalluninstall bolt and remove all related files
servestarts a headless bolt server
daemonkeep a warm bolt server running so one-shot commands skip boot
warmpre-load project context and prompt cache before you start typing
webstart bolt server and open web interface
modelslist all available models
statsshow token usage and cost statistics
evalrun agent evaluation cases and grade the results
logsprint the agent log
mapdraw a markdown + mermaid map of source directory dependencies
archdetect imports that violate the declared module contract
migrategenerate a major-version upgrade playbook for a dependency
depsreport outdated, vulnerable, deprecated, and abandoned dependencies
diff-gatereview a diff from stdin and exit 1 when defects reach a severity threshold
ownersmap directory ownership from git history and CODEOWNERS
hotspotsflag files with high churn and high complexity for refactoring
packagesmap the monorepo package graph and its build order
apidiff the exported API surface against a git ref
indexbuild an incrementally updated whole-repo vector index and query it
deadfind unused exports ranked by deletion safety
dupesfind near-identical code blocks across the repo
execrun a markdown playbook of steps non-interactively, stopping on the first failure
exportexport session data as JSON, markdown, JSONL, or an HTML replay
importimport session data from JSON file or URL
githubmanage GitHub agent
prfetch and checkout a GitHub PR branch, then run bolt
pushpush a session to a bolt server on another machine
pullpull a session from a bolt server on another machine
stacksplit the current branch into an ordered stack of reviewable branches
commitcommit staged changes with a generated message
commitlintlint commit messages against this repo's own conventions
portport a fix onto other branches with cherry-pick
splitsplit a messy worktree into logical commits with the agent
reviewreview code changes with the code-review agent
blastestimate the blast radius of pending changes
undoroll back the last agent turn (files and conversation)
analyzerun lint, typecheck, and dead-code checks over the current diff before handoff
checkpointsave and rewind named checkpoints
rebaseplan an interactive rebase with the agent and explain every decision
invariantsstate invariants before a refactor and verify them after
resolveresolve merge conflicts by intent with the agent
codemodgenerate an ast-grep transform, preview the diff, and apply it with --apply
assertsfind tests with missing or weak assertions and suggest better ones
pipelinerun a plan, code, review agent pipeline on a task
refactorrefactor with a test-verified loop: change, run, verify, repeat until green
tightenfind loose types in changed code and propose stricter ones
learnlearn this repository's conventions into project memory
driftflag READMEs and comments that the current diff just made stale
memoryinspect project memory
watchrerun a command on every file change, optionally fixing failures with the agent
jobsmanage background jobs started with run --background
cronschedule recurring agent chores (dependency bumps, triage, drafts)
flakydetect flaky tests by rerunning a command, and quarantine offenders
proptestgenerate property-based tests for the pure functions in a file
guardgenerate a failing regression test from a bug description before fixing it
mutatemutate a file and rerun the tests to prove they catch bugs
muxrun parallel bolt sessions in tmux split panes
bisectfind the commit that broke a command, show blame, and propose a fix
batchrun a queue of prompts sequentially or in parallel with a summary table
whyanswer when and why a behavior changed, with commit evidence
benchbenchmark a command on this change and on the base ref, and flag regressions
figmagenerate components from a Figma design node
pairshare a live session between two terminals
sessionmanage sessions [aliases: sessions]
resumeresume a session, with a fuzzy picker when no id is given
grepfull-text search across every session transcript on disk
tagtag a session (alias of session tag)
forkfork a session at any message and continue down a different path
submodulesreport submodule drift and bring submodules in sync
worktreecreate, list, and clean agent worktrees
plugininstall plugin and update config [aliases: plug]
dbdatabase tools
aliaslist aliases, show one, or set one with name="expansion"