Installation

Install the GitKB CLI

GitKB is distributed as a single binary. Install it with your preferred method:

Homebrew (macOS)

shell
brew install gitkb/tap/gitkb

Install script (macOS / Linux)

shell
curl -fsSL https://get.gitkb.com/install.sh | bash

mise

Install release builds from GitHub via mise:

shell
mise use github:gitkb/gitkb-releases

Run in your project to record the tool in mise config, or configure globally per mise docs.

Verify installation

shell
git-kb --version

If you use GitKB Desktop with mise, ensure your shell PATH includes mise shims, or choose the git-kb binary in Desktop Settings when the app is launched from Finder.

Initialize a knowledge base

Navigate to your project root and initialize:

shell
cd your-project
git-kb init

This creates a .kb/ directory in your project root with the knowledge base and its configuration.

What’s in .kb/?

text
.kb/
├── .gitignore       # Commits only the shared files below
├── config.toml      # KB configuration
├── AGENTS.md        # Agent guide for this KB
├── rules/           # Shared agent rules (when installed)
├── skills/          # Shared agent skills (when installed)
└── workspaces/      # Pending edits, isolated by Git worktree
    └── main/        # Default checkout workspace

GitKB keeps your committed documents and history in its own local store under .kb/, along with indexes it can rebuild. Edit documents through the checkout workspace, then use git-kb commit to record the changes; leave every other file under .kb/ to GitKB.

The generated .kb/.gitignore commits only .gitignore, config.toml, AGENTS.md, rules/ and skills/ to your Git repository. The store, indexes, locks and workspaces stay local: teammates fetch documents from a remote or rebuild them. Add your own lines at the end of .kb/.gitignore; a later line wins.

Ask GitKB for the current workspace rather than assuming a path, especially in a linked Git worktree:

shell
git-kb workspace resolve --json

Optional: colorized Markdown output

GitKB can pipe git-kb show output through glow for syntax-highlighted, styled Markdown in your terminal.

Install glow via Homebrew or see glow’s install docs for other methods:

shell
brew install glow

Then add to .kb/config.toml:

toml
[pager]
markdown = "glow -p -w 0"

See Configuration for details.

Start using code intelligence immediately

Code intelligence works on any Git repo right after installation — no git-kb init required:

shell
cd your-project
git-kb code index
git-kb code symbols authenticate --json
git-kb code callers authenticate --json

See Code Intelligence for the full command reference, or continue to the Quick Start for the full setup.

Next steps