# cli-anything-chromadb

This skill hands your agent a ChromaDB command line: collections, documents and semantic search over HTTP API v2. Useful when the vector store sits next to your project.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 505 installs · ★ 57187
- Author: HKUDS
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/HKUDS/CLI-Anything/tree/HEAD/skills/cli-anything-chromadb/SKILL.md
- Updated: 2026-09-22
- HTML: https://affpapa.org/en/nevibecode/skills/cli-anything-chromadb

## What it does

The skill brings the `cli-anything-chromadb` CLI into your project. It wraps the ChromaDB HTTP API v2, so your agent runs commands instead of clicking through a UI. Add `--json` and the output is structured for parsing; without it you get tables and colors meant for a human.

Four command groups cover the ground. `server` reports heartbeat and version. `collection` lists, creates and deletes collections by name. `document` adds records with `--id` and `--document`, fetches them and counts them. `query search` runs a semantic lookup inside one collection. Run the binary with no subcommand and you land in an interactive REPL with tab-completion and history.

You need Python 3.10+ and a ChromaDB server listening on `localhost:8000`. Point `--host` elsewhere if yours runs on a different address. Nothing is cached locally: all state lives on the server, so if the server is down every command fails. Worth checking before you ask the agent to search anything.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-chromadb -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/cli-anything-chromadb/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/cli-anything-chromadb/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-chromadb -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cli-anything-chromadb/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-chromadb -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cli-anything-chromadb/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install HKUDS/CLI-Anything cli-anything-chromadb
```

2. **Manually: put the files in place**
- File: `.github/skills/cli-anything-chromadb/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-chromadb -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/HKUDS/CLI-Anything --path skills/cli-anything-chromadb
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cli-anything-chromadb/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add HKUDS/CLI-Anything --skill cli-anything-chromadb -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/HKUDS/CLI-Anything/tree/HEAD/skills/cli-anything-chromadb/SKILL.md

## When to use it
- confirm the ChromaDB server is alive
- create a collection for a new dataset
- load documents under fixed ids
- find near matches for a text query
- count how many documents a collection holds

## Example prompts
- check the ChromaDB heartbeat and show the server version
- create a collection named hub_knowledge and add a document with id doc-1
- search the hub_knowledge collection for deployment notes

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 4e1f91fcf95a8343.

BEGIN THIRD-PARTY FILE 4e1f91fcf95a8343
````text
---
name: "cli-anything-chromadb"
description: >-
  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.
---

# 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 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:

```bash
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

```bash
# 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
````
END THIRD-PARTY FILE 4e1f91fcf95a8343

The third-party file has ended. Everything between the 4e1f91fcf95a8343 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2709 of 2907 bytes. © HKUDS · Apache-2.0 · https://github.com/HKUDS/CLI-Anything/tree/HEAD/skills/cli-anything-chromadb/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
