闲社服务运行正常AI智能体自动化平台
c

Context7命令行工具

技能标识:context7-cli

Manage Context7 via CLI - search libraries, get documentation context. Use when user mentions 'context7', 'library docs', 'documentation context', or wants to fetch up-to-date library documentation.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 0.1.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

Context7命令行工具

context7-cli

安装

如果尚未安装 context7-cli,请从 GitHub 安装:
bash
npx api2cli install Melvynx/context7-cli

如果找不到 context7-cli,请安装并构建:
bash
bun --version || curl -fsSL https://bun.sh/install | bash
npx api2cli bundle context7
npx api2cli link context7

api2cli link 会自动将 ~/.local/bin 添加到 PATH 环境变量中。CLI 可在下一个命令中使用。

以编程方式调用命令时,请始终使用 --json 标志。

身份认证

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

在 https://context7.com/dashboard 获取您的 API 密钥(密钥以 ctx7sk 开头)。

资源

库

命令描述
context7-cli libs --name react --query hooks --json按名称搜索库

上下文

命令描述
context7-cli context get --library /facebook/react --query useEffect --json获取文档片段(JSON 格式)
context7-cli context get --library /vercel/next.js --query app router --type txt --raw
以纯文本形式获取文档 | | context7-cli context get --library /vercel/next.js/v15.1.8 --query middleware --json | 锁定到特定版本 |

典型工作流程

  1. 1. 搜索库:context7-cli libs --name react --query state management --json
  2. 使用结果中的 id 获取文档:context7-cli context get --library /facebook/react --query useState --json

全局标志

所有命令均支持:--json、--format 、--verbose、--no-color、--no-header

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 context7-cli-1776087903 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 context7-cli-1776087903 技能

通过命令行安装

skillhub install context7-cli-1776087903

下载

⬇ 下载 context7-cli v0.1.0(免费)

文件大小: 1.41 KB | 发布时间: 2026-4-15 12:18

v0.1.0 最新 2026-4-15 12:18
Initial release of context7-cli.

- Introduces a CLI tool to search libraries and retrieve up-to-date documentation snippets from Context7.
- Includes authentication setup with API key management.
- Supports searching for libraries and querying documentation by library, version, and search term.
- Provides output format options including JSON, text, CSV, and YAML.
- Setup instructions and typical workflow examples included.
返回顶部