Skip to main content

Command line interface to interact with weaviate

Project description

Weaviate CLI

Weaviate logo

Build Status PyPI version

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

Quick Start

Install using pip:

pip 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

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"
     }
 }

Requirements

  • Python 3.9+
  • Weaviate instance (local or remote)

Documentation

Detailed documentation will be added soon.

Community & Support

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

License

BSD-3-Clause License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weaviate_cli-3.0.1.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weaviate_cli-3.0.1-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file weaviate_cli-3.0.1.tar.gz.

File metadata

  • Download URL: weaviate_cli-3.0.1.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for weaviate_cli-3.0.1.tar.gz
Algorithm Hash digest
SHA256 0c60028dda76d8bf193718486183fc315b8612b20720023550274bdb0f0d681c
MD5 91de7acde6f4cb07b2b965c5bbe6f308
BLAKE2b-256 fdf48b90d892c18199c4c65d19083fb22fe8f030b7f5eccaa1602ea48189d124

See more details on using hashes here.

File details

Details for the file weaviate_cli-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: weaviate_cli-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for weaviate_cli-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e4c626e9594c76a300e4e4763e0a5471593086c92edaf670528cc8f2a4e2dfc
MD5 499a308d5d26b9d182a9aa6c9333603d
BLAKE2b-256 1bf36ffa90fa06dfe7d0e309d16f0117a4a78d2ba8d0907dd208d8019ee2db1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page