npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@vercel/nextdocfs

0.5.1

@judegao

npmSnykSocket
Downloads:2
$ npm install @vercel/nextdocfs
DailyWeeklyMonthlyYearly

nextdocfs

A simulated filesystem CLI for Next.js documentation. Run familiar commands — ls, cat, grep, tree, find — against nextjs.org/docs as if the docs were local files.

Why

AI coding agents are better at navigating filesystems than fetching URLs. In evals, pointing agents at a local docs directory consistently outperformed giving them a remote docs URL (100% vs 90% on Opus 4.6). But bundling docs in node_modules couples the docs version to the package version, and maintaining a hand-curated docs index in agents.md is fragile — someone updates Next.js and forgets to update the index.

nextdocfs gives agents the filesystem interface they're good at, backed by docs cloned from the Next.js repo at the project's detected version:

  • No maintenance burden — no index file to keep in sync, just a stable prompt telling agents to use the CLI
  • Version-accurate docs — docs are cloned from the matching Next.js Git tag for your local project version
  • Better agent performance — when agents see explicit grep and find commands alongside ls and cat, they use them. With raw filesystem access, they default to browse-and-read. Evals showed a 10 ppt improvement for Sonnet 4.5 and 5 ppt for Composer 1.5 over the local docs directory approach

Usage

npx @vercel/nextdocfs ls
npx @vercel/nextdocfs cat app/getting-started/installation
npx @vercel/nextdocfs grep "cache" app
npx @vercel/nextdocfs tree app/getting-started
npx @vercel/nextdocfs find "middleware"
npx @vercel/nextdocfs head app/building-your-application/routing
npx @vercel/nextdocfs stat app/getting-started/installation
npx @vercel/nextdocfs wc app/getting-started

Commands

CommandDescription
lsList doc pages at a path
catPrint a doc page as markdown
headShow the first N lines of a page
treeShow the doc tree structure
grepSearch across doc pages by regex
findFind pages by name or path
statShow metadata for a page
wcShow line, word, and byte counts
purgeDelete cached docs for all versions