
vedanthb/context7-cli
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Context7 の CLI — 端末の最新のライブラリ ドキュメント。 MCP は必要ありません.
概要
端末から最新のバージョン固有のライブラリドキュメントを入手してください。 MCP クライアントは必要ありません。 Context7 の上に構築された — パワー・カーサー、クロード、およびその他の AI コーディング・アシスタントの同じドキュメントは、シンプルな CLI として利用できます。 このパッケージは、npmの@vedanth/context7として公開されています。 npmのunscopedコンテクスト7は、異なる関係のないプロジェクトです。 開発ツールのMCPサーバーよりもCLIが優れているという成長を続けるコンセンサスがありました。 MCP は特定のエディタにロックします。 CLI はテキストを与えるだけなので、どこにいてもそれを配管します。 Context7には素晴らしいドキュメントデータがありますが、MCPサーバーはCursorや他のMCPクライアント内でのみ動作します。 c7 は plain stdout と同じデータを利用できるようにします。 - 任意のLM(Claudeコード、Ollama、llama.cpp、何でも)へのパイプ - grep、jq、より少ない、pbcopy、またはシェルスクリプトで作曲 - CI、自動化、エージェントプロンプトで使用 - どこでもコマンドを実行できます 基本的な使用法のためのAPIキーなしで動作します。 より高い率の限界のため: 1。 コンテキスト7.com /ダッシュボード2でキーを取得する.
概要(AI 翻訳)
端末から最新のバージョン固有のライブラリドキュメントを入手してください。 MCP クライアントは必要ありません。
Context7 の上に構築された — パワー・カーサー、クロード、およびその他の AI コーディング・アシスタントの同じドキュメントは、シンプルな CLI として利用できます。
注記: このパッケージはnpmに
@vedanth/context7として公開されます。 npmのunscopedcontext7は、異なる関連のないプロジェクトです。
なぜ?
開発ツールのMCPサーバーよりもCLIが優れているという成長を続けるコンセンサスがありました。 MCP は特定のエディタにロックします。 CLI はテキストを与えるだけなので、どこにいてもそれを配管します。
Context7 は素晴らしい docs データを持っていますが、MCP サーバーは Cursor やその他の MCP クライアント内でのみ動作します。 [c7] は、 普通の stdout と同じデータを使用できます。
- LLM(クロードコード、オラマ、llama.cpp、何でも)へのパイプ
- grep、jq、less、pbcopy、またはシェルスクリプトでコンパイル
- CI、自動化、エージェントのプロンプトで、コマンドを実行できる場所
インストール
使用法
コマンド
| コマンド | 説明 |
お問い合わせ
| [c7 resolve | 検索用語のContext7ライブラリIDを検索 |
|【[[T4]】 | ドキュメントの取得(自動返信) |
| [[T5] | ショートハンド[T6] |
オプション
| フラグ | 説明 |
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
c7 — Context7 CLI
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/context7on npm. The unscopedcontext7on npm is a different, unrelated project.
Why?
There’s been a growing consensus that CLIs are better than MCP servers for developer tools. MCP locks you into specific editors. A CLI just gives you text — pipe it wherever you want.
Context7 has great docs data, but their MCP server only works inside Cursor and other MCP clients. c7 makes the same data available as plain stdout:
- Pipe into any LLM (Claude Code, Ollama, llama.cpp, whatever)
- Compose with grep, jq, less, pbcopy, or shell scripts
- Use in CI, automation, agent prompts — anywhere you can run a command
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 |
Find Context7 library IDs for a search term |
c7 docs [topic] |
Get docs (auto-resolves name to best match) |
c7 [topic] |
Shorthand for c7 docs |
Options
| Flag | Description |
|---|---|
--tokens |
Max tokens to return (default: 5000) |
--api-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:
- Get a key at context7.com/dashboard
- 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
インストール
npx @vedanth/context7 # Run directly (no install)