qzcli
它能做什么
这个技能使用命令行工具管理 Qizhi 平台上的 GPU 训练任务。Qizhi 是一项云计算服务。适合在该平台上运行任务的研究人员。
适用场景
- ✓当你希望在 Qizhi 平台上提交、停止或列出 GPU 任务的时候。
- ✓当你需要将多个训练任务作为一批一起提交的时候。
- ✓当你希望查看 Qizhi 上有哪些可用计算组的时候。
技能链接
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/qzcli/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我需要在 Qizhi 上提交一个训练任务,并查看哪个计算组可用。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体使用 qzcli 工具,借助你保存的登录设置来提交、列出或停止任务。凭据从环境变量或设置文件中读取,而不是在聊天中输入。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
qzcli — 启智平台任务管理
A kubectl/docker-style CLI for managing GPU compute jobs on the Qizhi (启智) platform.
GitHub: tianyilt/qzcli_tool
Environment contract
Qizhi is the scheduler-cluster shape of ../shared-references/compute-env-contract.md:
images are built OFF-platform and referenced at submit time, so the declarative
env spec + env:<name>@<specHash> ledger (.aris/compute/qizhi.md) is what
keeps "which image has which stack" answerable. Run the kernel witness inside a
submitted job (not on the login side) before trusting an image for a long run.
Installation
pip install rich requests prompt_toolkit mcp
git clone https://github.com/tianyilt/qzcli_tool
cd qzcli_tool && pip install -e .
MCP Integration (optional)
To use qzcli as an MCP tool directly from Claude Code or Codex:
# Claude Code
claude mcp add qzcli -- qzcli-mcp
# Codex
codex mcp add qzcli -- qzcli-mcp
Configuration
Credentials are read in this priority order:
CLI args > --password-stdin > env vars > QZCLI_ENV_FILE (.env) > ~/.qzcli/config.json > interactive input
# Option A: env file (recommended)
mkdir -p ~/.qzcli
cat > ~/.qzcli/.env <<'EOF'
QZCLI_USERNAME="your_username"
QZCLI_PASSWORD="your_password"
EOF
# Option B: environment variables
export QZCLI_USERNAME="your_username"
export QZCLI_PASSWORD="your_password"
export QZCLI_API_URL="https://qz.yourorg.edu.cn"
Config files are stored in ~/.qzcli/: config.json, .cookie, resources.json, jobs.json.
Quick Start
# 1. Login
qzcli login
# 2. Discover and cache workspaces/compute groups (run once, re-run after joining new workspaces)
qzcli res -u
# 3. Check available nodes
qzcli avail
# 4. List running jobs
qzcli ls -c -r
Authentication
# Interactive login
qzcli login
# With credentials
qzcli login -u YOUR_USERNAME -p 'YOUR_PASSWORD'
# Read password from stdin (for scripts)
echo 'YOUR_PASSWORD' | qzcli login -u YOUR_USERNAME --password-stdin
# Check current cookie
qzcli cookie --show
# Clear cookie
qzcli cookie --clear
Note: qzcli avail auto-refreshes the cookie if it expires and credentials are configured.
Resource Discovery
# List cached workspaces
qzcli res --list
# Refresh all workspace resource cache (run this first!)
qzcli res -u
# Refresh a specific workspace
qzcli res -w MY_WORKSPACE -u
# Set a human-readable alias for a workspace
qzcli res -w ws-xxxxxxxx --name "My Workspace"
Check Available Nodes
# All workspaces
qzcli avail
# Including low-priority task nodes (slower but more accurate)
qzcli avail --lp
# Specific workspace
qzcli avail -w MY_WORKSPACE
# Find compute groups with N free nodes
qzcli avail -n 4
# Export IDs for scripting
qzcli avail -n 4 -e
# Show idle node names
qzcli avail -w MY_WORKSPACE -v
Job Submission
Interactive (recommended for first-time use)
# Full interactive selection: workspace → project → compute group → spec
qzcli create -i
# Interactive for a specific workspace only
qzcli create -i -w "My Workspace"
The TUI shows GPU type, availability, and spec status at each level. Press Enter/→ to go deeper, ← to go back.
Non-interactive
# Using names (resolved from qzcli res cache)
qzcli create \
--name "my-training-job" \
--command "bash /path/to/train.sh" \
--workspace "My Workspace" \
--compute-group "My Compute Group" \
--image YOUR_REGISTRY/team/image:tag \
--instances 4 \
--priority 10
# Using IDs directly
qzcli create \
--name "my-job" \
--command "bash /path/to/train.sh" \
--workspace ws-YOUR_WORKSPACE_ID \
--compute-group lcg-YOUR_LCG_ID \
--spec YOUR_SPEC_ID \
--image YOUR_REGISTRY/team/image:tag \
--instances 4
Key parameters:
| Parameter | Default | Description |
|---|---|---|
--name / -n |
required | Job name |
--command / -c |
required | Command to run |
--workspace / -w |
Workspace name or ID (ws-...) |
|
--compute-group / -g |
auto | Compute group name or ID (lcg-...) |
--spec / -s |
auto | Resource spec ID |
--image / -m |
Docker image | |
--instances |
1 | Number of instances |
--shm |
1200 | Shared memory (GiB) |
--priority |
10 | Priority (1–10) |
--dry-run |
Preview only, don't submit | |
--json |
JSON output for scripting |
# Preview before submittin
常见问题
我需要 Qizhi 账户吗?
需要。该工具使用你的 Qizhi 用户名和密码登录,你需要将其保存在设置文件或环境变量中。
我如何安装它?
技能提供了使用 pip 和从 GitHub 克隆 qzcli 工具的安装步骤。
智能体能将它作为工具使用吗?
可以。该技能包含可选的 MCP 设置,适用于 Claude Code 和 Codex。
详情
作者的原始描述
Manage GPU compute jobs on the Qizhi (启智) platform using qzcli — a kubectl-style CLI tool. Use when user says "qzcli", "启智平台", "submit job", "stop job", "查计算组", "avail", "list jobs", "batch submit", or needs to manage distributed training jobs on a Qizhi instance.
热度
- GitHub 星标
- 18k
- 排名
- #10577
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
ablation-planner
18k帮你的智能体为论文规划消融实验,在主要结果看起来不错之后,选出审稿人很可能会要求的测试。
alphaxiv
18k让你的智能体借助 AlphaXiv 摘要快速阅读一篇研究论文,并以完整文本或 LaTeX 源文件作为备用,只需提供 arXiv 链接或编号。
analyze-results
18k帮你的智能体分析机器学习实验结果,将各次运行与基线进行比较,并把数字整理成清晰的发现和后续步骤。
arxiv
18k让你的智能体在 arXiv 上搜索学术论文、阅读论文详情,并把 PDF 保存到你的文库中,用于某个研究主题。