npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vedanth/context7

v1.0.2

Published

CLI for Context7 — get up-to-date, version-specific library docs from your terminal

Readme

c7 — Context7 CLI

npm version npm downloads license node

Get up-to-date, version-specific library docs from your terminal. No MCP client needed.

Built on top of Context7 — the same docs that power Cursor, Claude, and other AI coding assistants, now available as a simple CLI.

Note: This package is published as @vedanth/context7 on npm. The unscoped context7 on npm is a different, unrelated project.

Why?

Your AI coding assistant hallucinates APIs that don't exist. Context7's MCP fixes that — but only if you're inside an MCP-compatible editor.

c7 gives you the same docs anywhere:

  • Pipe into agent prompts before they start coding
  • Quick lookups without leaving the terminal
  • Feed accurate docs into any LLM, any workflow

Install

npx @vedanth/context7               # Run directly (no install)
npm install -g @vedanth/context7     # Or install globally

Usage

# Find a library
c7 resolve nextjs

# Get docs (auto-resolves library name)
c7 docs nextjs "app router"
c7 docs react "server components" --tokens 10000

# Shorthand — skip the "docs" command
c7 react hooks
c7 express middleware
c7 tailwindcss "dark mode"

# Use exact Context7 ID (from resolve)
c7 docs /vercel/next.js "image optimization"

# Pipe into anything
c7 react hooks | pbcopy
c7 express middleware >> prompt.txt
c7 docs nextjs "api routes" | llm "summarize these docs"

Commands

| Command | Description | |---------|-------------| | c7 resolve <library> | Find Context7 library IDs for a search term | | c7 docs <library> [topic] | Get docs (auto-resolves name to best match) | | c7 <library> [topic] | Shorthand for c7 docs |

Options

| Flag | Description | |------|-------------| | --tokens <n> | Max tokens to return (default: 5000) | | --api-key <key> | Context7 API key (or set CONTEXT7_API_KEY env) | | --json | Raw JSON output (resolve only) |

API Key (optional)

Works without an API key for basic usage. For higher rate limits:

  1. Get a key at context7.com/dashboard
  2. Set it: export CONTEXT7_API_KEY=your-key

Use Cases

Feed docs into coding agents:

DOCS=$(c7 nextjs "app router middleware" --tokens 8000)
claude "Build a Next.js middleware that redirects. Use these docs:\n$DOCS"

Quick API lookup:

c7 prisma "findMany" --tokens 3000

Compare versions:

c7 docs /vercel/next.js "image" --tokens 5000   # Latest
c7 docs /websites/nextjs_15 "image"              # v15 specific

How It Works

Context7 indexes documentation from source repos and official docs. The CLI queries their API to get relevant, version-specific code snippets and API references — the same data that powers the MCP server used by Cursor, Claude Code, and other AI editors.

Credits

Powered by Context7 by Upstash.

c7 vs other Context7 packages

| Package | What it is | |---------|------------| | @vedanth/context7 (this) | CLI tool — library docs in your terminal | | @upstash/context7 | Official MCP server for AI editors | | context7 (unscoped) | Different project, not related |

License

MIT