CodeGraff is the terminal-first coding agent stack. The public CLI is Graff and the command you run is graff.
The local workflow is built around:
| Tool | Purpose |
|---|---|
graff |
Agent CLI for prompts, shell integration, conversations, providers, logs, commits, and MCP |
codegraff |
Lightweight terminal UI for persistent agent sessions |
codedb |
Local code intelligence and MCP server integration |
zsh : commands |
Fast shell-native prompt routing to Graff |
curl -fsSL https://github.com/justrach/codegraff/releases/latest/download/install.sh | sh- Install
- Quickstart
- What changed in the Graff rename
- Shell
:workflow - Graff CLI
- CodeGraff TUI
- CodeDB and Codex integration
- Agents
- Conversation management
- Git helpers
- Configuration
- MCP
- Legacy Forge compatibility
- Development
Install the latest release:
curl -fsSL https://github.com/justrach/codegraff/releases/latest/download/install.sh | shThe installer places the tools in ~/.local/bin by default:
| Tool | Purpose |
|---|---|
graff |
Main agent CLI |
codegraff |
Terminal UI |
codedb |
Code intelligence CLI, daemon, and MCP server |
fzf |
Picker used by shell workflows |
Make sure ~/.local/bin is on your PATH:
export PATH="$HOME/.local/bin:$PATH"Then restart your shell or run:
exec zshgraff --helpgraff provider logingraff zsh setup
exec zshgraff setup is also available as a short alias for graff zsh setup.
: explain this repositoryIf the : shortcut does not respond, reload the shell and retry:
exec zsh
: hey thereThe user-facing product is now consistently called Graff:
- CLI help, examples, logs, diagnostics, and installer output now use Graff/graff.
- Runtime-visible service identity, MCP client names, commit identity text, and provider display copy were updated to Graff where safe.
- The built-in provider id remains compatible, but provider lists now present it as Graff.
- Shell diagnostics and docs now describe the Graff workflow while preserving legacy setup detection.
architecture.mddocuments the naming rules, compatibility boundaries, and attribution to the original ForgeCode foundation.
Compatibility names that users may already depend on still work. See Legacy Forge compatibility.
The zsh plugin intercepts lines that start with : and routes them to graff. Normal shell commands still run normally.
: summarize this repo # Send a prompt to the active agent
:new # Start a fresh conversation
:new inspect the current git changes # Start fresh and send a prompt
:agent forge # Switch to the implementation agent
:agent muse # Switch to the planning agent
:agent # Pick an agent with fzf
:info # Show current session details
:doctor # Diagnose shell/plugin setupUseful checks:
echo $_FORGE_PLUGIN_LOADED
bindkey '^M'Expected binding:
"^M" forge-accept-line
Some shell internals intentionally keep legacy Forge-compatible names, but the command that runs is graff.
Run an interactive session:
graffRun one prompt and exit:
graff -p "summarize the current project"Pipe a prompt:
echo "what changed in this diff?" | graffStart in a specific directory:
graff -C /path/to/projectUse a specific agent:
graff --agent forge -p "fix the failing tests"
graff --agent muse -p "make an implementation plan"Common commands:
graff info
graff doctor
graff zsh setup
graff logs
graff list agent
graff list model
graff list provider
graff provider login
graff conversation list
graff conversation resume <id>
graff commit --preview
graff suggest "find large log files"Start the lightweight terminal UI:
codegraffFrom source:
cargo run -p codegraff-tui --bin codegraffUse the TUI when you want a persistent terminal interface with tool cards, logs, cancellation, markdown rendering, attachments, and usage visibility.
codedb provides local code intelligence. The CodeDB installer registers it with supported tools, including Codex, as an MCP-backed code intelligence source.
A working Codex registration looks like this in ~/.codex/config.toml:
[mcp_servers.codedb]
command = "/Users/rachpradhan/bin/codedb"
args = ["mcp"]Verify CodeDB:
codedb --helpUseful CodeDB commands:
codedb tree # Show file tree with language and symbol counts
codedb outline README.md # List symbols in a file
codedb find <symbol> # Find where a symbol is defined
codedb search "query text" # Full-text search
codedb word <identifier> # Exact word lookup
codedb hot # Recently modified files
codedb serve # Run HTTP daemon on :7719
codedb mcp # Run MCP server over stdio
codedb update # Self-update CodeDBIf Codex does not see CodeDB, rerun the CodeDB installer through the CodeGraff installer or add the mcp_servers.codedb block above to the Codex config.
Built-in agents available through graff and the : workflow:
| Agent | Alias | Purpose | Modifies files? |
|---|---|---|---|
forge |
default implementation agent | Builds features, fixes bugs, edits files, runs tests | Yes |
muse |
planning agent | Analyzes structure and writes implementation plans | No |
Examples:
: fix the failing tests
:agent forge
: update the zsh setup code
:agent muse
: plan a README cleanup
:agentProject-local agent definitions live in .forge/agents/. The directory name is retained for compatibility with existing agent configuration.
Project-local instructions can be placed in:
AGENTS.md
graff conversation list
graff conversation new
graff conversation resume <id>
graff conversation clone <id>
graff conversation dump <id>
graff conversation compact <id>
graff conversation retry <id>
graff conversation rename <id> <name>
graff conversation delete <id>
graff conversation stats <id>Shell shortcuts:
:new
:conversation
:conversation <id>
:conversation -
:clone
:retry
:dump
:compactGenerate a commit message and commit:
graff commitPreview the commit message first:
graff commit --previewShell shortcuts:
:commit
:commit-previewProvider credentials should be configured interactively:
graff provider loginList providers and models:
graff list provider
graff list modelProvider, model, and MCP configuration should be managed with graff commands where possible.
Common environment variables:
FORGE_BIN=graff # zsh plugin backend command
NERD_FONT=1 # enable Nerd Font prompt iconsManage MCP servers with graff:
graff mcp list
graff mcp import
graff mcp show
graff mcp remove
graff mcp reloadProject-local MCP config:
.mcp.json
Global MCP config still uses the legacy-compatible config directory:
~/.forge/.mcp.json
CodeDB can also run as an MCP server:
codedb mcpThis repository descends from ForgeCode. Graff is the public product name going forward, while selected Forge names remain to preserve compatibility and to acknowledge the original foundation built by the main ForgeCode team.
Keep these legacy surfaces unless a backwards-compatible migration is planned:
FORGE_*environment variables, includingFORGE_BIN.forge,.forge.toml, and~/.forge- internal crate, module, package, and type names such as
forge_main,ForgeConfig, andForgeAPI - the built-in implementation agent id
forge - the VS Code marketplace extension id
ForgeCode.forge-vscode - legacy zsh setup markers used for migration
- generated, distribution, and untracked release artifacts
More detail lives in architecture.md.
Build the CLI:
cargo build -p forge_mainRun the CLI from source:
cargo run -p forge_main --bin graffRun the TUI from source:
cargo run -p codegraff-tui --bin codegraffRun focused zsh plugin tests:
cargo test -p forge_main zsh::pluginRun crate checks:
cargo check -p forge_main
cargo clippy -p forge_main --all-targets -- -D warnings