tanstack-docs-cli

Fetches current TanStack library documentation via the TanStack docs CLI with JSON output.

Updated May 5, 2026
One-click install
npx skills add https://github.com/josippapez/ai-setup --skill tanstack-docs-cli-josippapez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-docs-cli
Source: https://github.com/josippapez/ai-setup/tree/main/claude/plugins/dev-core/skills/tanstack-docs-cli
Command: npx skills add https://github.com/josippapez/ai-setup --skill tanstack-docs-cli-josippapez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @tanstack/cli.

What problem does it solve? AI models often recall outdated TanStack APIs for Router, Query, Table, Form, and other libraries. This Skill retrieves the current official documentation on demand using the TanStack docs CLI instead of relying on stale training data or generic web search. ## Core Features & Use Cases - Docs Search: Runs npx @tanstack/cli search-docs with --library and --framework flags to find relevant pages, returning machine-readable JSON results. - Page Fetching: Retrieves full doc pages with npx @tanstack/cli doc <library> <path>, deriving the correct path from search result URLs. - Version-Aware Lookup: Supports --docs-version to match the package version installed in the project. - Use Case: While building a route with TanStack Router, ask whether file-based routing still works a certain way; the Skill searches the live Router docs and returns the current API page content. ## Quick Start Ask the assistant to check the current TanStack Router docs for file-based routing and it will search and fetch the relevant page using the TanStack CLI.

Frequently Asked Questions about tanstack-docs-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search TanStack documentation from the command line?

Run npx @tanstack/cli search-docs with your query plus --library and --framework flags, and always pass --json for machine-readable output. For example: npx @tanstack/cli search-docs "route head" --library router --framework react --json.

How do I fetch a specific TanStack docs page with the CLI?

Use npx @tanstack/cli doc with two positional arguments: the library id and the path after /docs/ in the page URL. For example, npx @tanstack/cli doc router installation/with-vite --json returns the page markdown in the content field.

Why does the TanStack doc command fail with unknown option '--library'?

The doc subcommand takes positional arguments <library> <path> and does not accept --library or --framework flags. Those flags only work with search-docs and libraries; passing them to doc causes the unknown option error.

Does the TanStack docs CLI support version-specific documentation?

Yes, the doc command accepts a --docs-version flag to fetch documentation for a specific library version. Prefer version-specific docs when the project's installed package version or the user's request identifies one.

Is @tanstack/cli the same as @tanstack/router-cli?

No, they are different tools. @tanstack/cli is for searching and fetching documentation, while @tanstack/router-cli (tsr generate/watch) generates the route tree only when not using a supported bundler plugin like the Vite or Webpack router plugin.