cli-anything-chromadb
它能做什么
这个技能让智能体管理 ChromaDB 向量数据库,它能存储文本,以便按含义进行搜索。适合为 AI 工具构建搜索或记忆功能的人。
适用场景
- ✓当你想在 ChromaDB 数据库中创建或列出集合的时候。
- ✓当你想把文档添加到集合中,以便日后搜索的时候。
- ✓当你想按含义而不是精确词语搜索已存储文本的时候。
技能链接
https://github.com/HKUDS/CLI-Anything/blob/main/chromadb/agent-harness/cli_anything/chromadb/skills/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的 hub_knowledge 集合中搜索关于我们如何部署应用的笔记。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能通过 HTTP API 向你的 ChromaDB 服务器发送命令。它可以列出集合、管理文档,并运行返回最接近匹配结果的语义查询。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
cli-anything-chromadb
A stateless command-line interface for ChromaDB vector database, built on the HTTP API v2. Designed for AI agents and power users who need to manage collections, documents, and run semantic queries without a browser UI.
Installation
This CLI is installed as part of the cli-anything-chromadb package:
pip install cli-anything-chromadb
Prerequisites:
- Python 3.10+
- ChromaDB server running at localhost:8000 (or specify via --host)
Usage
Basic Commands
# Show help
cli-anything-chromadb --help
# Start interactive REPL mode
cli-anything-chromadb
# Check server health
cli-anything-chromadb --json server heartbeat
# List all collections
cli-anything-chromadb --json collection list
# Semantic search
cli-anything-chromadb --json query search --collection hub_knowledge --text "How to deploy"
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
cli-anything-chromadb
# Enter commands interactively with tab-completion and history
Command Groups
server
Server health and version commands.
| Command | Description |
|---|---|
heartbeat |
Check ChromaDB server health |
version |
Get ChromaDB server version |
collection
Manage ChromaDB collections.
| Command | Description |
|---|---|
list |
List all collections |
create --name NAME |
Create a new collection |
delete --name NAME |
Delete a collection |
info NAME |
Get collection info |
document
Manage documents in collections.
| Command | Description |
|---|---|
add --collection C --id ID --document TEXT |
Add document(s) |
get --collection C |
Get documents |
delete --collection C --id ID |
Delete document(s) |
count --collection C |
Count documents |
query
Semantic search against collections.
| Command | Description |
|---|---|
search --collection C --text T |
Semantic search |
Output Formats
All commands support dual output modes:
- Human-readable (default): Tables, colors, formatted text
- Machine-readable (
--jsonflag): Structured JSON for agent consumption
# Human output
cli-anything-chromadb server heartbeat
# JSON output for agents
cli-anything-chromadb --json server heartbeat
For AI Agents
When using this CLI programmatically:
- Always use
--jsonflag for parseable output - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
- Use
--hostto connect to non-default ChromaDB instances
Version
1.0.0
常见问题
我需要运行 ChromaDB 服务器吗?
需要。必须有 ChromaDB 服务器在运行,默认地址为 localhost 的 8000 端口。
语义搜索是什么意思?
它会查找与你的查询含义相符的文本,而不只是包含相同词语的文本。
脚本可以使用它吗?
可以。它的 JSON 输出便于脚本和 AI 智能体读取。
详情
作者的原始描述
Command-line interface for ChromaDB - A stateless CLI for managing vector database collections, documents, and semantic search. Designed for AI agents and automation via the ChromaDB HTTP API v2.
repo: HKUDS/CLI-Anything
热度
- GitHub 星标
- 58k
- 排名
- #3188
- 许可证
- Apache-2.0
- 更新时间
- 2026/9/21
评论
- …
同一仓库的更多技能
cli-anything-3mf
58k帮你的智能体检查和修复 3D 打印文件,包括查找圆孔、调整孔径、修复网格,以及比较两个文件。
cli-anything-qgis
58k帮你的智能体在终端中打开、编辑和导出 QGIS 地图项目,包括图层、要素、打印布局和处理工具。
cli-anything-adguardhome
58k帮你的智能体管理 AdGuard Home,这是一款全网络广告拦截器,可管理过滤规则、DNS 重写、客户端和查询日志。
cli-anything-anygen
58k帮你的智能体借助 AnyGen 服务,根据文字提示生成幻灯片、文档、网站和图表。