Skip to content

Context

context gives agents and humans one command for the repository facts they usually gather with many shell calls.

It has two producers:

  • context git for branch, PR, working-tree, diff, and recent-commit context.
  • context stack for deterministic language, ecosystem, tooling, and framework detection.

The same producers are exposed through context mcp, so agent harnesses can call git_context, stack_context, command_help, and opencode_debug as MCP tools.

On Arch, install the context-git AUR package:

Terminal window
yay -S context-git

Build the binary locally with Bun:

Terminal window
bun install
bun run build

The compiled binary is written to dist/context.

Terminal window
context git
context git --json
context stack
context stack --json
context mcp

Generic CLI and MCP behaviour lives here. OpenCode plugins that inject this context into sessions live in timmo001/opencode-config, with dotfiles-specific integration notes in the dotfiles docs.