Cli Anything Chromadb

hkuds/cli-anything/skills/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 從公開儲存庫中收錄這些內容。

檢舉或申請下架