Skip to content

CLI Commands

Search for docs in the registry.

sh
chub search <query> [--limit <n>] [--source <name>] [--json]
FlagDescriptionDefault
--limit <n>Max results10
--source <name>Search specific sourceall
--jsonJSON outputoff

chub get

Fetch a specific doc by ID.

sh
chub get <id> [--lang <language>] [--version <ver>] [--source <name>] [--pinned] [--json]
FlagDescription
--lang <language>Filter by language
--version <ver>Specific version
--pinnedFetch all pinned docs

Special prefix: chub get project/<name> fetches a project context doc.

chub list

sh
chub list [--source <name>] [--json]

chub build

Build a content directory into a registry.

sh
chub build <content-dir> [-o <output>] [--base-url <url>] [--validate-only]
FlagDescriptionDefault
-o, --output <dir>Output directorydist/
--base-url <url>CDN base URLnone
--validate-onlyValidate onlyoff

chub init

sh
chub init [--from-deps] [--monorepo]

chub pin / unpin / pins

sh
chub pin <id> [--lang <lang>] [--version <ver>] [--reason <text>]
chub unpin <id>
chub pins

chub profile

sh
chub profile use <name>    # Set active profile ("none" to clear)
chub profile list

chub annotate

sh
chub annotate <id> <note> [--team] [--personal] [--author <name>]
FlagDescription
--teamWrite to .chub/annotations/ (git-tracked)
--personalWrite to ~/.chub/annotations/ (local only)
--author <name>Author name (defaults to $USER)

chub detect

sh
chub detect [--pin]

chub agent-config

sh
chub agent-config generate   # Generate all target files
chub agent-config sync       # Update only if changed
chub agent-config diff       # Show pending changes

chub snapshot

sh
chub snapshot create <name>
chub snapshot list
chub snapshot restore <name>
chub snapshot diff <name-a> <name-b>

chub check

sh
chub check [--fix]

chub stats

sh
chub stats [--json]

chub mcp

sh
chub mcp [--profile <name>]

Start the MCP stdio server.

chub serve

sh
chub serve <content-dir> [--port <n>]

Start an HTTP registry server. Default port: 4242.