Skip to main content

CLI for Zilliz Cloud resource management and Milvus operations

Project description

Zilliz CLI

Command-line tool for Zilliz Cloud cluster management and Milvus vector database operations.

Requirements

  • Python 3.10+

Installation

pip install zilliz-cli

For development (from source):

git clone git@github.com:zilliztech/zilliz-cloud.git
cd zilliz-cloud/vdc/zilliz-cli
pip install -e ".[dev]"

Quick Start

# 1. Configure API Key
zilliz configure
# or
export ZILLIZ_API_KEY=your-api-key

# 2. List clusters
zilliz cluster list

# 3. Set cluster context (auto-resolves endpoint)
zilliz context set --cluster-id in01-xxxx

# 4. Work with collections and vectors
zilliz collection list
zilliz vector search --collection my_col --data '[[0.1, 0.2, 0.3]]' --limit 5

Commands

Configuration

# Interactive setup
zilliz configure

# Set individual values
zilliz configure set api_key YOUR_KEY
zilliz configure set output json

# View values
zilliz configure get api_key
zilliz configure list

Context

# Set cluster context (endpoint auto-resolved)
zilliz context set --cluster-id in01-xxxx

# Set with specific database
zilliz context set --cluster-id in01-xxxx --database mydb

# Change database only
zilliz context set --database another_db

# Manual endpoint override
zilliz context set --cluster-id in01-xxxx --endpoint https://custom.endpoint.com

# View current context
zilliz context current

Cluster Management

# List all clusters
zilliz cluster list
zilliz cluster list --output json

# Describe a cluster
zilliz cluster describe --cluster-id in01-xxxx

# Create a serverless cluster
zilliz cluster create --name my-cluster --project-id p1 --region gcp-us-west1

# Delete a cluster
zilliz cluster delete --cluster-id in01-xxxx

Collection Operations

Requires a context to be set first (zilliz context set --cluster-id ...).

# List collections
zilliz collection list

# Describe a collection
zilliz collection describe --name my_collection

# Quick Setup: create with dimension and metric type
zilliz collection create --name my_collection --dimension 768 --metric-type COSINE

# Custom Setup: create with full JSON schema
zilliz collection create --body '{"collectionName": "my_col", "schema": {...}}'
zilliz collection create --body file://schema.json

Vector Operations

Requires a context to be set first (zilliz context set --cluster-id ...).

# Vector search
zilliz vector search --collection my_col --data '[[0.1, 0.2, 0.3]]' --limit 10
zilliz vector search --collection my_col --data '[[0.1, 0.2, 0.3]]' --filter "age > 20" --output-fields '["name", "age"]'

# Query by filter
zilliz vector query --collection my_col --filter "id in [1, 2, 3]" --limit 10
zilliz vector query --collection my_col --filter "age > 20" --output-fields '["name", "age"]'

# Insert data
zilliz vector insert --collection my_col --data '[{"id": 1, "vector": [0.1, 0.2], "name": "doc1"}]'

Version

zilliz version
zilliz version --output json

Global Options

Option Description
--output, -o Output format: json, table, text
--api-key API key (overrides config file and env var)
--help Show help

Configuration

Credential Resolution

API Key is resolved in order (first found wins):

  1. --api-key CLI flag
  2. ZILLIZ_API_KEY environment variable
  3. ~/.zilliz/credentials file

Config Files

~/.zilliz/
  credentials     # API key
  config          # CLI settings + cluster context

Output Formats

# Table (default, human-friendly)
zilliz cluster list

# JSON (machine/agent-friendly)
zilliz cluster list --output json

# Plain text
zilliz cluster list --output text

Testing

# Run unit tests
pytest tests/unit/

# Run all tests (E2E tests skipped without API key)
pytest

# Run E2E tests (requires real API key)
ZILLIZ_API_KEY=your-key pytest -m e2e

# Run E2E tests with data plane (requires cluster)
ZILLIZ_API_KEY=your-key ZILLIZ_CLUSTER_ID=in01-xxxx pytest -m e2e

License

Apache-2.0

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

zilliz_cli-0.1.1.tar.gz (41.4 kB view details)

Uploaded Source

Built Distribution

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

zilliz_cli-0.1.1-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file zilliz_cli-0.1.1.tar.gz.

File metadata

  • Download URL: zilliz_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for zilliz_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 75365b4645c6915d9c05b40f3cc47853efed99fd8c1e31b35354a450ff749440
MD5 2644efe8ebe4228be105483d688feef2
BLAKE2b-256 8500e4e8df0262a065f57517a187d24d31db33f61994da7caf77f6dc73e775fa

See more details on using hashes here.

File details

Details for the file zilliz_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zilliz_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for zilliz_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29dd8c4a289683527c3619696bb71efac8995defd506ee7e2091dfb4e83c1534
MD5 b0da31066d6a63f4084f1486ba201253
BLAKE2b-256 aa67771421f3d6126e5ec89206b31eec73e1e0996561cbcd7b81b7a73fe1d55c

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