Communitygithub.com

cli-anything-chromadb

为 AI 代理和高级用户设计的无状态 ChromaDB 向量数据库命令行界面,基于 HTTP API v2 构建。

cli-anything-chromadb 是什么?

cli-anything-chromadb 是一个专为 AI 代理和命令行爱好者设计的无状态命令行工具,用于与 ChromaDB 向量数据库进行交互。它基于 ChromaDB HTTP API v2 构建,支持集合管理、文档操作和语义查询,无需浏览器界面。该工具支持 Python 3.10 及以上版本,要求 ChromaDB 服务器运行在 localhost:8000(可通过 --host 参数指定)。它提供交互式 REPL 模式和直接命令模式,输出支持人类可读格式和机器可读的 JSON 格式。对于 AI 代理,推荐使用 --json 标志进行程序化调用,并检查返回码以处理错误。该工具特别适合需要自动化管理向量数据库的场景,例如在 CI/CD 管道或智能代理工作流中执行语义搜索和文档管理。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-chromadb

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

cli-anything-chromadb 是做什么的?

基于 HTTP API v2 构建的无状态 ChromaDB 向量数据库命令行界面。专为 AI 代理和高级用户设计,无需浏览器 UI 即可管理集合、文档并运行语义查询。

安装

此 CLI 作为 cli-anything-chromadb 软件包的一部分安装:

pip install cli-anything-chromadb

前置条件:

  • Python 3.10+
  • 在 localhost:8000 运行的 ChromaDB 服务器(或通过 --host 指定)

用法

基本命令

# 显示帮助
cli-anything-chromadb --help

# 启动交互式 REPL 模式
cli-anything-chromadb

# 检查服务器健康状态
cli-anything-chromadb --json server heartbeat

# 列出所有集合
cli-anything-chromadb --json collection list

# 语义搜索
cli-anything-chromadb --json query search --collection hub_knowledge --text "如何部署"

REPL 模式

如果未指定子命令,CLI 会进入交互式 REPL 会话:

cli-anything-chromadb
# 使用 tab 补全和历史记录交互式输入命令

命令组

server

服务器健康状态和版本命令。

命令描述
heartbeat检查 ChromaDB 服务器健康状态
version获取 ChromaDB 服务器版本

collection

管理 ChromaDB 集合。

命令描述
list列出所有集合
create --name NAME创建新集合
delete --name NAME删除集合
info NAME获取集合信息

document

管理集合中的文档。

命令描述
add --collection C --id ID --document TEXT添加文档
get --collection C获取文档
delete --collection C --id ID删除文档
count --collection C统计文档数量

query

针对集合的语义搜索。

命令描述
search --collection C --text T语义搜索

输出格式

所有命令均支持双输出模式:

  • 人类可读(默认):表格、彩色、格式化文本
  • 机器可读(--json 标志):结构化 JSON,供代理消费
# 人类输出
cli-anything-chromadb server heartbeat

# 供代理使用的 JSON 输出
cli-anything-chromadb --json server heartbeat

针对 AI 代理

在编程方式使用此 CLI 时:

  1. 始终使用 --json 标志 以获得可解析的输出
  2. 检查返回码 - 0 表示成功,非零表示错误
  3. 解析 stderr 以获取失败时的错误信息
  4. 使用 --host 连接到非默认 ChromaDB 实例

版本

1.0.0

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

cli-anything-inkscape

>-

相关技能