cli-anything-chromadb
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecli-anything-chromadb
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.
这是一款基于HTTP API v2构建的ChromaDB向量数据库无状态命令行界面,专为AI Agent和高级用户设计,无需浏览器UI即可管理集合、文档并运行语义查询。
Installation
安装
This CLI is installed as part of the cli-anything-chromadb package:
bash
pip install cli-anything-chromadbPrerequisites:
- Python 3.10+
- ChromaDB server running at localhost:8000 (or specify via --host)
本CLI作为cli-anything-chromadb包的一部分进行安装:
bash
pip install cli-anything-chromadb前置要求:
- Python 3.10及以上版本
- ChromaDB服务器运行在localhost:8000(或通过--host参数指定其他地址)
Usage
使用方法
Basic Commands
基础命令
bash
undefinedbash
undefinedShow help
显示帮助信息
cli-anything-chromadb --help
cli-anything-chromadb --help
Start interactive REPL mode
启动交互式REPL模式
cli-anything-chromadb
cli-anything-chromadb
Check server health
检查服务器健康状态
cli-anything-chromadb --json server heartbeat
cli-anything-chromadb --json server heartbeat
List all collections
列出所有集合
cli-anything-chromadb --json collection list
cli-anything-chromadb --json collection list
Semantic search
语义搜索
cli-anything-chromadb --json query search --collection hub_knowledge --text "How to deploy"
undefinedcli-anything-chromadb --json query search --collection hub_knowledge --text "How to deploy"
undefinedREPL Mode
REPL模式
When invoked without a subcommand, the CLI enters an interactive REPL session:
bash
cli-anything-chromadb当不指定子命令调用时,CLI会进入交互式REPL会话:
bash
cli-anything-chromadbEnter commands interactively with tab-completion and history
可通过交互式方式输入命令,支持自动补全和历史记录
undefinedundefinedCommand Groups
命令组
server
server
Server health and version commands.
| Command | Description |
|---|---|
| Check ChromaDB server health |
| Get ChromaDB server version |
服务器健康状态和版本相关命令。
| 命令 | 描述 |
|---|---|
| 检查ChromaDB服务器健康状态 |
| 获取ChromaDB服务器版本 |
collection
collection
Manage ChromaDB collections.
| Command | Description |
|---|---|
| List all collections |
| Create a new collection |
| Delete a collection |
| Get collection info |
管理ChromaDB集合。
| 命令 | 描述 |
|---|---|
| 列出所有集合 |
| 创建新集合 |
| 删除集合 |
| 获取集合信息 |
document
document
Manage documents in collections.
| Command | Description |
|---|---|
| Add document(s) |
| Get documents |
| Delete document(s) |
| Count documents |
管理集合中的文档。
| 命令 | 描述 |
|---|---|
| 添加文档 |
| 获取文档 |
| 删除文档 |
| 统计文档数量 |
query
query
Semantic search against collections.
| Command | Description |
|---|---|
| Semantic search |
针对集合进行语义搜索。
| 命令 | 描述 |
|---|---|
| 语义搜索 |
Output Formats
输出格式
All commands support dual output modes:
- Human-readable (default): Tables, colors, formatted text
- Machine-readable (flag): Structured JSON for agent consumption
--json
bash
undefined所有命令支持两种输出模式:
- 人类可读格式(默认):表格、彩色文本、格式化内容
- 机器可读格式(参数):结构化JSON,供Agent使用
--json
bash
undefinedHuman output
人类可读输出
cli-anything-chromadb server heartbeat
cli-anything-chromadb server heartbeat
JSON output for agents
供Agent使用的JSON输出
cli-anything-chromadb --json server heartbeat
undefinedcli-anything-chromadb --json server heartbeat
undefinedFor AI Agents
面向AI Agent的使用说明
When using this CLI programmatically:
- Always use flag for parseable output
--json - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
- Use to connect to non-default ChromaDB instances
--host
以编程方式使用本CLI时:
- 始终使用参数以获得可解析的输出
--json - 检查返回码——0表示成功,非0表示错误
- 解析stderr以获取失败时的错误信息
- 使用参数连接到非默认的ChromaDB实例
--host
Version
版本
1.0.0
1.0.0