Token导航 LogoToken导航TokenDH.com
ctx (Ctx Hq) logo
开发工具未说明官方级别未说明来源级核验

ctx (Ctx Hq)

MCP Server

ctx是一个通用包管理器,为AI编码代理(如Claude Code、Cursor、Windsurf等)提供统一的扩展发现和安装方式。

工具数

4

提示词数

0

GitHub Stars

0

资源数

0
命令行工具开发工具GoClaudeClaudeCursorWindsurfCline

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ctx-hq

提供方

ctx-hq

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

上下文

](https://go.dev/) ![CI](https://github.com/ctx-hq/ctx/actions/workflows/ci.yml) ![Release](https://github.com/ctx-hq/ctx/releases) ![License: MIT](LICENSE)

中文 |英语

AI编码代理的通用包管理器。

ctx install @openelf/code-review   # install a skill
ctx link claude                     # link to your agent — done

为什么是ctx?

AI编码代理(Claude Code、Cursor、Windsurf等)缺乏发现和安装扩展的共享方式。每个代理都有自己的格式、自己的配置目录和自己的链接机制。

ctx解决了这个问题。 一个安装命令。一个链接命令。在18名特工中工作。

                 ┌─────────────────────────────┐
                 │        ctx registry          │
                 │  skills · MCP · CLI tools    │
                 └──────────┬──────────────────┘
                            │
                      ctx install
                            │
         ┌──────────────────┼──────────────────┐
         ▼                  ▼                  ▼
   ┌──────────┐      ┌──────────┐      ┌──────────┐
   │  Claude   │      │  Cursor  │      │ Windsurf │  ...
   │  Code     │      │          │      │          │
   └──────────┘      └──────────┘      └──────────┘

安装

# macOS / Linux
curl -fsSL https://getctx.org/install.sh | sh

# Homebrew
brew install ctx-hq/tap/ctx

# Go
go install github.com/ctx-hq/ctx/cmd/ctx@latest

# Windows
irm https://getctx.org/install.ps1 | iex

More options (Scoop, deb, rpm)

# Debian / Ubuntu
dpkg -i ctx_*.deb

# Windows (Scoop)
scoop bucket add ctx https://github.com/ctx-hq/homebrew-tap
scoop install ctx

快速开始

# Search for packages
ctx search "code review"

# Install a skill — auto-detects your agents and links it
ctx install @openelf/code-review

# Install an MCP server with a specific version
ctx install @mcp/github@2.1.0

# Install a CLI tool (delegates to brew/cargo/binary as appropriate)
ctx install @community/ripgrep

# See what's installed
ctx list

# Check environment health
ctx doctor

程序包类型

类型它是什么示例
技能为代理提供提示文件和工作流代码审查、重构、测试生成
主控程序模型上下文协议服务器GitHub、数据库、文件系统访问
命令行界面命令行工具ripgrep、jq、fzf

支持的代理

ctx检测包并将其链接到 18名代理人:

claude · cursor · windsurf · opencode · codex · copilot · cline · continue · zed · roo · goose · amp · trae · kilo · pear · junie · aider · generic

ctx link                  # list detected agents on your system
ctx link claude           # link all packages to Claude Code
ctx link cursor           # link all packages to Cursor

命令

# Discovery
ctx search                   # search the registry
ctx search "git" --type mcp        # filter by type
ctx info 
                  # show package details

# Install / Remove
ctx install 
     # install a package
ctx install github:user/repo       # install from GitHub directly
ctx remove 
                # uninstall
ctx list                            # list installed packages

# Update
ctx update                          # update all packages
ctx update @scope/name              # update one package
ctx outdated                        # check for updates
ctx prune                           # remove old versions

# Agent Linking
ctx link                            # list detected agents
ctx link                     # link packages to an agent

# Publishing
ctx login                           # authenticate via GitHub
ctx whoami                          # show current authenticated user
ctx init                            # interactive manifest scaffold
ctx validate                        # validate your manifest
ctx publish                         # publish to the registry (public)
ctx publish --private               # publish as private package

# Organizations
ctx org create                # create an organization
ctx org list                        # list your organizations
ctx org info                  # show org details
ctx org packages              # list org's packages
ctx org add   [--role]   # add member
ctx org remove           # remove member
ctx org delete                # delete org (0 packages required)

# Cross-device Sync
ctx sync export                     # export installed state to local file
ctx sync push                       # upload sync profile to registry
ctx sync pull                       # restore packages on new device
ctx sync status                     # view sync status + last sync time

# Dist Tags
ctx dist-tag ls 
           # list distribution tags
ctx dist-tag add 
    # set a tag (e.g., beta → 2.0.0-beta.1)
ctx dist-tag rm 
          # remove a tag

# Configuration
ctx config list                     # show all settings
ctx config set          # change a setting
ctx config get                 # read a setting

# System
ctx version                         # print version
ctx doctor                          # diagnose environment
ctx upgrade                         # self-update ctx
ctx serve                           # run as MCP server

MCP服务器模式

ctx可以作为MCP服务器运行,让AI代理直接管理包:

{
  "mcpServers": {
    "ctx": {
      "command": "ctx",
      "args": ["serve"]
    }
  }
}

可用工具: ctx_search, ctx_install, ctx_info, ctx_list

包裹清单

包由 ctx.yaml 文件。跑 ctx init 脚手架一。

Skill example

name: "@scope/my-skill"
version: "1.0.0"
type: skill
description: "Code review skill for AI agents"

skill:
  entry: SKILL.md
  tags: [review, code-quality]
  compatibility: "claude-code, cursor"

MCP server example

name: "@scope/github-mcp"
version: "2.1.0"
type: mcp
description: "GitHub MCP server"

skill:
  entry: "skills/github-mcp/SKILL.md"
  origin: native

mcp:
  transport: stdio
  command: npx
  args: ["-y", "@modelcontextprotocol/server-github"]
  env:
    - name: GITHUB_TOKEN
      required: true
      description: "GitHub personal access token"

CLI tool example

name: "@community/ripgrep"
version: "14.1.0"
type: cli
description: "Fast regex search tool"

skill:
  entry: "skills/ripgrep/SKILL.md"
  origin: native

cli:
  binary: rg
  verify: "rg --version"

install:
  brew: ripgrep
  cargo: ripgrep
  platforms:
    darwin-arm64:
      binary: "https://github.com/.../ripgrep-14.1.0-aarch64-apple-darwin.tar.gz"
    linux-amd64:
      binary: "https://github.com/.../ripgrep-14.1.0-x86_64-unknown-linux-musl.tar.gz"

配置

文件

路径目的
~/.ctx/config.yaml注册表URL、用户名、隐私设置
~/.ctx/packages/已安装的软件包
~/.ctx/links.json代理链接注册表
系统密钥链身份验证令牌(macOS密钥链/Linux秘密工具)

设置

ctx config set update_check false      # disable update checks
ctx config set network_mode offline    # disable all network access
ctx config set registry https://...    # use a custom registry

环境变量

变量描述
CTX_HOME覆盖配置目录
CTX_DATA_HOME覆盖数据目录
CTX_CACHE_HOME覆盖缓存目录
CTX_REGISTRY覆盖注册表URL

旗帜

标志描述
--offline禁用此命令的所有网络访问
--jsonJSON输出
--quiet / -q最小输出
--yes / -y跳过确认提示

隐私

  • 没有遥测。 ctx不收集分析或使用数据。
  • 系统密钥链中的令牌。 身份验证令牌存储在macOS Keychain或Linux中 secret-tool,不在配置文件中。
  • 更新检查是可选的。 禁用 ctx config set update_check false--offline.
  • 所有文件0600/0700。 敏感文件仅供所有者阅读。
  • 没有数据离开您的机器 除非您明确搜索、安装、发布或登录。

建筑

cmd/ctx/              CLI commands (Cobra)
internal/
  ├── config/         Configuration + file permissions
  ├── auth/           GitHub OAuth + system keychain
  ├── registry/       HTTP client for getctx.org API
  ├── resolver/       Version + source resolution
  ├── installer/      Download, extract, link packages
  ├── adapter/        Bridge to native pkg managers (brew, npm, pip, cargo)
  ├── agent/          Agent detection + config linking (18 agents)
  ├── mcpserver/      MCP server mode (ctx serve)
  └── output/         Human + JSON output formatting

贡献

git clone https://github.com/ctx-hq/ctx.git
cd ctx
make build      # build binary
make test       # run tests
make lint       # run linter
make check      # vet + lint + test

发布过程

通过以下方式自动发布 请释放.推动传统承诺 main 并且自动创建发布PR。

管道(GoReleaser+GitHub Actions)处理交叉编译(Linux/MOSC/Windows x AMD64/ARM64)、shell补全、联合签名、SBOM、Homebrew/Scoop/deb/rpm包和构建来源证明。

许可证

麻省理工学院

目录标签

目录标签

命令行工具开发工具GoClaude包管理器本地部署AI编码代理扩展管理

支持客户端

ClaudeCursorWindsurfCline

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP