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.
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:
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 approachnpx @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
| Command | Description |
|---|---|
ls | List doc pages at a path |
cat | Print a doc page as markdown |
head | Show the first N lines of a page |
tree | Show the doc tree structure |
grep | Search across doc pages by regex |
find | Find pages by name or path |
stat | Show metadata for a page |
wc | Show line, word, and byte counts |
purge | Delete cached docs for all versions |