pkgref
v0.0.2
Published
Clone dependency source repositories and index their docs and examples.
Readme
pkgref
Clone dependency source repositories and generate a local index of their docs and examples for coding agents and humans.
Requires Node.js 24+ and Git.
Usage
Run from a project containing package.json:
npx pkgrefUse the arrow keys to navigate, Space to select packages, and Enter to confirm.
pkgref then shows the Git URLs, asks for a target directory (default:
docs/pkg-reference), and offers to link the index from AGENTS.md.
Skip prompts by supplying packages and a target:
npx pkgref --pkgs=react,vitest --dir docs/pkg-referenceUpdate every clean clone in the target:
npx pkgref update
npx pkgref update --dir docs/other-referencesOutput
Repositories are shallow-cloned and deduplicated. INDEX.md links to nested
doc, docs, example, and examples directories, or to the repository root
when none exist. Reruns preserve earlier index entries.
pkgref never overwrites a user-owned index or unrelated path. Existing clones with local changes are left untouched. Failures return a nonzero exit code without discarding successful work.
See SPEC.md for the full behavioral contract.
Development
vp install
vp check
vp test
vp pack