A full-coverage CLI for the Qdrant vector database REST API, generated from the official OpenAPI spec
Project description
qdrant-rest-cli
A full-coverage CLI for the Qdrant vector database REST API. Every endpoint in Qdrant's OpenAPI spec, exposed as a typed command. Generated from Qdrant's official OpenAPI spec using openapi-cli-gen.
Why
Qdrant ships excellent client SDKs (Python, Rust, Go, JS), but no REST CLI. For shell scripting, Makefile targets, CI pipelines, and interactive ad-hoc queries, most people drop to raw curl and hand-build JSON payloads.
This CLI gives you the entire Qdrant REST API as flat shell commands with typed flags — collections, points, snapshots, cluster, shards — without writing any Python or curl boilerplate. When Qdrant adds endpoints, a regeneration picks them up.
Install
pipx install qdrant-rest-cli
# Or with uv
uv tool install qdrant-rest-cli
Setup
Point it at your Qdrant instance (default is http://localhost:6333):
export QDRANT_REST_CLI_BASE_URL=http://localhost:6333
If your instance uses an API key:
export QDRANT_REST_CLI_API_KEY=your-api-key
The CLI sends it as the api-key header automatically, matching Qdrant's security scheme.
Quick Start
# Server health
qdrant-rest-cli service root
qdrant-rest-cli service healthz
# List collections
qdrant-rest-cli collections get-collections
# Create a collection (4-dim vectors, cosine distance)
qdrant-rest-cli collections create \
--collection-name pets \
--vectors '{"size": 4, "distance": "Cosine"}'
# Upsert points with payloads
qdrant-rest-cli points upsert --collection-name pets --root '{
"points": [
{"id": 1, "vector": [0.1, 0.2, 0.3, 0.4], "payload": {"name": "Rex", "species": "dog"}},
{"id": 2, "vector": [0.2, 0.1, 0.4, 0.3], "payload": {"name": "Whiskers", "species": "cat"}}
]
}'
# Count points
qdrant-rest-cli points count --collection-name pets
# Semantic search
qdrant-rest-cli points search --collection-name pets \
--vector '[0.15, 0.15, 0.35, 0.35]' \
--limit 5
# Scroll through all points
qdrant-rest-cli points scroll --collection-name pets --limit 10
# Get a collection's info
qdrant-rest-cli collections get --collection-name pets
# Delete a collection
qdrant-rest-cli collections delete --collection-name pets
Discover All Commands
# Top-level groups
qdrant-rest-cli --help
# Commands in a group
qdrant-rest-cli collections --help
# Flags for a specific command
qdrant-rest-cli points search --help
Output Formats
Every command accepts --output-format:
qdrant-rest-cli collections get-collections --output-format table
qdrant-rest-cli collections get-collections --output-format yaml
qdrant-rest-cli collections get-collections --output-format raw
Command Groups
| Group | What it covers |
|---|---|
service |
Server root, health, telemetry, metrics, readiness |
collections |
Full CRUD for collections + aliases + info |
points |
Upsert, get, delete, scroll, count, batch operations |
search |
Vector search, recommend, discover, query |
snapshots |
Create / list / delete / download snapshots |
cluster |
Cluster status, peer management |
shards |
Shard key operations |
indexes |
Payload index management |
Passing Complex JSON Bodies
Qdrant endpoints with deeply nested unions (like points upsert, batch operations) accept a JSON string via --root:
qdrant-rest-cli points upsert --collection-name pets --root '{
"points": [...]
}'
Flat endpoints (like collections create) accept typed flags directly:
qdrant-rest-cli collections create --collection-name pets --vectors '{"size": 4, "distance": "Cosine"}'
Both styles work; use whichever is clearer for a given call.
Real Example: End-to-End Vector Search
$ qdrant-rest-cli collections create \
--collection-name movies \
--vectors '{"size": 4, "distance": "Cosine"}'
{"result": true, "status": "ok", "time": 0.012}
$ qdrant-rest-cli points upsert --collection-name movies --root '{
"points": [
{"id": 1, "vector": [0.9, 0.1, 0.1, 0.1], "payload": {"title": "The Matrix"}},
{"id": 2, "vector": [0.1, 0.9, 0.1, 0.1], "payload": {"title": "Titanic"}}
]
}'
{"result": {"operation_id": 0, "status": "completed"}, "status": "ok"}
$ qdrant-rest-cli points search --collection-name movies \
--vector '[0.85, 0.15, 0.1, 0.1]' \
--limit 2
{
"result": [
{"id": 1, "score": 0.998, "payload": {"title": "The Matrix"}},
{"id": 2, "score": 0.204, "payload": {"title": "Titanic"}}
],
"status": "ok"
}
How It Works
This package is a thin wrapper:
- Embeds the Qdrant OpenAPI spec (
spec.yaml) - Delegates CLI generation to openapi-cli-gen at runtime
- Default base URL:
http://localhost:6333
Since it's spec-driven, new Qdrant endpoints show up automatically on regeneration — no manual wrapping to fall behind.
License
MIT. Not affiliated with Qdrant — this is an unofficial community CLI built on top of their public OpenAPI spec.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qdrant_rest_cli-0.1.0.tar.gz.
File metadata
- Download URL: qdrant_rest_cli-0.1.0.tar.gz
- Upload date:
- Size: 48.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6615c64426504f946efcadf4e993e7d4c3f094e1e9a28b4e17e2202d7f45ee43
|
|
| MD5 |
cc52d5b2e7d1c6ec135b6ef19c357587
|
|
| BLAKE2b-256 |
5980448bc764a11fb921051062b32dd60870ce563fe0c55ae3b94dd11b617a21
|
File details
Details for the file qdrant_rest_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: qdrant_rest_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 51.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eabef5dc1a52e3210bd2f9918b8b7fa765aa452d98c5fc355b1e6c6976f7a97b
|
|
| MD5 |
84c05b40aec76974caab374e75d86508
|
|
| BLAKE2b-256 |
19f369093b0dde98f86c1210a6e342b84515ff2c0f7278568fbd4de192481315
|