Skip to main content

CompShare CLI

在终端管理优云智算 GPU 实例、镜像、云盘、US3 / CFS 存储、独享带宽、团队资源和 MiniMax H3 视频、图片、语音任务。

  • 交互式创建实例,实时查询规格、库存和价格
  • 支持批量生命周期操作、等待状态和跨地域查询
  • 支持可断线恢复的远程任务、状态查询和增量日志读取
  • 支持社区/自定义镜像、云盘、CFS 文件存储、团队额度与账单
  • 支持独享带宽询价、购买、改配、退款预估及实例 EIP 切换
  • 支持 MiniMax H3 视频、Qwen-Image 图片和 IndexTTS 2.5 语音任务,以及素材上传、视频 Skill 和积分查询
  • 默认中文帮助,可切换英文;所有命令支持 JSON 输出

安装

pip install compshare-cli
pip install --upgrade compshare-cli

Skill

为 Codex、Claude Code、Cursor 等 AI Agent 安装 CompShare CLI Skill:

npx skills add compshare-cn/compshare-cli --skill compshare-cli

完整说明见 CompShare CLI Skill。

配置

compshare config --name default

凭证保存在 ~/.config/compshare/config.json,支持多个配置:

compshare config list
compshare config use production
compshare --profile production instance list

也可以使用环境变量:

export COMPSHARE_PUBLIC_KEY='...'
export COMPSHARE_PRIVATE_KEY='...'

# MiniMax H3 使用独立的模型 API Key
export COMPSHARE_MINIMAX_API_KEY='sk-ml-...'

快速开始

# 查询、创建和查看实例
compshare instance search --region cn-sh2 --zone cn-sh2-02
compshare instance create
compshare instance list --all

# 连接实例
compshare instance ssh INSTANCE_ID
compshare --json instance ssh INSTANCE_ID -- nvidia-smi
compshare --json instance ssh INSTANCE_ID -- sh -lc 'cd /workspace && pwd'

# MiniMax H3:先预演,再创建
compshare --json minimax create '一只猫在海边奔跑' --dry-run
compshare --json minimax create '一只猫在海边奔跑' --yes
compshare --json minimax points

# 查看帮助
compshare -h
compshare instance -h

命令概览

compshare config     API 凭证配置
compshare doctor     配置、鉴权、网络与 SSH 环境诊断
compshare instance   GPU 实例、规格、库存、价格和生命周期
compshare image      平台、自定义、社区及共享镜像
compshare storage    云盘、US3 挂载和 CFS 文件存储
compshare bandwidth  独享带宽和实例 EIP 带宽归属
compshare minimax    MiniMax H3 视频、图片、语音、Skill 和积分
compshare team       团队、邀请、成员额度、账单和审计

WorkBuddy Connector

仓库内置符合 WorkBuddy 规范的 MCP + Skill Token 连接器,提交目录为 connector/compshare。用户在 WorkBuddy 表单中填写 API 公钥和 私钥后,连接器通过本地 stdio MCP 注入凭证,不需要 OAuth,也不会修改已有 CLI 配置。

WorkBuddy 配置固定使用 Python 3.11;本地开发需 Python 3.10 或更高版本,可安装 MCP 可选 依赖并启动服务:

pip install -e '.[mcp]'
compshare-mcp

正式 Connector 使用 uvx 从 PyPI 安装固定版本,并将只读、预演和需要明确确认的写操作 分开暴露。MiniMax H3 使用表单中可选的独立模型 API Key。

Codex Plugin

仓库内置符合 OpenAI 插件规范 的 Skill 插件,直接复用 skills/compshare-cli,通过本地 compshare 命令管理资源。 先安装 CLI 并按「配置」说明设置凭证,再在仓库根目录执行:

codex plugin marketplace add .
codex plugin add compshare-cli@compshare
codex plugin list --marketplace compshare --json

也可以从任意目录通过 GitHub 安装:

codex plugin marketplace add compshare-cn/compshare-cli
codex plugin add compshare-cli@compshare

SDK

如需通过 SDK 集成 CompShare API,可参考独立的 CompShare Developer Examples 仓库。 其中包含 Python、Go、Java、JavaScript 和 PHP 示例,覆盖 API 鉴权、GPU 实例创建、规格配置和状态查询。

Metadata

Release files for compshare-cli 0.5.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compshare-cli 0.5.7
File Size Uploaded Provenance Actions
compshare_cli-0.5.7.tar.gz 178.2 kB With provenance Details for compshare_cli-0.5.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for compshare-cli 0.5.7
File Interpreter ABI Platform Actions
compshare_cli-0.5.7-py3-none-any.whl Python 3 none any Details for compshare_cli-0.5.7-py3-none-any.whl

Total release size: 300.5 kB

Release files / compshare_cli-0.5.7.tar.gz

Download URL compshare_cli-0.5.7.tar.gz
Size 178.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a29b407f665a7dbaa7c7d6e8c346bab7404c6b550eebd7cd709680e8ee20627a
BLAKE2b-256 checksum
How to use checksums
225be39912c52eb8c23a8c70a1a4c0ec11c9bd3cd00ff0ee3f575dad3e1e5014
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / compshare_cli-0.5.7-py3-none-any.whl

Download URL compshare_cli-0.5.7-py3-none-any.whl
Size 122.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6590df5ba9fb526fa386ef650b37224aaf01cb591d44ed22e926360865d7b1ae
BLAKE2b-256 checksum
How to use checksums
89346bf36e09e432dcccf5760d6e2f0a391dccde000227038eaf058be3cd2613
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for compshare-cli 0.5.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for compshare_cli-0.5.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page