Weaviate CLI
A powerful command-line interface for managing and interacting with Weaviate vector databases directly from your terminal.
Key Features
- Collections: Create, update, delete and get collection configurations
- Data Management: Import, query, update and delete data with various search types (vector, keyword, hybrid)
- Multi-tenancy: Manage tenants and their states across collections
- Backup & Restore: Create and restore backups with support for S3, GCS and filesystem
- Sharding: Monitor and manage collection shards
- Flexible Configuration: Configure vector indexes, replication, consistency levels and more
- Role Management: Assign and revoke roles and permissions to users
Quick Start
Install using pip:
pip install weaviate-cli
On Mac, install using Homebrew:
brew install weaviate-cli
Basic Usage
# Show available commands
weaviate-cli --help
# Create a collection
weaviate-cli create collection --collection movies --vectorizer transformers
# Import test data
weaviate-cli create data --collection movies --limit 1000
# Query data
weaviate-cli query data --collection movies --search-type hybrid --query "action movies"
Core Commands
- create: Create collections, tenants, backups or import data
- delete: Remove collections, tenants or data
- update: Modify collection settings, tenant states or data
- get: Retrieve collection info, tenant details or shard status
- query: Search data using various methods
- restore: Restore backups from supported backends
- assign: Assign roles and permissions to users
- revoke: Revoke roles and permissions from users
Configuration
Weaviate CLI allows you to configure your cluster endpoints and parameters through a configuration file. By default, the CLI looks for a
configuration file at ~/.config/weaviate/config.json. If this file does not exist, it will be created with the following default values:
{
"host": "localhost",
"http_port": "8080",
"grpc_port": "50051"
}
You can also specify your own configuration file using the --config-file option:
weaviate-cli --config-file /path/to/your/config.json
The configuration file should be a JSON file with the following structure:
{
"host": "your-weaviate-host",
"http_port": "your-http-port",
"grpc_port": "your-grpc-port",
"auth": {
"type": "api_key",
"api_key": "your-api-key"
}
}
If you are using a remote Weaviate instance, you can use the weaviate-cli command to authenticate with your Weaviate instance.
Here you can see an example on how the configuration file should look like if you are connecting to a WCD cluster:
{
"host": "thisisaninventedcluster.url.s3.us-west3.prov.weaviate.cloud",
"auth": {
"type": "api_key",
"api_key": "jfeRFsdfRfSasgsDoNOtTrYToUsErRQwqqdZfghasd"
},
"headers":{
"X-OpenAI-Api-Key":"OPEN_AI_KEY",
"X-Cohere-Api-Key":"Cohere_AI_KEY",
"X-JinaAI-Api-Key":"JINA_AI_KEY"
}
}
If you want to allow using different users for different actions in your cluster, you can specify the different users in the configuration file and use the --user option to specify which user to use for a specific action.
An example of how the configuration file should look like is the following:
{
"host": "your-weaviate-host",
"auth": {
"type": "user",
"user1": "your-api-key-for-user1",
"user2": "your-api-key-for-user2"
}
}
It's important to note that the "type" key must be set to "user" and the users must be specified in the auth section.
When using the weaviate-cli command, you can specify the user to use for an action by using the --user option. For example:
weaviate-cli --user user1 create collection --collection movies --vectorizer transformers
weaviate-cli --user user2 get collection --collection movies
Requirements
- Python 3.10+
- Weaviate instance (local or remote)
Documentation
Detailed documentation will be added soon.
Supported Model Provider
- Weaviate Embeddings Service (WCD clusters only)
- Contextionary
- Transformers
- OpenAI
- Ollama
- Cohere
- JinaAI
Community & Support
- Slack Community - Join our active community
- Stack Overflow - Search using the
weaviatetag - GitHub Issues - Report bugs or request features
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
License
BSD-3-Clause License
Metadata
Release files for weaviate-cli 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| weaviate_cli-3.1.0.tar.gz | 1.0 MB | Without provenance | Details for weaviate_cli-3.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| weaviate_cli-3.1.0-py3-none-any.whl | Python 3 | none | any | Details for weaviate_cli-3.1.0-py3-none-any.whl |
Total release size: 2.1 MB
Release files / weaviate_cli-3.1.0.tar.gz
| Download URL | weaviate_cli-3.1.0.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ac08511160d442469cdabd69e30b3285bf4efc93db640caf8e6762c4cad105b
|
|
BLAKE2b-256 checksum How to use checksums |
377975caf6d526134149bec73797e18ef9ad0a691e1ec931faa4563afbc4291b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / weaviate_cli-3.1.0-py3-none-any.whl
| Download URL | weaviate_cli-3.1.0-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c266daa570b5ef50f078c476a99bdd77d27101ae16c3e45fe46ee55e570d010
|
|
BLAKE2b-256 checksum How to use checksums |
8e0e5ec9188f5ad2984dd0efefbcba594ea679a777e1caeecb76092c053feb70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Security for weaviate-cli 3.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.