使用说明
claude-list
CLI工具,用于在Claude Code中查看已安装的插件、技能、代理和MCP服务器。
Why? | Quick Start | Features | Installation | Architecture
最新消息🔥
- [2026/01] 发布v0.1.2,具有彩色输出和搜索功能
- [2026/01] 发布v0.1.1
-l标志支持和npm包 - [2026/01] 发布到crates.io-现在可以通过安装
cargo install claude-list - [2026/01] 通过cargo dist多平台构建添加了Homebrew支持
为什么选择克劳德名单?
一个遵循Unix哲学的Rust CLI工具——做好一件事。它读取你的克劳德密码 .claude 目录,以简洁、简约的格式呈现关键信息,具有现代美学。
- 🎨 清洁输出 -默认情况下为人类可读的紧凑格式
- 🔍 详细视图 -按需提供版本、源和路径信息
- 🤖 可编写脚本的 -用于自动化和集成的JSON输出
- ⚡ 快速 -亚秒执行(<0.03秒)
- 🔒 安全 -优雅地处理丢失的文件和部分数据
- 📦 多平台 -Linux和macOS的预构建二进制文件
快速开始
# Install via Homebrew (macOS)
brew tap elliotxx/tap && brew install elliotxx/tap/claude-list
# OR via shell script (Linux/macOS)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/elliotxx/claude-list/releases/latest/download/claude-list-installer.sh | sh
# View your Claude Code environment
claude-list
需要更多细节? 看 安装 下面是所有安装选项。
特性
输出模式
| 模式 | 命令 | 描述 |
|---|---|---|
| 紧凑型 | claude-list |
计数汇总(按类型着色) |
| 详细 | claude-list -l |
完整信息,包括版本、来源、路径 |
| JSON | claude-list --json |
机器可读输出 |
彩色输出
组件以不同的颜色显示,便于识别:
| 组件类型 | 颜色 |
|---|---|
| 插件 | 蓝色 |
| 技能 | 绿色 |
| MCP服务器 | 黄色 |
| 钩子 | 洋红色 |
| 代理人 | 红色 |
| 命令 | 橙色 |
在以下情况下,颜色会自动禁用:
- 使用
--no-color旗帜 NO_COLOR环境变量已设置- 输出被管道传输或重定向
搜索
通过灵活匹配按名称搜索组件:
# Single keyword (case-insensitive)
claude-list --search context
# Multiple keywords (AND logic - all must match)
claude-list --search "context plugin"
# Combine with filters
claude-list --search api --plugins
过滤
筛选以显示特定组件类型:
claude-list --plugins # Only plugins
claude-list --skills # Only skills
claude-list --sessions # Only sessions
claude-list --mcp # Only MCP servers
claude-list --hooks # Only hooks
claude-list --agents # Only agents
claude-list --commands # Only commands
# Combine filters
claude-list --plugins --skills
自定义配置目录
claude-list --config /path/to/.claude
演示
命令行输出
以下是claude list在实际操作中的样子:
输出示例
压缩模式(默认)
CLAUDE-LIST v0.1.2
CONFIG: /Users/user/.claude
PLUGINS 3 installed
context7
plugin_playwright
plugin_example
SKILLS 12 available
brainstorming
claude-code-guide
...
SESSIONS 47 recorded
MCP 2 servers
test-mcp
another-mcp
详细模式(-l)
CLAUDE-LIST v0.1.2
CONFIG: /Users/user/.claude
PLUGINS 3 installed
NAME VERSION SOURCE PATH
------------------- ------- --------- ---------------------------------
context7 2.1.0 official /Users/user/.claude/settings.json
plugin_playwright 1.0.0 third-party /Users/user/.claude/settings.json
plugin_example 0.5.0 community /Users/user/.claude/settings.json
JSON模式(--json)
{
"version": "0.1.2",
"config_dir": "/Users/user/.claude",
"plugins": [...],
"skills": [...],
"sessions": {...},
"mcp_servers": [...],
"hooks": [...],
"agents": [...],
"commands": [...]
}
安装
选项1:来自Homebrew(macOS)
brew tap elliotxx/tap && brew install elliotxx/tap/claude-list
选项2:从Shell脚本(Linux/macOS)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/elliotxx/claude-list/releases/latest/download/claude-list-installer.sh | sh
选项3:来自npm
npm install -g @elliotxx/claude-list
选项4:来自crates.io
cargo install claude-list
选项5:来自GitHub发布
从下载预构建的二进制文件 GitHub发布:
# Linux (x86_64)
wget https://github.com/elliotxx/claude-list/releases/latest/download/claude-list-x86_64-unknown-linux-gnu.tar.gz
tar -xzf claude-list-x86_64-unknown-linux-gnu.tar.gz
./claude-list
# macOS (Apple Silicon)
wget https://github.com/elliotxx/claude-list/releases/latest/download/claude-list-aarch64-apple-darwin.tar.gz
tar -xzf claude-list-aarch64-apple-darwin.tar.gz
./claude-list
选项6:来源
git clone https://github.com/elliotxx/claude-list.git
cd claude-list
cargo build --release
cargo install --path .
建筑
组件架构
┌─────────────────────────────────────────────────────────┐
│ User Input │
│ (CLI Arguments) │
└──────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Main Entry Point (src/main.rs) │
│ • Parse CLI arguments │
│ • Dispatch to formatters │
└──────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Parser Layer (src/parsers/) │
│ • plugins.rs → Parse installed plugins │
│ • skills.rs → Parse skills │
│ • sessions.rs → Parse session history │
│ • mcp.rs → Parse MCP servers │
│ • hooks.rs → Parse hooks │
│ • agents.rs → Parse agents │
│ • commands.rs → Parse commands │
└──────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Formatter Layer (src/formatters/) │
│ • compact.rs → Human-readable summary │
│ • detailed.rs → Full info with version/source/path │
│ • json.rs → Machine-readable JSON output │
└─────────────────────────────────────────────────────────┘
关键设计决策
- 使用的图案:Unix哲学——单一责任,编写简单工具
- 技术栈:Rust 1.75+、clap(CLI)、serde(JSON)、anyhow(错误处理)、anstyle(颜色)、unicode宽度(ANSI宽度)
- 可扩展性:每个解析器都是独立的,易于扩展
- 错误处理:对丢失的文件进行优雅的降级
支持的数据源
| 组件 | 格式 | 位置 |
|---|---|---|
| 插件 | JSON | .claude/plugins/installed_plugins.json |
| 技能 | YAML | .claude/skills/*/skill.yaml |
| MCP服务器 | 目录/YAML | .claude/mcp-servers/*/ |
| 会话 | JSON行 | .claude/history.jsonl |
| 命令 | Markdown | .claude/commands/*.md |
| 代理 | Markdown | .claude/agents/*.md |
| 钩子 | Markdown | .claude/hooks/*.md |
发展
先决条件
- 锈蚀1.75+
- 货物
快速开始
# Run all checks
cargo fmt && cargo clippy && cargo test
# Run tests only
cargo test
# Run integration tests
cargo test --test cli_test
建筑
# Debug build
cargo build
# Release build
cargo build --release
# Check format
cargo fmt --check
# Run clippy
cargo clippy --all-features -- -D warnings
测试
# Run all tests
cargo test --all-features
# Run with verbose output
cargo test --all-features --verbose
# Run specific test
cargo test test_name
出版
通过以下方式自动发布 货物分配:
- 推送匹配的git标签
x.y.z(例如。,0.1.1) - CI管道会自动触发:
- 计划:生成生成生成清单
- 构建:多平台构建(x86_64 Linux、x86_64/aarch64 macOS)
- 发布:GitHub发布+Homebrew
发布过程
# 1. Update version in Cargo.toml
# Edit Cargo.toml: version = "0.1.2" → "0.1.3"
# 2. Commit version change
git add -A && git commit -m "chore: bump version to 0.1.3"
# 3. Create git tag
git tag 0.1.3
# 4. Push to GitHub (including tags)
git push && git push --tags
# 5. After CI completes, manually publish to crates.io
cargo publish
备注:发布到crates.io需要手动
cargo publishas cargo dist不支持自动crates.io发布。
需要CI令牌
| 秘密 | 目的 | 地点 |
|---|---|---|
CARGO_REGISTRY_TOKEN |
发布到crates.io | crates.io/settings/tokens |
HOMEBREW_TAP_TOKEN |
发布到Homebrew | GitHub设置 |
NPM_TOKEN |
发布到npm(需要绕过2FA) | npmjs.com/settings/tokens |
贡献
我们欢迎捐款!请随时提交问题和拉取请求。
贡献领域
- 功能开发:添加新的解析器或格式化程序
- 漏洞修补:解决问题并提高稳定性
- 文档:改进指南和示例
- 测试:添加测试并提高覆盖率
贡献者快速入门
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/elliotxx/claude-list.git
cd claude-list
# Follow installation steps above
# Create feature branch
git checkout -b feature/your-feature-name
# Make changes, test, then commit and push
git add .
git commit -m "feat: description"
git push origin feature/your-feature-name
许可证
该项目根据 MIT许可证 -看看 许可证 文件以获取详细信息。
致谢
Built with ❤️ for elliotxx
Parse and display your Claude Code Info
