Cli Anything Chromadb

作者 hkuds34f519533bc1无许可证51K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库2周前更新

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.

仅含说明Data & Analytics
AI 生成的概览

用于管理 ChromaDB 集合、文档和语义搜索的无状态命令行界面。

功能
该技能介绍一个基于 ChromaDB HTTP API v2 的向量数据库命令行界面。它涵盖服务器健康与版本检查、集合的创建、列出、删除和查看,文档的添加、获取、删除和计数,以及语义搜索查询。命令默认输出人类可读结果,使用 --json 标志可输出结构化 JSON,并提供交互式 REPL 模式。
适用场景
当智能体或高级用户需要在没有浏览器界面的情况下管理 ChromaDB 集合和文档,或执行语义查询时使用。它适合消费 JSON 输出和返回码的自动化与脚本化工作流。
运行要求
需要 Python 3.10+,以及可通过 localhost:8000 或 --host 指定的主机访问的 ChromaDB 服务器。该包通过 pip install cli-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.

Installation

This CLI is installed as part of the cli-anything-chromadb package:

bash
pip install cli-anything-chromadb

Prerequisites:

  • Python 3.10+
  • ChromaDB server running at localhost:8000 (or specify via --host)

Usage

Basic Commands

bash
# Show helpcli-anything-chromadb --help
# Start interactive REPL modecli-anything-chromadb
# Check server healthcli-anything-chromadb --json server heartbeat
# List all collectionscli-anything-chromadb --json collection list
# Semantic searchcli-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:

bash
cli-anything-chromadb# Enter commands interactively with tab-completion and history

Command Groups

server

Server health and version commands.

CommandDescription
heartbeatCheck ChromaDB server health
versionGet ChromaDB server version

collection

Manage ChromaDB collections.

CommandDescription
listList all collections
create --name NAMECreate a new collection
delete --name NAMEDelete a collection
info NAMEGet collection info

document

Manage documents in collections.

CommandDescription
add --collection C --id ID --document TEXTAdd document(s)
get --collection CGet documents
delete --collection C --id IDDelete document(s)
count --collection CCount documents

query

Semantic search against collections.

CommandDescription
search --collection C --text TSemantic 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
bash
# Human outputcli-anything-chromadb server heartbeat
# JSON output for agentscli-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

来源与署名

来源:hkuds/cli-anything位于skills/cli-anything-chromadb提交34f5195

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架