Overview
vg lib provides version-correct documentation for the exact package versions pinned in your lockfile — no wrong-version hallucinations. Serves from the hosted catalog or from locally ingested sources.
Usage
vg lib # List the catalog
vg lib <name> # Show docs for a library
vg lib add <source> # Ingest docs from a local source
vg lib publish <name> # Upload private library docs
vg lib resolve <name> # Resolve name → catalog id + version
vg lib refresh # Re-ingest all local sources
| Flag | Default | Description |
|---|---|---|
--name <name> | — | Library name (for add) |
--version <v> | — | Pin the doc version (for add/publish) |
-b, --budget <n> | — | Trim docs to ~N tokens |
--readme <path> | ./README.md | README path (for publish) |
--dts <path> | — | TypeScript declaration path (for publish) |
--language <lang> | — | Primary language (for publish) |
--region <region> | us | Data-residency region for the hosted catalog |
--ingest <url> | — | Hosted catalog URL override (wins over --region) |
Examples
# Browse the catalog
vg lib
# Docs for your pinned version of React
vg lib react
# Trim to fit a 3000-token budget
vg lib zod --budget 3000
Related
- vg serve — Serve docs to AI assistants via MCP