GitKB Documentation
GitKB is a local-first knowledge graph for Markdown documents and source code. Create a document, check it out, edit it, commit the change, and sync the documents you need with a remote.
Document history is tracked per document. A commit can change several documents, and each change points to the prior commit for that document. You can hold a small subset of a knowledge base without cloning every document or its unrelated history.
How it fits together
flowchart LR
People["You and your agents"] --> Tools["CLI, Desktop and MCP"]
Tools --> Daemon["Local GitKB daemon"]
Daemon --> KB["Your knowledge base"]
Daemon --> Intel["Code intelligence"]
Code["Your code"] --> Intel
KB <--> Remote["Your team's remote"]- Documents: specs, tasks, decisions and the rest are Markdown files with a little frontmatter, linked to each other and to your code.
- History: every change is a commit, so you can see who changed what, when and why, and return to any version.
- Agents: any agent that can use a CLI or MCP reads and writes the same knowledge you do.
- Daemon: a local GitKB daemon keeps your knowledge base and code index current, and serves both to the CLI, Desktop and MCP. See Daemon.
- Code intelligence: GitKB indexes your code, so you and your agents can see callers, call paths and the reach of a change.
- Sharing: push to a remote when your team needs it, pull the slices you select, and check out only the documents you need.
Local work and collaboration
Everything works locally and offline, with no account or server. When your team needs it, push to a remote, on GitKB.com or your own infrastructure, pull the slices you select, and check out only what you need. Knowledge keeps its own history, separate from your code’s Git history, so document edits never clutter code diffs.
Optional local embeddings add semantic search across documents and code.
Quick overview
Documents
Everything in GitKB is a document with YAML frontmatter and Markdown content:
---
slug: tasks/my-feature
title: "Add user authentication"
type: task
status: active
tags: [feature, auth]
---
## Overview
What this task accomplishes and why it exists.
## Acceptance Criteria
- [ ] JWT-based auth flow
- [ ] Session management
- [ ] Tests passingDocuments have types (task, spec, incident, note, context), statuses, tags, and relationships to other documents via [[wikilinks]].
The knowledge graph
Documents link to each other through wikilinks, frontmatter references, and code symbols — forming a knowledge graph you can query:
git-kb graph tasks/my-feature --direction bothMCP integration
Connect GitKB to your editor and AI assistants gain full access:
{
"mcpServers": {
"gitkb": {
"command": "git-kb",
"args": ["mcp"]
}
}
}The first store-backed tool call connects to the daemon and starts it if needed. MCP initialization and tool discovery can complete before the daemon starts.
Next steps
Install GitKB and set up your first knowledge base.
Quick StartCreate your first documents and explore the CLI.
MCP SetupConnect GitKB to Claude Code, Cursor, and other editors.
Agent Harnesses & SkillsCompare Claude Code, Codex, Cursor, Windsurf, and MCP clients.
Core ConceptsUnderstand documents, the knowledge graph, and code intelligence.
Migration & AdoptionAdd GitKB to an existing project and roll it out to your team.
ConfigurationCustomize remotes, embeddings, code indexing, and more.