Getting Started
Install Chub and start serving curated docs to your AI coding agents in under 5 minutes.
Installation
npm (recommended)
sh
npm install -g @nrl-ai/chubCargo (from source)
sh
cargo install chubBinary download
Download prebuilt binaries from GitHub Releases.
| Platform | Package |
|---|---|
| Linux x64 | chub-linux-x64 |
| macOS x64 | chub-darwin-x64 |
| macOS ARM | chub-darwin-arm64 |
| Windows x64 | chub-win32-x64 |
Verify installation
sh
chub --versionQuick Start
Search for docs
sh
chub search "stripe payments"Fetch a doc
sh
chub get openai/chat --lang pythonList all available docs
sh
chub listInitialize a project
sh
# Create .chub/ directory with defaults
chub init
# Auto-detect dependencies and pin matching docs
chub init --from-depsPin docs for your team
sh
# Pin a doc with version lock
chub pin openai/chat --lang python --version 4.0
# List pinned docs
chub pins
# Fetch all pinned docs at once
chub get --pinnedMCP Setup
Chub includes a built-in MCP (Model Context Protocol) server for AI agents.
Claude Code
Add to your .mcp.json:
json
{
"mcpServers": {
"chub": {
"command": "chub",
"args": ["mcp"]
}
}
}Cursor
Go to Settings → MCP Servers → Add Server:
Command: chub mcp
Transport: stdioWith a profile
sh
chub mcp --profile backendTIP
When using MCP, pinned doc versions are automatically applied. Agents don't need to know which version to use.
Project Setup
chub init creates a .chub/ directory in your project root:
my-project/
├── .chub/
│ ├── config.yaml # Project config
│ ├── pins.yaml # Pinned docs
│ ├── annotations/ # Team-shared annotations
│ ├── context/ # Custom project docs
│ └── profiles/ # Named context profilesINFO
Commit .chub/ to git so the whole team shares the same context. Personal settings stay in ~/.chub/.
Three-tier config inheritance
~/.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 profileNext Steps
- Doc Pinning — lock doc versions for your team
- Context Profiles — role-scoped context
- CLI Reference — all commands and flags
- Configuration — config file format