meilisearch-rest-cli
A full-coverage CLI for the Meilisearch REST API. Every endpoint in the official OpenAPI spec, exposed as a flat command with typed flags.
Generated from Meilisearch's official OpenAPI spec using openapi-cli-gen.
Why
Meilisearch has been asked for a CLI for years (roadmap request). Meanwhile, users drop to curl for admin operations like managing indexes, API keys, tasks, and settings.
This CLI covers every endpoint in the REST API automatically — nothing to maintain, no features skipped. When Meilisearch updates their spec, a regeneration gets you the new commands.
Install
pipx install meilisearch-rest-cli
# Or with uv
uv tool install meilisearch-rest-cli
Setup
Point it at your Meilisearch instance (default is http://localhost:7700):
export MEILISEARCH_REST_CLI_BASE_URL=http://localhost:7700
Authentication
If your Meilisearch instance uses an API key, set it via environment variable:
export MEILISEARCH_REST_CLI_TOKEN=your-master-key
The CLI will automatically send it as a Bearer token on every request.
Quick Start
All commands below have been verified against a live Meilisearch 1.41 instance.
# Server health + version
meilisearch-rest-cli health get
meilisearch-rest-cli version get
# List all indexes
meilisearch-rest-cli indexes list
# Create an index
meilisearch-rest-cli indexes create-index --uid movies --primary-key id
# Add documents (use --root — document bodies are user-defined, no typed flags)
meilisearch-rest-cli documents replace --index-uid movies --root '[
{"id": 1, "title": "The Matrix", "year": 1999},
{"id": 2, "title": "Inception", "year": 2010},
{"id": 3, "title": "Titanic", "year": 1997}
]'
# Check task status (writes are async; watch for `succeeded` and indexedDocuments)
meilisearch-rest-cli tasks get-tasks --limit 3
# Search — use --root to pass a raw SearchQuery JSON, which dodges the upstream
# snake_case/camelCase field-name mismatch in Meilisearch's own OpenAPI spec
meilisearch-rest-cli indexes search-with-post --index-uid movies --root '{
"q": "matrix",
"limit": 5
}'
# Stats
meilisearch-rest-cli stats get
meilisearch-rest-cli stats get-index --index-uid movies
# Delete the index
meilisearch-rest-cli indexes delete-index --index-uid movies
A note on --root for searches
Meilisearch's official OpenAPI spec declares SearchQuery field names in snake_case (retrieve_vectors, hits_per_page, attributes_to_retrieve...) but the Meilisearch server actually expects camelCase on the wire (retrieveVectors, hitsPerPage, attributesToRetrieve). This is an upstream spec bug — not specific to this CLI.
The --root flag lets you bypass that mismatch entirely: pass a camelCase JSON payload that matches the actual server API, and the CLI sends it verbatim:
meilisearch-rest-cli indexes search-with-post --index-uid movies --root '{
"q": "matrix",
"limit": 10,
"offset": 0,
"attributesToRetrieve": ["title", "year"],
"showRankingScore": true
}'
Once Meilisearch fixes their spec, the typed flags will work too. Until then, use --root for searches.
Discover All Commands
# Top-level groups
meilisearch-rest-cli --help
# Commands in a group
meilisearch-rest-cli indexes --help
# Flags for a specific command
meilisearch-rest-cli indexes create-index --help
Output Formats
Every command accepts --output-format:
meilisearch-rest-cli indexes list --output-format table
meilisearch-rest-cli indexes list --output-format yaml
meilisearch-rest-cli indexes list --output-format raw
Command Groups
| Group | What it covers |
|---|---|
health |
Server health check |
version |
Server version info |
stats |
Database + per-index stats + metrics |
indexes |
CRUD for indexes + search-with-post / search-with-url-query / swap |
documents |
Add / update / replace / delete / query / get documents |
settings |
All index settings (70+ commands: facet-search, embedders, synonyms, stop-words, ranking-rules, proximity-precision, prefix-search, filterable/sortable/searchable attributes, etc.) |
tasks |
List, query, cancel, delete tasks |
batches |
Batch info |
keys |
API key management |
snapshots |
Create snapshots |
dumps |
Create dumps |
experimental-features |
Enable / disable experimental features |
multi-search |
Search multiple indexes in one request |
facet-search |
Faceted search |
similar-documents |
Find similar documents (semantic) |
logs |
Configure and stream logs |
network |
Remote instance network config |
How It Works
This package is a thin wrapper:
- Embeds the Meilisearch OpenAPI spec (
spec.yaml) - Delegates CLI generation to openapi-cli-gen at runtime
- Pre-configures the base URL for local Meilisearch
If you want to generate a CLI for any other OpenAPI spec, check out openapi-cli-gen.
License
MIT. Not affiliated with Meilisearch — this is an unofficial community CLI built on top of their public OpenAPI spec.
Metadata
Release files for meilisearch-rest-cli 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| meilisearch_rest_cli-0.1.3.tar.gz | 36.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| meilisearch_rest_cli-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.2 kB
Release files / meilisearch_rest_cli-0.1.3.tar.gz
| Download URL | meilisearch_rest_cli-0.1.3.tar.gz |
|---|---|
| Size | 36.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
753e8ee2d9f864811fe8b56790b40ec785f6b6e983cde5e21ad946e4178c956f
|
|
BLAKE2b-256 checksum How to use checksums |
8012f4dfa48ae0231edb5a33daa0363314c713749b740ba5720ca488be7c4cf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / meilisearch_rest_cli-0.1.3-py3-none-any.whl
| Download URL | meilisearch_rest_cli-0.1.3-py3-none-any.whl |
|---|---|
| Size | 39.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
820de7ede592b2c18d4e92aa1afb2fd122decfd828a0440aa2b16701210b3ff2
|
|
BLAKE2b-256 checksum How to use checksums |
e842ee0438ab41684e3f545733d77a3c2f2f0652443b1a19ddca208ed3539968
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|