Metadata-Version: 2.4
Name: gcube-cli
Version: 0.4.2
Summary: Official command-line tool for the gcube AI GPU cloud platform
Author-email: Data Alliance <gcube.ai@data-alliance.com>
License: Apache-2.0
Project-URL: Homepage, https://gcube.ai
Project-URL: Documentation, https://data-alliance.github.io/gai-platform-docs/
Project-URL: Bug Tracker, https://github.com/data-alliance/gcube-cli/issues
Keywords: gcube,gpu,cloud,ai,cli,mlops
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: click<8.3,>=8.1
Requires-Dist: httpx>=0.27
Requires-Dist: rich>=13.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: websockets>=13.0
Requires-Dist: paramiko>=3.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-httpx>=0.30; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"

<p align="center">
  <a href="https://gcube.ai"><img src="https://img.shields.io/badge/gcube-AI%20GPU%20Cloud-6366f1?style=for-the-badge" alt="gcube"></a>
</p>

<p align="center">
  <a href="https://pypi.org/project/gcube-cli/"><img src="https://img.shields.io/pypi/v/gcube-cli?color=blue" alt="PyPI"></a>
  <a href="https://www.python.org/"><img src="https://img.shields.io/pypi/pyversions/gcube-cli" alt="Python"></a>
</p>

# gcube CLI

Official command-line tool for the [gcube AI GPU cloud platform](https://gcube.ai).
Manage GPU workloads, monitor resources, and stream container logs — all from your terminal.

## Installation

```bash
pip install gcube-cli
```

## Quick Start

```bash
# Authenticate (opens browser)
gcube auth login

# Check available GPUs — note the CODE column (e.g. 029)
gcube gpu list

# Register a workload (inline flags for single container)
gcube workload register --image ollama/ollama:latest --port 11434 \
    --gpu 029 --description "my workload"

# Or use YAML for env vars, storage mounts, multi-container, etc.
gcube workload register --skeleton > workload.yaml
# fill in description / containerImage / gpuCode, then:
gcube workload register -f workload.yaml

# register prints the SER — use it below
gcube workload start <SER>
gcube workload logs <SER>

# stop when done — GPU billing continues while running
gcube workload stop <SER>
```

## Commands

| Command | Description |
|---|---|
| `gcube auth login\|logout\|status` | Browser-based authentication (PKCE) |
| `gcube gpu list` | Available GPUs with specs and pricing |
| `gcube workload register\|update\|list\|describe` | Manage workloads |
| `gcube workload start\|stop\|delete` | Start (with live deploy monitoring), stop, delete |
| `gcube workload watch` | Re-attach to deployment progress |
| `gcube workload logs\|pods\|ssh` | Logs, pod info, SSH access |
| `gcube workload schedule\|unschedule` | Scheduled start/stop |
| `gcube storage list` | Personal storage list |
| `gcube resource workload` | GPU/CPU/memory/disk/network usage |
| `gcube point status\|spending` | Point balance and spending history |
| `gcube credential list\|create\|delete` | Registry credentials |
| `gcube config set\|get\|status` | Configuration management |
| `gcube completion install` | Shell completion (bash/zsh/fish) |
| `gcube skill show\|install` | AI agent skill for Claude Code, Cursor, etc. |

> **Aliases:** `wl` = workload, `cred` = credential.
> Use `gcube <command> --help` for detailed options.

## CI / Headless

Browser login (`gcube auth login`) is unavailable in CI.
Generate a token at [Access Token](https://gcube.ai/ko/demand/user/access-token), then:

```bash
export GCUBE_ACCESS_TOKEN="<your-token>"
```

Or persist via config:

```bash
gcube config set --token "<your-token>"
```

Destructive commands prompt for confirmation — pass `-y` in non-interactive runs:

```bash
gcube workload stop <SER> -y
```

## Output Formats

```bash
gcube -o json workload list       # JSON
gcube -o yaml workload describe 2100  # YAML
gcube workload list               # table (default)
```

## Documentation

- **User Guide**: [gcube Docs](https://data-alliance.github.io/gai-platform-docs/)
- **Support**: gcube.ai@data-alliance.com

## License

[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
