Zilliz Cloud CLI Skill
Operate Zilliz Cloud through zilliz-cli. All operations are executed via shell commands.
Prerequisite Check (always run first)
Before any operation, verify in order:
CODEBLOCK0
CRITICAL: zilliz login, zilliz configure, and zilliz auth switch require interactive input — NEVER run them in a non-interactive shell. Instruct the user to run in their own terminal. NEVER ask for API keys in chat.
Command Pattern
CODEBLOCK1
All commands support --output json|table|text (default: text). Use --output json for programmatic parsing.
Cluster Type Capabilities
| Feature | Free | Serverless | Dedicated |
|---|
| Collection CRUD & Vector ops | Yes | Yes | Yes |
| Database create/drop |
No | No | Yes |
| User/role management | No | Limited | Yes |
| Backup management | No | Yes | Yes |
| Cluster modify (CU/replica) | No | No | Yes |
Check cluster type first when a command fails with permission errors.
Reference Files
Each reference covers one resource domain with full command syntax, options, and guidance. Read the relevant reference when handling that domain:
| Domain | Reference | When to read |
|---|
| Setup & auth | references/setup.md | Install, login, context, config, troubleshooting |
| Clusters |
references/cluster.md | Create, list, describe, modify, suspend, resume, delete clusters |
| Collections |
references/collection.md | Create, list, describe, drop, rename, load, release, aliases |
| Vectors |
references/vector.md | Search, query, insert, upsert, get, delete, hybrid search, filters |
| Indexes |
references/index.md | Create, list, describe, drop indexes |
| Databases |
references/database.md | Create, list, describe, drop databases |
| Partitions |
references/partition.md | Create, list, load, release, drop partitions |
| Users & roles |
references/user-role.md | RBAC: users, roles, privileges (Dedicated only) |
| Backups |
references/backup.md | Create, restore, export backups; manage backup policies |
| Import |
references/import.md | Bulk data import from cloud storage |
| Billing |
references/billing.md | Usage queries, invoices, payment methods |
| Monitoring |
references/monitoring.md | Cluster status, collection stats, load states |
| Projects & regions |
references/project-region.md | Projects, volumes, cloud providers, regions |
Quick-Start Workflow
For new users, guide through setup in order:
- 1. Install CLI: INLINECODE7
- Authenticate: user runs
zilliz login in their terminal - Verify: INLINECODE9
- List clusters: INLINECODE10
- Set context: INLINECODE11
- Verify: INLINECODE12
Common Workflows
Create collection and prepare for search:
- 1.
zilliz collection create --name <name> --dimension <dim> — create - INLINECODE14 — index (AUTOINDEX recommended)
- INLINECODE15 — load into memory
- INLINECODE16 — search
Status overview (read references/monitoring.md):
- 1. INLINECODE17
- INLINECODE18
- INLINECODE19
- For each DB:
collection list, get-stats, get-load-state, INLINECODE23 - Present as formatted table
Async Operations
These return immediately; poll for completion:
| Operation | Poll command |
|---|
| INLINECODE24 | INLINECODE25 until RUNNING |
| INLINECODE26 |
backup describe --cluster-id <id> --backup-id <bid> |
|
import start |
import status --job-id <jid> --cluster-id <id> |
Safety Rules
- - Confirm before destructive ops: drop collection/database, delete cluster/backup, drop user/role
- Sensitive commands in user's terminal:
zilliz login, zilliz configure, INLINECODE32 - Never expose credentials in chat or command output
Zilliz Cloud CLI 技能
通过 zilliz-cli 操作 Zilliz Cloud。所有操作均通过 shell 命令执行。
前置检查(始终先运行)
在任何操作之前,按顺序验证:
bash
python3 -m pip show zilliz-cli # 1. CLI 是否已安装?若未安装:pip install --upgrade zilliz-cli
zilliz auth status # 2. 是否已登录?若未登录:引导用户在终端中登录
zilliz context current # 3. 上下文是否已设置?(仅适用于数据平面操作)
关键: zilliz login、zilliz configure 和 zilliz auth switch 需要交互式输入——切勿在非交互式 shell 中运行它们。请指示用户在自己的终端中运行。切勿在聊天中询问 API 密钥。
命令模式
zilliz <资源> <操作> --标志 <值> [--可选标志 <值>]
所有命令均支持 --output json|table|text(默认:text)。使用 --output json 进行程序化解析。
集群类型能力
| 特性 | 免费版 | Serverless | 专用版 |
|---|
| 集合 CRUD 与向量操作 | 是 | 是 | 是 |
| 数据库创建/删除 |
否 | 否 | 是 |
| 用户/角色管理 | 否 | 有限 | 是 |
| 备份管理 | 否 | 是 | 是 |
| 集群修改(CU/副本) | 否 | 否 | 是 |
当命令因权限错误失败时,首先检查集群类型。
参考文件
每个参考文件涵盖一个资源领域,包含完整的命令语法、选项和指导。在处理该领域时阅读相关参考文件:
references/cluster.md | 创建、列出、描述、修改、暂停、恢复、删除集群 |
| 集合 |
references/collection.md | 创建、列出、描述、删除、重命名、加载、释放、别名 |
| 向量 |
references/vector.md | 搜索、查询、插入、更新、获取、删除、混合搜索、过滤器 |
| 索引 |
references/index.md | 创建、列出、描述、删除索引 |
| 数据库 |
references/database.md | 创建、列出、描述、删除数据库 |
| 分区 |
references/partition.md | 创建、列出、加载、释放、删除分区 |
| 用户与角色 |
references/user-role.md | RBAC:用户、角色、权限(仅限专用版) |
| 备份 |
references/backup.md | 创建、恢复、导出备份;管理备份策略 |
| 导入 |
references/import.md | 从云存储批量导入数据 |
| 计费 |
references/billing.md | 用量查询、发票、支付方式 |
| 监控 |
references/monitoring.md | 集群状态、集合统计、加载状态 |
| 项目与区域 |
references/project-region.md | 项目、卷、云提供商、区域 |
快速入门工作流
对于新用户,按顺序引导设置:
- 1. 安装 CLI:python3 -m pip install --upgrade zilliz-cli
- 认证:用户在其终端中运行 zilliz login
- 验证:zilliz auth status
- 列出集群:zilliz cluster list
- 设置上下文:zilliz context set --cluster-id
- 验证:zilliz context current && zilliz collection list
常见工作流
创建集合并准备搜索:
- 1. zilliz collection create --name <名称> --dimension <维度> — 创建
- zilliz index create --collection <名称> — 索引(推荐 AUTOINDEX)
- zilliz collection load --name <名称> — 加载到内存
- zilliz vector search --collection <名称> --data [[...]] — 搜索
状态概览(阅读 references/monitoring.md):
- 1. zilliz context current --output json
- zilliz cluster describe --cluster-id --output json
- zilliz database list --output json
- 对每个数据库:collection list、get-stats、get-load-state、index list
- 以格式化表格呈现
异步操作
这些操作立即返回;轮询以检查完成:
| 操作 | 轮询命令 |
|---|
| cluster create | cluster describe --cluster-id <id> 直到 RUNNING |
| backup create/export/restore-* |
backup describe --cluster-id
--backup-id |
| import start | import status --job-id --cluster-id |
安全规则
- - 破坏性操作前确认: 删除集合/数据库、删除集群/备份、删除用户/角色
- 敏感命令在用户终端中执行: zilliz login、zilliz configure、zilliz billing bind-card
- 切勿在聊天或命令输出中暴露凭据