Skip to main content

Professional CLI toolkit for Modal GPU workflows, account management, and billing visibility

Project description

m-gpux

Python CLI Docs

m-gpux is a professional CLI toolkit for Modal power users who need fast GPU access, multi-profile account control, and simple cost visibility.

Highlights

  • Interactive GPU hub for Jupyter, script execution, and web shell sessions
  • Multi-account profile management in one command namespace
  • Billing inspection per profile or across all configured accounts
  • Friendly terminal UX with rich tables, prompts, and guided flows

Table of Contents

Installation

Requirements

  • Python 3.10+
  • Modal account credentials (token_id, token_secret)
  • Modal CLI in PATH (modal command)

Install from source

git clone https://github.com/PuxHocDL/m-gpux.git
cd m-gpux
pip install -e .

Install from PyPI

pip install m-gpux

Quick Start

# 1) Add your first profile
m-gpux account add

# 2) Check configured profiles
m-gpux account list

# 3) Launch the interactive GPU hub
m-gpux hub

# 4) Inspect 30-day usage across all accounts
m-gpux billing usage --days 30 --all

Core Commands

Global

m-gpux --help
m-gpux info

Profile Management

m-gpux account list
m-gpux account add
m-gpux account switch <profile_name>
m-gpux account remove <profile_name>

Billing

m-gpux billing open
m-gpux billing usage --days 7
m-gpux billing usage --account personal
m-gpux billing usage --all

Interactive Hub

m-gpux hub

Hub actions:

  • Jupyter Lab on selected GPU
  • Run local Python script on selected GPU
  • Interactive web Bash shell on selected GPU

Documentation

Architecture

  • m_gpux/main.py: CLI entrypoint and command registration
  • m_gpux/commands/account.py: profile CRUD and active profile switching
  • m_gpux/commands/billing.py: usage aggregation and billing dashboard links
  • m_gpux/commands/hub.py: guided GPU runtime launcher

Configuration

Modal profiles are persisted in ~/.modal.toml.

If the active profile is removed, another existing profile is promoted automatically.

Troubleshooting

  • No configured Modal profiles found
    • Run m-gpux account add.
  • modal: command not found
    • Install Modal CLI and ensure PATH is set correctly.
  • Script file does not exist in hub mode
    • Run command from the script directory or provide the correct filename.

Contributing

pip install -e .
python -m m_gpux.main --help

Open PRs are welcome for UX polish, command improvements, and docs quality.

Release to PyPI

The repository includes automated PyPI publishing via GitHub Actions.

  1. Configure a Trusted Publisher on PyPI with:
  • Project: m-gpux
  • Owner: PuxHocDL
  • Repository: m-gpux
  • Workflow: publish-pypi.yml
  • Environment: pypi
  1. Create GitHub environment pypi in repository settings.
  2. Bump version in pyproject.toml.
  3. Create and push a version tag:
git tag v1.0.1
git push origin v1.0.1

The workflow Publish Python Package will build and publish automatically with OIDC.

License

MIT

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

m_gpux-1.0.5.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

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

m_gpux-1.0.5-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file m_gpux-1.0.5.tar.gz.

File metadata

  • Download URL: m_gpux-1.0.5.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for m_gpux-1.0.5.tar.gz
Algorithm Hash digest
SHA256 ecb85d00d929fdd243770d03f358008f9dd926b891786db3d0632f1fd798a88d
MD5 5f8bcb65bf88a3c0e65326d84ae9a3cb
BLAKE2b-256 68683817370d7fed9238fbdece6eee9a98229f2254588abeb50b547eb7af4c78

See more details on using hashes here.

Provenance

The following attestation bundles were made for m_gpux-1.0.5.tar.gz:

Publisher: publish-pypi.yml on PuxHocDL/m-gpux

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

File details

Details for the file m_gpux-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: m_gpux-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for m_gpux-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2474442c0814dcac7e430cba6605eb9a70e57669e520c1458d4529d25e1fb1d2
MD5 625001d1791c7f31127d7801499aae3f
BLAKE2b-256 758ec5334646e4eaf80abade0975c4d764b8f4c872ad89bd200f4c9d50152a9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for m_gpux-1.0.5-py3-none-any.whl:

Publisher: publish-pypi.yml on PuxHocDL/m-gpux

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