Skip to content

vraspar/brain

brain

CI

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.

Install

git clone https://github.com/vraspar/brain.git
cd brain && npm install && npm run build && npm link

Requires Node.js 20+ and git.

Usage

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.

Features

  • 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 prune archives 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

MCP setup

{
  "mcpServers": {
    "brain": { "command": "brain", "args": ["serve"] }
  }
}

Documentation

Development

npm install && npm run build && npm test

See CONTRIBUTING.md for dev setup, conventions, and PR process.

License

MIT

About

CLI-first knowledge sharing for dev teams

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors