Skip to content

Guide · Open source

How to use Context Hub: install chub and let your coding agent fetch API docs

Updated · written with AI from the project's own documentation and checked against our catalogue data

Context Hub is a command-line tool, written in JavaScript, that gives a coding agent curated and versioned API documentation as markdown. It is built for agents to run, not for people to browse directly. This guide shows how to install the chub CLI, search and fetch docs, attach notes, send feedback, and connect it to an agent such as Claude Code.

Context Hubandrewyng/context-hub · ★ 14k · MIT

Quick start

  1. 1Install Node.js 18 or newer. Confirm your Node.js version meets the README requirement before installing.
  2. 2Install the CLI. Run npm install -g @aisuite/chub to make the chub command available.
  3. 3Search for docs. Run chub search with a topic such as openai to see what is available.
  4. 4Fetch a doc. Run chub get with an ID and, if needed, a --lang flag such as py or js.
  5. 5Let the agent use it. Prompt your agent to run chub, or install SKILL.md as a skill for agents that support it.
  6. 6Annotate or give feedback. Use chub annotate for local notes and chub feedback up or down to rate docs for their authors.

What you need before you install Context Hub

Context Hub requires Node.js 18 or newer, as listed in the project README. It is installed through npm, so npm must also be available on your machine.

Context Hub is MIT licensed.

  • Node.js 18 or newer
  • npm, to install the package

Install the chub CLI

Install the CLI globally with npm using the package name from the README. This makes the chub command available in your terminal.

npm install -g @aisuite/chub

Search and fetch API docs

Use chub search to find docs and skills. Running it without a query lists everything available. Use chub get with a document ID to fetch a doc. The --lang flag selects a language variant, such as py or js, where one exists.

The README's own example fetches the Python variant of the OpenAI chat docs.

  • chub search [query]: search docs and skills; no query lists all
  • chub get <id> [--lang py|js]: fetch docs or skills by ID
  • --file grabs specific reference files; --full fetches everything
chub search openai # find what's available chub get openai/chat --lang py # fetch current docs (Python version)

Connect the CLI to your coding agent

The README says Chub is designed for your coding agent to use, not for you to use directly. You can prompt your agent to run chub, for example by asking it to use the CLI to get the latest API documentation and to run chub help to learn how it works.

For a more reliable setup, you can create an agent skill using the SKILL.md file in the repo. If you use Claude Code, the README says to create the directory ~/.claude/skills/get-api-docs and place SKILL.md there. The README suggests prompting the agent to remember to use this skill.

  • Prompt the agent to run chub help and use the CLI
  • Install the get-api-docs skill from SKILL.md for Claude Code at ~/.claude/skills/get-api-docs

Add annotations and send feedback

When an agent finds a gap in a doc, it can attach a local note with chub annotate. Notes persist across sessions. They are included on future fetches only when you pass --with-annotations, and the README says annotations are treated as untrusted input by default.

To rate a doc, use chub feedback with up or down. The README says this feedback is sent to maintainers, who can update the doc.

  • chub annotate <id> <note>: attach a note
  • chub annotate <id> --clear: remove annotations
  • chub annotate --list: list all annotations
  • chub feedback <id> <up|down>: vote on a doc
chub annotate stripe/api "Needs raw body for webhook verification" chub feedback stripe/api up

Check the full command reference

The README gives a short command table and points to the CLI Reference in the docs folder for the full list of commands, flags and piping patterns. Check that file for details beyond the basics on this page.

What people use it for

  • Having a coding agent read current OpenAI API docs before writing a chat integration
  • Fetching Stripe API documentation for a webhook handler, with a local note about raw body handling
  • Letting a team inspect and version-control the exact markdown their agent reads
  • Contributing a markdown doc with YAML frontmatter as a pull request

Frequently asked questions

Is Context Hub free to use?

Context Hub is released under the MIT licence, as stated in the README and repo badge. The README does not list any pricing.

What do I need to run Context Hub?

The README lists Node.js 18 or newer as the requirement. You install the CLI with npm using npm install -g @aisuite/chub.

Can I use Context Hub without a coding agent?

The README says Chub is designed for a coding agent to use, not for direct human use. It is a command-line tool, not a graphical app for browsing docs.

How do I install Context Hub for Claude Code?

The README says to create the directory ~/.claude/skills/get-api-docs and place SKILL.md in it. Claude Code is one of the agents that supports skills through SKILL.md.

Does Context Hub cover every API?

No. Coverage depends on the content in the repo, which grows through contributions. If a doc is missing, the README says you can contribute markdown docs as pull requests.

Are annotations sent to the doc authors?

Annotations are local notes and stay on your machine. Feedback from chub feedback is sent to doc authors. Annotations are only included on fetches when you pass --with-annotations.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Context Hub suits developers who use a coding agent and want it to read current, inspectable API docs, and teams that want to version-control those docs. If you need a graphical app to browse documentation, or you cannot run Node.js 18 or newer, pick a different tool.

Install options & downloads