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 -e .

For development:

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.0.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.0-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zilliz_cli-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 02736a59103fdfbd92c9262541cb4fdb7f98890e4b818c7719a89551e7f40821
MD5 59a289c5da82dc53dd230137e89b276e
BLAKE2b-256 11dcd79ac8b163f0dcc5b291c2d1815ff8de614a43548373db5ef8e82fc477d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zilliz_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ab5605a6aa8b02ac81112652df20c877ea9011a5dd6ae9c6065cb7d4da5c089
MD5 445e67ce3d294e9d0dd31353dd369b5d
BLAKE2b-256 2b1560f55e74a09da39d6c61e2073c76fb32629c66f471ef9c309b3fe323d6a6

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