c7 CLI
Fetch library documentation using the c7 CLI tool (~/.local/bin/c7 ).
Commands
Search Libraries
c7 search <libraryName> <query...>
Returns matching library IDs.
Fetch Documentation Context
c7 context <libraryId> <query...> -t txt
Fetches documentation for the specified library ID. Default output format: -t txt .
Workflow
-
Search — Run c7 search with the library name to get library IDs
-
Context — Run c7 context with the chosen library ID and query to fetch documentation
Best Practices
-
Be specific with queries — Use detailed, natural language queries for better results (e.g., c7 context /vercel/next.js How to implement authentication with middleware instead of just auth )
-
Use specific versions — Pin to an exact version for consistent results (e.g., c7 context /vercel/next.js/v15.1.8 app router )
-
Handle 202 responses — A 202 status means the library is not yet finalized; wait and retry later
-
Handle 301 redirects — A 301 means the library ID has moved; use the new library ID from the response