A CLI for sharing knowledge across a dev team. Entries are markdown in a git repo, searchable via SQLite FTS5, and accessible to AI agents through MCP.
git clone https://github.com/vraspar/brain.git
cd brain && npm install && npm run build && npm link
Requires Node.js 20+ and git.
brain init --name "My Team" # create a brain
brain connect <url> # or join an existing one
brain push ./guide.md # publish an entry
brain push ./docs/*.md # batch import
brain ingest https://github.com/team/repo # import from another repo
brain search "kubernetes" # full-text search
brain digest # what's new
brain edit k8s-guide --add-tag helm # update metadata
brain open k8s-guide # open in $EDITOR
brain status # brain health dashboard
brain trail kubernetes # follow connected entries
brain prune --dry-run # find stale content
All commands support --format json. Run brain <command> --help for flags.
- Git-backed — entries are markdown with YAML frontmatter, stored in a shared repo
- FTS5 search — SQLite full-text search with BM25 ranking, prefix matching, snippets
- Repo ingest — import docs from external repos with freshness scoring
- Freshness — entries scored Fresh/Aging/Stale;
brain prunearchives stale ones - Knowledge trails — auto-linked entries via tag overlap, title similarity, cross-references
- MCP server — 7 tools + 2 resources, works with Claude, Copilot, Cursor, Windsurf
- Read analytics — per-entry read tracking across CLI and MCP
- Auto-detection — title, type, and tags inferred from content on push
{
"mcpServers": {
"brain": { "command": "brain", "args": ["serve"] }
}
}- Getting started — install, setup, first entry
- Command reference — all commands with flags and examples
- MCP integration — tools, resources, client setup
- Configuration — config file, cache, data layout
- Architecture — storage, FTS5, sync, receipts, MCP server
- Changelog — release history
- Roadmap — what's shipped, what's next
npm install && npm run build && npm test
See CONTRIBUTING.md for dev setup, conventions, and PR process.
MIT