Getting Started
Get up and running with Chub in under 5 minutes. This guide covers installation, basic commands, and setting up your project for team sharing.
Install
Pick your preferred method:
npm install -g @nrl-ai/chubpip install chubcargo install chubbrew install nrl-ai/tap/chubSee the full Installation guide for binary downloads and platform-specific instructions.
Verify it works:
chub --versionSearch for docs
Chub serves curated API documentation from a public registry of 1,553+ docs. Search for anything:
chub search "stripe payments" 1. stripe/api Stripe API reference ★ 0.92
2. stripe/webhooks Stripe webhook handling ★ 0.78
3. stripe/checkout Stripe Checkout integration ★ 0.71Fetch a doc
Grab a specific doc by ID. Use --lang to get language-specific content:
chub get openai/chat --lang pythonThis outputs the full markdown doc — ready to be consumed by an AI agent or read by a human.
# Other examples
chub get stripe/api --lang javascript
chub get nextjs/app-router --version 15.0
chub get openai/chat --lang python --version 4.0List all docs
chub listUse --json with any command for machine-readable output:
chub list --jsonSet up MCP for your AI agent
Chub includes a built-in MCP (Model Context Protocol) server. This is how AI agents like Claude and Cursor access docs automatically.
{
"mcpServers": {
"chub": {
"command": "chub",
"args": ["mcp"]
}
}
}{
"mcpServers": {
"chub": {
"command": "chub",
"args": ["mcp"]
}
}
}Once configured, your AI agent can search and fetch docs without any manual commands.
Initialize a project
Set up team sharing by creating a .chub/ directory in your project:
chub initThis creates:
my-project/
├── .chub/
│ ├── config.yaml # Project config
│ ├── pins.yaml # Pinned docs
│ ├── annotations/ # Team-shared annotations
│ ├── context/ # Custom project docs
│ └── profiles/ # Named context profilesAuto-detect dependencies
Use --from-deps to scan package.json, Cargo.toml, requirements.txt, etc. and auto-pin matching docs:
chub init --from-depsCommit .chub/ to git so the whole team shares the same context. Personal settings stay in ~/.chub/.
Pin docs for your team
Lock specific doc versions so every team member and AI agent uses the same reference:
chub pin openai/chat --lang python --version 4.0 --reason "Use v4 streaming API"
chub pin stripe/api --lang javascriptList and fetch pinned docs:
chub pins # list all pins
chub get --pinned # fetch all pinned docs at onceThree-tier config
Chub uses a layered config system — no tier is required:
~/.chub/config.yaml # Tier 1 — personal defaults
↓ overridden by
.chub/config.yaml # Tier 2 — project config (shared)
↓ overridden by
.chub/profiles/<name>.yaml # Tier 3 — role/task profileWhat to learn next
Now that you have Chub installed, explore the features that matter to your workflow:
| If you want to... | Read |
|---|---|
| Understand why Chub exists | Why Chub |
| Lock doc versions for your team | Doc Pinning |
| Give different roles different context | Context Profiles |
| Share team knowledge in git | Team Annotations |
| Add custom project docs | Project Context |
| Auto-detect deps and pin docs | Dep Auto-Detection |
| Sync CLAUDE.md / .cursorrules | Agent Config Sync |
| See all CLI commands | CLI Reference |
| Configure Chub | Configuration |
| Connect AI agents via MCP | MCP Server |