| name | context-hub |
| description | Fetch curated API documentation using the chub CLI before writing code. Use when calling external APIs (OpenAI, Stripe, Anthropic, etc.) to get accurate docs instead of hallucinating. Install chub via: npm install -g chub |
Context Hub — API Documentation via chub
chub is installed and ready: which chub (install via npm install -g chub)
When to Use
- Before writing code that calls any external API
- When unsure about exact method signatures, params, or response shapes
- After an API call fails with unexpected results
- When a previous attempt may have hallucinated API details
Commands
chub search
chub search "stripe payments"
chub get openai/chat --lang py
chub get openai/chat --lang js
chub get stripe/api
chub get anthropic/messages
chub annotate stripe/api "Needs raw body for webhook verification"
chub annotate <id> --clear
chub annotate --list
chub feedback <id> up
chub feedback <id> down
Workflow
chub search "<api-name>" — find the right doc ID
chub get <id> --lang <py|js> — fetch the doc
- Read doc, write correct code
- If you find a gap:
chub annotate <id> "<note>" — persists for next session
Gotchas
- Run
chub search with no args first to see everything available — coverage grows over time
- Language flag matters:
--lang py and --lang js return different variants
- Annotations persist locally across sessions — add them whenever you find gotchas
- Not all APIs are in the hub yet — fall back to web_fetch for missing ones