← 返回
开发者工具 Key

Context7 Cli

Manage Context7 via CLI - search libraries, get documentation context. Use when user mentions 'context7', 'library docs', 'documentation context', or wants t...
通过CLI管理Context7,搜索库文档并获取上下文。当用户提及Context7、库文档或需要文档上下文时使用。
melvynx
开发者工具 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 674
下载
💾 8
安装
1
版本
#latest

概述

context7-cli

Setup

If context7-cli is not installed, install it from GitHub:

npx api2cli install Melvynx/context7-cli

If context7-cli is not found, install and build it:

bun --version || curl -fsSL https://bun.sh/install | bash
npx api2cli bundle context7
npx api2cli link context7

api2cli link adds ~/.local/bin to PATH automatically. The CLI is available in the next command.

Always use --json flag when calling commands programmatically.

Authentication

context7-cli auth set "your-ctx7sk-api-key"
context7-cli auth test

Get your API key at https://context7.com/dashboard (keys start with ctx7sk).

Resources

libs

CommandDescription
----------------------
context7-cli libs --name react --query "hooks" --jsonSearch for libraries by name

context

CommandDescription
----------------------
context7-cli context get --library /facebook/react --query "useEffect" --jsonGet documentation snippets (JSON)
context7-cli context get --library /vercel/next.js --query "app router" --type txt --rawGet docs as raw text
context7-cli context get --library /vercel/next.js/v15.1.8 --query "middleware" --jsonPin to specific version

Typical workflow

  1. Search for the library: context7-cli libs --name react --query "state management" --json
  2. Use the id from results to get docs: context7-cli context get --library /facebook/react --query "useState" --json

Global Flags

All commands support: --json, --format , --verbose, --no-color, --no-header

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-19 19:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,998
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 67 📥 180,031
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,769