详细分析 ▾
运行时依赖
版本
Zilliz Cloud CLI 技能的初始发布。- 直接通过 `zilliz-cli` 管理 Zilliz Cloud 集群和 Milvus 向量数据库。- 支持集群操作、集合、向量搜索、RBAC、备份、导入、监控、计费等。- 提供逐步设置指南,包括身份验证、上下文管理和环境要求。- 包含集群生命周期管理和 CLI 命令使用的全面文档。- 清楚列出了 Free、Serverless 和 Dedicated 集群类型之间的差异。
安装命令 点击复制
技能文档
SKILL.md 中文翻译(由于原始内容过长,以下仅提供简要翻译,完整内容请参考原始文档)
Your Zilliz Cloud console in the terminal. This skill enables you to operate the zilliz-cli, bringing the full power of Zilliz Cloud — cluster management, collection operations, vector search, RBAC, backups, and more — through natural language.
When to Use
Use this skill when the user wants to:
- Manage Zilliz Cloud clusters (create, delete, suspend, resume, modify)
- Work with Milvus collections (create, describe, load, release, drop)
- Perform vector operations (search, query, insert, upsert, delete)
- Manage indexes, databases, partitions
- Set up users, roles, and access control (RBAC)
- Create and manage backups or backup policies
- Import bulk data from cloud storage
- Check billing, usage, or invoices
- Monitor cluster and collection status
Capabilities Overview
| Area | What You Can Do |
|---|---|
| Clusters | Create, delete, suspend, resume, modify |
| Collections | Create with custom schema, load, release, rename, drop |
| Vectors | Search, query, insert, upsert, delete |
| Indexes | Create, list, describe, drop |
| Databases | Create, list, describe, drop |
| Users & Roles | RBAC setup, privilege management |
| Backups | Create, restore, export, policy management |
| Import | Bulk data import from cloud storage |
| Partitions | Create, load, release, manage |
| Monitoring | Cluster status, collection stats |
| Billing | Usage, invoices, payment methods |
| Projects | Project and region management |
Requirements
- Python 3.10+
- A Zilliz Cloud account (or local Milvus instance)
# Setup & Authentication
Prerequisites
Before running any zilliz-cli command, verify the following in order:
- CLI installed and up to date? Run
python3 -m pip install --upgrade zilliz-clito ensure the latest version is installed. - Logged in? Run
zilliz auth status. If not logged in, guide through login (see below). - Context set? (Only for data-plane operations) Run
zilliz context current. If no context, guide through context setup.
Install / Upgrade CLI
python3 -m pip install --upgrade zilliz-cli
Verify installation:
zilliz --version
Authentication
IMPORTANT: Login commands (zilliz login, zilliz configure) require an interactive terminal and CANNOT run inside the AI agent. Always instruct the user to run these in their own terminal.
Check if already logged in:
zilliz auth status
If not logged in, tell the user to open their own terminal and run one of the following:
Option 1: Browser-based login (OAuth) — full feature access
zilliz login
- Opens a browser for authentication
- Retrieves user info, organization data, and API keys
- Use
--no-browserin headless environments (displays a URL to visit manually)
Option 2a: API Key via login command
zilliz login --api-key
Option 2b: API Key via configure (legacy)
zilliz configure
- Prompts for an API key (found in Zilliz Cloud console under API Keys)
- Limitations compared to OAuth login:
Option 3: Environment variable
User can add to their shell profile (.zshrc / .bashrc):
export ZILLIZ_API_KEY=
After the user completes authentication, verify by running:
zilliz auth status
Configure Subcommands
zilliz configure # Interactive API key setup
zilliz configure list # Show all config values
zilliz configure set # Set a config value
zilliz configure get # Get a config value
zilliz configure clear # Clear all credentials
Switch Organization
These commands require an interactive terminal. Instruct the user to run in their own terminal:
# Interactive selection
zilliz auth switch# Direct switch by org ID
zilliz auth switch
Logout
zilliz logout
Set Cluster Context
Data-plane commands (collection, vector, index, etc.) require an active cluster context.
# Set by cluster ID (endpoint auto-resolved)
zilliz context set --cluster-id # Set with explicit endpoint
zilliz context set --cluster-id --endpoint
# Change database (default: "default")
zilliz context set --database
View Current Context
zilliz context current
Output Format
All zilliz-cli commands support --output json for structured, machine-readable output:
zilliz cluster list --output json
zilliz collection describe --name --output json
Available formats: json, table, text. Default is text.
Cluster Type Differences
| Feature | Free | Serverless | Dedicated |
|---|---|---|---|
| Collection CRUD | Yes | Yes | Yes |
| Vector search/query | Yes | Yes | Yes |
| Database create/drop | No | No | Yes |
| User/role management | No | Limited | Yes |
| Backup management | No | Yes | Yes |
| Cluster modify | No | No | Yes |
# Quickstart Command
Guide the user through the complete Zilliz Cloud CLI setup:
- Check Python —
python3 --version(need 3.10+) - Install CLI —
python3 -m pip install --upgrade zilliz-clithenzilliz --version - Authenticate —
zilliz auth status; if not logged in, instruct user to runzilliz loginin their own terminal - List clusters —
zilliz cluster list; if none, offer to create one - Set context —
zilliz context set --cluster-id - Verify —
zilliz context currentandzilliz collection list
# Cluster Management
List Clusters
zilliz cluster list
zilliz cluster list --page-size 10 --page 1
zilliz cluster list --all
Describe a Cluster
zilliz cluster describe --cluster-id
Create a Cluster
# Serverless (default)
zilliz cluster create --type serverless --name --project-id --region # Free tier
zilliz cluster create --type free --name --project-id --region
# Dedicated
zilliz cluster create --type dedicated \
--name \
--project-id \
--region \
--cu-type \
--cu-size
To find available project IDs, cloud providers, and regions:
zilliz project list
zilliz cluster providers
zilliz cluster regions
zilliz cluster regions --cloud-id
Delete / Suspend / Resume a Cluster
zilliz cluster delete --cluster-id
zilliz cluster suspend --cluster-id
zilliz cluster resume --cluster-id
Modify a Cluster
zilliz cluster modify --cluster-id --cu-size
zilliz cluster modify --cluster-id --replica
zilliz cluster modify --cluster-id --body '{"cuSize": 2, "replica": 2}'
Cluster Guidance
- Before creating a cluster, help the user choose a region by running
zilliz cluster providersandzilliz cluster regions. - Cluster creation is asynchronous. After
cluster create, poll withzilliz cluster describeuntil status becomesRUNNING. - Before deleting a cluster, always confirm with the user — this is irreversible.
- After creating a cluster, suggest setting context with
zilliz context set --cluster-id.
# Collection Management
All collection commands accept an optional --database flag.
List / Describe Collections
zilliz collection list
zilliz collection list --database
zilliz collection describe --name
Create a Collection
Quick create with auto schema:
zilliz collection create --name --dimension
# Optional: --metric-type COSINE|L2|IP --id-type Int64|VarChar --auto-id true|false
Advanced create with custom schema:
zilliz collection create --name --body '{
"schema": {
"fields": [
{"fieldName": "id", "dataType": "Int64", "isPrimary": true},
{"fieldName": "vector", "dataType": "FloatVector", "elementTypeParams": {"dim": "768"}},
{"fieldName": "text", "dataType": "VarChar", "elementTypeParams": {"max_length": "1024"}}
]
}
}'
Drop / Rename / Check Existence
zilliz collection drop --name
zilliz collection rename --name --new-name
zilliz collection rename --name --new-name --new-database
zilliz collection has --name
Load / Release / Stats
zilliz collection load --name
zilliz collection release --name
zilliz collection get-stats --name
zilliz collection get-load-state --name
zilliz collection flush --name
zilliz collection compact --name
Collection Aliases
zilliz alias create --collection --alias
zilliz alias list --database
zilliz alias list --database --collection
zilliz alias describe --alias
zilliz alias alter --collection --alias
zilliz alias drop --alias
Collection Guidance
- Ask about use case to recommend dimension, metric type, and schema.
- Before dropping a collection, confirm with the user — this deletes all data.
- A collection must be loaded before search or query.
- Use
describeto inspect schema before vector operations.
# Vector Operations
All vector commands accept an optional --database flag. Target collection must exist and be loaded.
Vector Search
zilliz vector search \
--collection \
--data '[[0.1, 0.2, 0.3, ...]]' \
--limit 10
# Optional:
# --filter 'age > 20 and status == "active"'
# --output-fields '["field1", "field2"]'
# --anns-field
Hybrid Search
zilliz vector hybrid-search \
--collection \
--search '[
{"data": [[0.1, 0.2, ...]], "annsField": "dense_vector", "limit": 10},
{"data": [["search text"]], "annsField": "sparse_vector", "limit": 10}
]' \
--rerank '{"strategy": "rrf", "params": {"k": 60}}' \
--limit 10
# Optional: --output-fields '["field1", "field2"]'
Query (Filter-Based Retrieval)
zilliz vector query \
--collection \
--filter 'id in [1, 2, 3]' \
--limit 10
# Optional: --output-fields '["field1", "field2"]'
Get by ID
zilliz vector get \
--collection \
--id '[1, 2, 3]'
# Optional: --output-fields '["field1", "field2"]'
Insert / Upsert Vectors
zilliz vector insert \
--collection \
--data '[
{"id": 1, "vector": [0.1, 0.2, ...], "text": "hello"},
{"id": 2, "vector": [0.3, 0.4, ...], "text": "world"}
]'zilliz vector upsert \
--collection \
--data '[{"id": 1, "vector": [0.1, ...], "text": "updated"}]'
# Optional: --partition
For large datasets, read from file:
zilliz vector insert --collection --data "$(cat data.json)"
Delete Vectors
zilliz vector delete \
--collection \
--filter 'id in [1, 2, 3]'
# Optional: --partition
Filter Expression Syntax
| Expression | Example |
|---|---|
| Comparison | age > 20 |
| Equality | status == "active" |
| IN list | id in [1, 2, 3] |
| AND/OR | age > 20 and status == "active" |
| String match | text like "hello%" |
| Array contains | tags array_contains "ml" |
Vector Guidance
- Before searching, inspect schema with
zilliz collection describefor field names and dimensions. - The
--datavalue must match the collection's vector dimension exactly. - For text-to-vector search, the user needs an embedding model to convert text to vectors first.
- For large insert operations, suggest writing data to a JSON file first.
# Index Management
All index commands accept an optional --database flag.
Create an Index
zilliz index create --collection --body '{
"indexParams": [
{
"fieldName": "vector",
"indexName": "vector_index",
"metricType": "COSINE",
"indexType": "AUTOINDEX"
}
]
}'
Common index types: AUTOINDEX (recommended), IVF_FLAT, IVF_SQ8, HNSW.
Common metric types: COSINE, L2, IP.
List / Describe / Drop Indexes
zilliz index list --collection
zilliz index describe --collection --index-name
zilliz index drop --collection --index-name
Index Guidance
- On Zilliz Cloud,
AUTOINDEXis recommended for most use cases. - An index is required before loading a collection for search.
- After creating an index, remind the user to load the collection.
# Database Management
Commands
zilliz database list
zilliz database create --name
zilliz database create --name --body '{"properties": {}}'
zilliz database describe --name
zilliz database drop --name
Database Guidance
- Database create, describe, and drop are only available on Dedicated clusters.
database listworks on all cluster types. - Every cluster has a "default" database.
- Before dropping a database, confirm with the user — all collections in it will be deleted.
- After creating a database, suggest switching context:
zilliz context set --database.
# Partition Management
Commands
zilliz partition list --collection
zilliz partition create --collection --partition
zilliz partition has --collection --partition
zilliz partition get-stats --collection --partition
zilliz partition load --collection --names '["partition1", "partition2"]'
zilliz partition release --collection --names '["partition1", "partition2"]'
zilliz partition drop --collection --partition
Partition Guidance
- Every collection has a default
_defaultpartition. - A partition must be loaded before it can be searched.
- Before dropping a partition, confirm with the user.
# User & Role Management (RBAC)
Only available on Dedicated clusters.
Users
zilliz user list
zilliz user create --user --password
zilliz user describe --user
zilliz user update-password --user --password --new-password
zilliz user grant-role --user --role
zilliz user revoke-role --user --role
zilliz user drop --user
Roles
zilliz role list
zilliz role create --role
zilliz role describe --role
zilliz role grant-privilege \
--role \
--object-type \
--object-name > \
--privilege
zilliz role revoke-privilege \
--role \
--object-type \
--object-name > \
--privilege
zilliz role drop --role
Common privileges:
- Collection:
Search,Query,Insert,Delete,CreateIndex,DropCollection - Global:
CreateCollection,All - Database:
ListCollections
RBAC Guidance
- Built-in roles:
admin(full access),public(no privileges by default). - Suggested workflow: create role → grant privileges → create user → assign role.
- Use
*as object-name to grant privilege on all objects of that type.
# Backup Management
No cluster context required — backup operations use --cluster-id directly.
Create a Backup
# Full cluster backup
zilliz backup create --cluster-id in01-xxxxxxxxxxxx# Collection-level backup
zilliz backup create --cluster-id in01-xxxxxxxxxxxx --database default --collection my_col
List / Describe / Delete Backups
zilliz backup list
zilliz backup list --cluster-id
zilliz backup list --creation-method manual # or: auto
zilliz backup list --backup-type CLUSTER # or: COLLECTION
zilliz backup describe --cluster-id --backup-id
zilliz backup delete --cluster-id --backup-id
Export a Backup
zilliz backup export \
--cluster-id \
--backup-id \
--integration-id \
--directory
Restore to a New Cluster
zilliz backup restore-cluster \
--cluster-id \
--backup-id \
--project-id \
--name \
--cu-size \
--collection-status LOADED
Restore Specific Collections
zilliz backup restore-collection \
--cluster-id \
--backup-id \
--dest-cluster-id \
--body '{"collections": [{"source": "col1", "target": "col1_restored"}]}'
Backup Policy
zilliz backup describe-policy --cluster-id # Enable daily backup
zilliz backup update-policy --cluster-id in01-xxxx --auto-backup true --frequency daily --start-time 02:00 --retention-days 7
# Enable backup on Mon/Wed/Fri
zilliz backup update-policy --cluster-id in01-xxxx --auto-backup true --frequency 1,3,5 --start-time 03:00-05:00 --retention-days 14
# Disable auto-backup
zilliz backup update-policy --cluster-id in01-xxxx --auto-backup false
Backup Guidance
- Before deleting a backup, confirm with the user — this is irreversible.
- Explain difference: cluster restore = new cluster, collection restore = into existing cluster.
- Suggest backup policies for production clusters.
# Data Import
Target collection must exist on the target cluster.
Commands
# Start import job
zilliz import start \
--cluster-id \
--collection \
--body '{
"files": [["s3://bucket/path/to/file.parquet"]],
"options": {}
}'# List import jobs
zilliz import list --cluster-id
zilliz import list --cluster-id --database
# Check import status
zilliz import status --cluster-id --job-id
Supported file formats: Parquet, JSON, CSV.
Import Guidance
- Import jobs run asynchronously — use
import statusto track progress. - Data files must be accessible from Zilliz Cloud (e.g., S3, GCS with integration configured).
- Collection schema must match the data file structure.
# Billing
Requires OAuth login (not API Key mode).
Commands
# Usage
zilliz billing usage --last 7d
zilliz billing usage --month this
zilliz billing usage --month last
zilliz billing usage --month 2026-01
zilliz billing usage --start 2026-01-01 --end 2026-01-31# Invoices
zilliz billing invoices
zilliz billing invoices --all
zilliz billing invoices --invoice-id inv-xxxxxxxxxxxx
# Bind credit card (instruct user to run in their own terminal)
zilliz billing bind-card --card-number --exp-month <1-12> --exp-year --cvc
Billing Guidance
- The
bind-cardcommand handles sensitive card data — always instruct the user to run it in their own terminal.
# Project & Region Management
Projects
zilliz project list
zilliz project describe --project-id
zilliz project create --name --plan
zilliz project upgrade --project-id --plan
Volumes
zilliz volume create --project-id --region --name
zilliz volume list --project-id
zilliz volume delete --name
# Monitoring & Status
Status Overview Workflow
When the user asks for status, gather and present:
zilliz context current --output jsonzilliz cluster describe --cluster-id--output json zilliz database list --output jsonzilliz collection list --output json- For each collection:
zilliz collection get-stats --nameand--output json zilliz collection get-load-state --name--output json
Present as:
Cluster: \
Collections:
| Collection | Rows | Load State |
|---|---|---|
| my_collection | 10,000 | Loaded |
# General Guidance
- Always check prerequisites (CLI installed, logged in, context set) before executing commands.
- NEVER run
zilliz login,zilliz configure, orzilliz auth switchinside the AI agent — they require interactive input. - NEVER ask the user to paste API keys into the chat — guide them to configure credentials in their own terminal.
- Before any destructive operation (delete cluster, drop collection, drop database, delete backup), always confirm with the user.
- Use
--output jsonwhen parsing results programmatically, then format into readable summaries. - When a command fails with permissions error, check the cluster type first.
- When a command fails unexpectedly, consider whether the cluster type or auth mode may be the cause.
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制