AI assistants frequently cite documentation for the wrong version of a library, producing code that does not match what you actually have installed. vg lib solves this by serving version-correct library docs pinned to your lockfile — this is Vibgrate AI Context, surfaced publicly as the Free Dev Docs Library at /library. This article shows how to use it.
Overview
vg lib provides documentation for the libraries your project depends on, pinned to the exact versions in your lockfile. Docs come from the hosted catalog or from local ingestion, and once retrieved they are available offline. The result is documentation that matches the version you run — not whatever an AI model happened to memorize.
Prerequisites
You need a project with a lockfile (for example a package manifest and its lock). Vibgrate reads it to determine which versions to pin docs to.
Use the library
vg lib
This works against the libraries detected in your project, giving you docs aligned to your installed versions. Because the docs are version-correct, code suggestions built on them are far less likely to reference APIs that do not exist in your version or to miss ones that do.
Serving docs to AI assistants
The library is part of Vibgrate AI Context, the local offline MCP server. Start it so any connected AI assistant can read your version-correct docs (along with your code map and drift):
vg serve
No account is required and nothing is uploaded. To wire the context server directly into an assistant such as Claude, Cursor, Windsurf, VS Code, Codex, or Gemini:
vg install
Why version-correct matters
- Fewer hallucinated APIs. Suggestions are grounded in the version you actually use.
- Offline and private. After first retrieval, docs are available without a network round trip and stay on your machine.
- Lockfile-driven. When you upgrade a dependency, the pinned docs follow.
Related
- Start the local context server with
vg serve. - Add the context server to your assistant with
vg install. - Learn about Approved-Alternative Library Policies to steer assistants toward your preferred packages.
Explore the Free Dev Docs Library at /library for the full picture.