# Weaviate CLI
<img src="https://raw.githubusercontent.com/semi-technologies/weaviate/19de0956c69b66c5552447e84d016f4fe29d12c9/docs/assets/weaviate-logo.png" width="180" align="right" alt="Weaviate logo">
[![Build Status](https://github.com/weaviate/weaviate-cli/actions/workflows/main.yaml/badge.svg)](https://github.com/weaviate/weaviate-cli/actions/workflows/main.yaml)
[![PyPI version](https://badge.fury.io/py/weaviate-cli.svg)](https://badge.fury.io/py/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:
```bash
pip install weaviate-cli
```
On Mac, install using Homebrew:
```bash
brew install weaviate-cli
```
## Basic Usage
```bash
# 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:
```json
{
"host": "localhost",
"http_port": "8080",
"grpc_port": "50051"
}
```
You can also specify your own configuration file using the `--config-file` option:
```bash
weaviate-cli --config-file /path/to/your/config.json
```
The configuration file should be a JSON file with the following structure:
```json
{
"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:
```json
{
"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:
```json
{
"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:
```bash
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](https://weaviate.io/slack) - Join our active community
- [Stack Overflow](https://stackoverflow.com/questions/tagged/weaviate) - Search using the `weaviate` tag
- [GitHub Issues](https://github.com/weaviate/weaviate-cli/issues) - Report bugs or request features
## Contributing
We welcome contributions! Please see our [Contributing Guidelines](https://github.com/weaviate/weaviate-cli/blob/main/CONTRIBUTING.md) for
details.
## License
BSD-3-Clause License
Raw data
{
"_id": null,
"home_page": "https://github.com/weaviate/weaviate-cli",
"name": "weaviate-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "cli, weaviate",
"author": "Weaviate",
"author_email": "hello@weaviate.io",
"download_url": "https://files.pythonhosted.org/packages/37/79/75caf6d526134149bec73797e18ef9ad0a691e1ec931faa4563afbc4291b/weaviate_cli-3.1.0.tar.gz",
"platform": "Linux",
"description": "# Weaviate CLI\n\n<img src=\"https://raw.githubusercontent.com/semi-technologies/weaviate/19de0956c69b66c5552447e84d016f4fe29d12c9/docs/assets/weaviate-logo.png\" width=\"180\" align=\"right\" alt=\"Weaviate logo\">\n\n[![Build Status](https://github.com/weaviate/weaviate-cli/actions/workflows/main.yaml/badge.svg)](https://github.com/weaviate/weaviate-cli/actions/workflows/main.yaml)\n[![PyPI version](https://badge.fury.io/py/weaviate-cli.svg)](https://badge.fury.io/py/weaviate-cli)\n\nA powerful command-line interface for managing and interacting with Weaviate vector databases directly from your terminal.\n\n## Key Features\n- **Collections**: Create, update, delete and get collection configurations\n- **Data Management**: Import, query, update and delete data with various search types (vector, keyword, hybrid)\n- **Multi-tenancy**: Manage tenants and their states across collections\n- **Backup & Restore**: Create and restore backups with support for S3, GCS and filesystem\n- **Sharding**: Monitor and manage collection shards\n- **Flexible Configuration**: Configure vector indexes, replication, consistency levels and more\n- **Role Management**: Assign and revoke roles and permissions to users\n\n## Quick Start\nInstall using pip:\n\n```bash\npip install weaviate-cli\n```\n\nOn Mac, install using Homebrew:\n```bash\nbrew install weaviate-cli\n```\n\n## Basic Usage\n\n```bash\n# Show available commands\nweaviate-cli --help\n\n# Create a collection\nweaviate-cli create collection --collection movies --vectorizer transformers\n\n# Import test data\nweaviate-cli create data --collection movies --limit 1000\n\n# Query data\nweaviate-cli query data --collection movies --search-type hybrid --query \"action movies\"\n```\n\n## Core Commands\n\n- **create**: Create collections, tenants, backups or import data\n- **delete**: Remove collections, tenants or data\n- **update**: Modify collection settings, tenant states or data\n- **get**: Retrieve collection info, tenant details or shard status\n- **query**: Search data using various methods\n- **restore**: Restore backups from supported backends\n- **assign**: Assign roles and permissions to users\n- **revoke**: Revoke roles and permissions from users\n## Configuration\n\nWeaviate CLI allows you to configure your cluster endpoints and parameters through a configuration file. By default, the CLI looks for a\nconfiguration file at `~/.config/weaviate/config.json`. If this file does not exist, it will be created with the following default values:\n\n```json\n{\n \"host\": \"localhost\",\n \"http_port\": \"8080\",\n \"grpc_port\": \"50051\"\n}\n```\n\nYou can also specify your own configuration file using the `--config-file` option:\n\n```bash\nweaviate-cli --config-file /path/to/your/config.json\n```\n\nThe configuration file should be a JSON file with the following structure:\n\n```json\n{\n \"host\": \"your-weaviate-host\",\n \"http_port\": \"your-http-port\",\n \"grpc_port\": \"your-grpc-port\",\n \"auth\": {\n \"type\": \"api_key\",\n \"api_key\": \"your-api-key\"\n }\n}\n```\n\nIf you are using a remote Weaviate instance, you can use the `weaviate-cli` command to authenticate with your Weaviate instance.\nHere you can see an example on how the configuration file should look like if you are connecting to a WCD cluster:\n\n```json\n {\n \"host\": \"thisisaninventedcluster.url.s3.us-west3.prov.weaviate.cloud\",\n \"auth\": {\n \"type\": \"api_key\",\n \"api_key\": \"jfeRFsdfRfSasgsDoNOtTrYToUsErRQwqqdZfghasd\"\n },\n \"headers\":{\n \"X-OpenAI-Api-Key\":\"OPEN_AI_KEY\",\n \"X-Cohere-Api-Key\":\"Cohere_AI_KEY\",\n \"X-JinaAI-Api-Key\":\"JINA_AI_KEY\"\n }\n }\n```\n\nIf 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.\nAn example of how the configuration file should look like is the following:\n\n```json\n{\n \"host\": \"your-weaviate-host\",\n \"auth\": {\n \"type\": \"user\",\n \"user1\": \"your-api-key-for-user1\",\n \"user2\": \"your-api-key-for-user2\"\n }\n}\n```\nIt's important to note that the \"type\" key must be set to \"user\" and the users must be specified in the auth section.\nWhen using the `weaviate-cli` command, you can specify the user to use for an action by using the `--user` option. For example:\n\n```bash\nweaviate-cli --user user1 create collection --collection movies --vectorizer transformers\nweaviate-cli --user user2 get collection --collection movies\n```\n\n## Requirements\n\n- Python 3.10+\n- Weaviate instance (local or remote)\n\n## Documentation\n\nDetailed documentation will be added soon.\n\n## Supported Model Provider\n\n- Weaviate Embeddings Service (WCD clusters only)\n- Contextionary\n- Transformers\n- OpenAI\n- Ollama\n- Cohere\n- JinaAI\n\n## Community & Support\n\n- [Slack Community](https://weaviate.io/slack) - Join our active community\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/weaviate) - Search using the `weaviate` tag\n- [GitHub Issues](https://github.com/weaviate/weaviate-cli/issues) - Report bugs or request features\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guidelines](https://github.com/weaviate/weaviate-cli/blob/main/CONTRIBUTING.md) for\ndetails.\n\n## License\n\nBSD-3-Clause License\n",
"bugtrack_url": null,
"license": "BSD 3-clause",
"summary": "Command line interface to interact with weaviate",
"version": "3.1.0",
"project_urls": {
"Bugs": "https://github.com/weaviate/weaviate-cli/issues",
"Docs": "https://github.com/weaviate/weaviate-cli/blob/main/README.rst",
"Download": "https://github.com/weaviate/weaviate-cli",
"Homepage": "https://github.com/weaviate/weaviate-cli"
},
"split_keywords": [
"cli",
" weaviate"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8e0e5ec9188f5ad2984dd0efefbcba594ea679a777e1caeecb76092c053feb70",
"md5": "a181700852c12ea1c44404d6fce23a83",
"sha256": "1c266daa570b5ef50f078c476a99bdd77d27101ae16c3e45fe46ee55e570d010"
},
"downloads": -1,
"filename": "weaviate_cli-3.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a181700852c12ea1c44404d6fce23a83",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 1060655,
"upload_time": "2024-12-12T16:20:09",
"upload_time_iso_8601": "2024-12-12T16:20:09.953032Z",
"url": "https://files.pythonhosted.org/packages/8e/0e/5ec9188f5ad2984dd0efefbcba594ea679a777e1caeecb76092c053feb70/weaviate_cli-3.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "377975caf6d526134149bec73797e18ef9ad0a691e1ec931faa4563afbc4291b",
"md5": "b5eefd208654c6b28040152ec972f942",
"sha256": "3ac08511160d442469cdabd69e30b3285bf4efc93db640caf8e6762c4cad105b"
},
"downloads": -1,
"filename": "weaviate_cli-3.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b5eefd208654c6b28040152ec972f942",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 1034240,
"upload_time": "2024-12-12T16:20:11",
"upload_time_iso_8601": "2024-12-12T16:20:11.732691Z",
"url": "https://files.pythonhosted.org/packages/37/79/75caf6d526134149bec73797e18ef9ad0a691e1ec931faa4563afbc4291b/weaviate_cli-3.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-12 16:20:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "weaviate",
"github_project": "weaviate-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "weaviate-cli"
}