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.7.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.7-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: m_gpux-1.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 c75eb232cc801d769af29a9475d2477787c29da474a15a33fa9fd4234d87a6cc
MD5 1d593d6cd925166b924524ca014b12cb
BLAKE2b-256 916708cfd58cbc2f6dae8a4ac96023a809fc051eabbd11c5929cc812d63939cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for m_gpux-1.0.7.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.7-py3-none-any.whl.

File metadata

  • Download URL: m_gpux-1.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 816f9a633fa71c1e4d854b9a1e2b7a27cf2c05409e8011cd5b2fbb12a4c637e8
MD5 aede2d006fd51e9c552e2c4f0411fccb
BLAKE2b-256 b90193ecfa805bfd9881ffbad2d51292ddf00eb122e7ad8df7a40a0e10811949

See more details on using hashes here.

Provenance

The following attestation bundles were made for m_gpux-1.0.7-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