跳到正文
Skillpedia
数据库58k · #3188

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/CLI-Anything/blob/main/chromadb/agent-harness/cli_anything/chromadb/skills/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 (--json flag): 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:

  1. Always use --json flag for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Use --host to 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能