context-hub README

The project's README from github.com/andrewyng/context-hub. As one markdown file: README.md.

Context Hub

Coding agents hallucinate APIs and forget what they learn in a session. Context Hub gives them curated, versioned docs, plus the ability to get smarter with every task. All content is open and maintained as markdown in this repo — you can inspect exactly what your agent reads, and contribute back.

MIT License npm Node.js

Quick Start

npm install -g @aisuite/chub
chub search openai                 # find what's available
chub get openai/chat --lang py     # fetch current docs (Python version) 

How It Works

Chub is designed for your coding agent to use (not for you to use!). You can prompt your agent to use it (e.g., "Use the CLI command chub to get the latest API documentation for calling OpenAI. Run 'chub help' to understand how it works.") Or by creating an agent skill to use Chub using SKILL.md, and ideally prompting your agent to remember to use this skill. (If you are using Claude Code, create the directory ~/.claude/skills/get-api-docs and put SKILL.md there.)

Most of the time, it's simple — search, fetch, use:

chub search "stripe payments"        # find relevant docs
chub get stripe/api --lang js        # fetch the doc
# Agent reads the doc, writes correct code. Done.

When the agent discovers a gap, it can annotate locally for next time:

chub annotate stripe/api "Needs raw body for webhook verification"

# Next session, chub get notes that an annotation exists. Pass --with-annotations
# to include it — annotations are treated as untrusted input by default.

Feedback flows back to authors — chub feedback stripe/api up or down — vote the docs up or down so they can get better for everyone over time.

Content Types

Versioned, language-specific. "What to know."

chub get openai/chat --lang py       # Python variant
chub get openai/chat --lang js       # JavaScript variant

More content types than API documentation (such as agent skills) are on the roadmap.

Commands

Command Purpose
chub search [query] Search docs and skills (no query = list all)
chub get <id> [--lang py|js] Fetch docs or skills by ID
chub annotate <id> <note> Attach a note to a doc or skill
chub annotate <id> --clear Remove annotations
chub annotate --list List all annotations
chub feedback <id> <up|down> Upvote or downvote a doc (sent to maintainers)

For the full list of commands, flags, and piping patterns, see the CLI Reference.

Self-Improving Agents

Context Hub is designed for a loop where agents get better over time.

Annotations are local notes that agents attach to docs. They persist across sessions and can be included on future fetches with --with-annotations — so agents can learn from past experience while treating prior notes as untrusted input. See Feedback and Annotations.

Feedback (up/down ratings with optional labels) goes to doc authors, who update the content based on what's working and what isn't. The docs get better for everyone — not just your local annotations.

  Without Context Hub                          With Context Hub
  ───────────────────                          ─────────────────
  Search the web                               Fetch curated docs
  Noisy results                                Higher chance of code working
  Code breaks                                  Agent notes any gaps/workarounds
  Effort in fixing                             ↗ Even smarter next session
  Knowledge forgotten
  ↻ Repeat next session

Key Features

Incremental Fetch

Docs can have multiple reference files beyond the main entry point. Fetch only what you need — no wasted tokens. Use --file to grab specific references, or --full for everything. See the CLI Reference.

Annotations & Feedback

Annotations are local notes that agents attach to docs — they persist across sessions and can be re-injected on future fetches with --with-annotations (off by default; the contents are treated as untrusted input). Feedback (up/down ratings) goes to doc authors to improve the content for everyone. See Feedback and Annotations.

Contributing

Anyone can contribute docs and skills — API providers, framework authors, and the community. Content is plain markdown with YAML frontmatter, submitted as pull requests. See the Content Guide for the format and structure.

Agent feedback (up/down ratings from real usage) flows back to authors, helping surface what needs fixing and improving overall quality over time.

License

MIT

context-hub (andrewyng/context-hub)

Searching Database…

这是什么?Context Hub 是一个开放的中心,收录了为编程智能体精心整理、带版本管理的文档,外加一个叫 'chub' 的命令行工具,智能体用它来获取这些文档——目的就是让智能体不再凭空编造 API,并且每做一件事都变得更聪明。
它是命令行工具、文档网站,还是代码库?是一个叫 'chub' 的 JavaScript 命令行工具,背后由一个纯 markdown 维护的内容仓库支撑——你可以直接查看你的智能体到底会读到什么内容。
怎么让我的编程智能体用上它?直接提示你的智能体去用它(比如让它通过 chub 获取最新的 OpenAI API 文档),或者创建一个智能体技能:对于 Claude Code,把一个 SKILL.md 放到 ~/.claude/skills/get-api-docs,并提示智能体记得使用它。
它支持哪些编程智能体?任何你能提示它运行命令行命令的智能体都行。README 里的完整示例是 Claude Code,它会从 ~/.claude/skills/get-api-docs 自动识别技能。
那 chub 是我自己运行,还是只给智能体用?给智能体用的。README 明确说明 Chub 是为你的编程智能体设计的,不是给你自己用的——你要做的就是给智能体下提示或做配置。
这些带版本的文档有不同编程语言的版本吗?文档是按语言区分的,'chub get' 带一个 --lang 参数;文档里列出的选项是 py 和 js。
Creator
andrewyng
Size
2 MB
Stars
14K
Age
11mo
Commits · 90 Days