Installation
Install the GitKB CLI
GitKB is distributed as a single binary. Install it with your preferred method:
Homebrew (macOS)
brew install gitkb/tap/gitkbInstall script (macOS / Linux)
curl -fsSL https://get.gitkb.com/install.sh | bashmise
Install release builds from GitHub via mise:
mise use github:gitkb/gitkb-releasesRun in your project to record the tool in mise config, or configure globally per mise docs.
Verify installation
git-kb --versionIf 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:
cd your-project
git-kb initThis creates a .kb/ directory in your project root with the knowledge base and its configuration.
What’s in .kb/?
.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 workspaceGitKB 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:
git-kb workspace resolve --jsonOptional: 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:
brew install glowThen add to .kb/config.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:
cd your-project
git-kb code index
git-kb code symbols authenticate --json
git-kb code callers authenticate --jsonSee Code Intelligence for the full command reference, or continue to the Quick Start for the full setup.
Next steps
- Quick Start — Create and sync project documents
- Code Intelligence — Start with code intelligence alone