Skip to main content

Command-line client for CompShare GPU compute

Project description

CompShare CLI

在终端管理优云智算 GPU 实例、镜像、云盘、US3 挂载和团队资源。

  • 交互式创建实例,实时查询规格、库存和价格
  • 支持批量生命周期操作、等待状态和跨地域查询
  • 支持可断线恢复的远程任务、状态查询和增量日志读取
  • 支持社区/自定义镜像、云盘、团队额度与账单
  • 默认中文帮助,可切换英文;所有命令支持 JSON 输出
  • 可通过 compshare ask 查询产品使用和计费知识
  • 可通过 compshare feedback 反馈 CLI 问题和建议

安装

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

配置

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='...'

快速开始

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

# 连接实例
compshare instance ssh INSTANCE_ID

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

命令概览

compshare config     API 凭证配置
compshare feedback   反馈 CLI 问题或建议
compshare doctor     配置、鉴权、网络与 SSH 环境诊断
compshare ask        产品使用和计费问答
compshare instance   GPU 实例、规格、库存、价格和生命周期
compshare image      平台、自定义、社区及共享镜像
compshare storage    云盘和 US3 挂载
compshare team       团队、邀请、成员额度、账单和审计

Skill

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

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

完整说明见 CompShare CLI Skill

SDK

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

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

compshare_cli-0.3.5.tar.gz (115.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

compshare_cli-0.3.5-py3-none-any.whl (96.2 kB view details)

Uploaded Python 3

File details

Details for the file compshare_cli-0.3.5.tar.gz.

File metadata

  • Download URL: compshare_cli-0.3.5.tar.gz
  • Upload date:
  • Size: 115.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for compshare_cli-0.3.5.tar.gz
Algorithm Hash digest
SHA256 e2e95fc79c0df6aeb128b9c3d796804013f11c9cc4e12a860458b15b50fb0177
MD5 03eb6de9a9ac88e0fceecef3e2248cb4
BLAKE2b-256 daf610bd496a8ac2d8e5355650e49aaa223e216a74dfe77a7048017fd689aa12

See more details on using hashes here.

Provenance

The following attestation bundles were made for compshare_cli-0.3.5.tar.gz:

Publisher: release.yml on compshare-cn/compshare-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file compshare_cli-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: compshare_cli-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 96.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for compshare_cli-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fb60b9ba062a79c7c97026bceef7db73c10ae504aaf4e1dda28a11d8a97eac75
MD5 e4a3d6d192d0ec769bc9c98513aa7250
BLAKE2b-256 49b9bab35599ab24d9808a98bc2661545d9d0aaad7fce99fa14acaf4ec899c50

See more details on using hashes here.

Provenance

The following attestation bundles were made for compshare_cli-0.3.5-py3-none-any.whl:

Publisher: release.yml on compshare-cn/compshare-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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