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.2.tar.gz (93.9 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.2-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for zilliz_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 588a99226c95481106d0a9425fedfb4ebc29368ab02ab03f9df0cb6c0f1c4a37
MD5 e1643e9ea58f47a7e049c4ac9bca3bad
BLAKE2b-256 ecad732b1d30eec7d757f876b074545ef11156ef9bf2da8be1a4a5c62133dffc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for zilliz_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d8a50223c6c4f7f88fbdea2724a8dc411792632063deee1b3c9e23b9c59a7ab7
MD5 8c399714bcf57e8a10dbab7cae7400dc
BLAKE2b-256 419cc1433c7a314faa12320c8d36d35fcfa7ed23c145b3fc4f5c2ee735c3e63f

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