Skip to content

Command Reference

Complete reference for every m-gpux command, subcommand, and common workflow.

Use m-gpux --help or m-gpux <command> --help for inline help at any time.

Overview

Command Purpose
m-gpux Interactive menu for every command (welcome screen when not in a terminal)
m-gpux menu Open the interactive menu explicitly
m-gpux ui Local web dashboard for accounts, compute, workloads and costs
m-gpux info Print version and framework metadata
m-gpux dev Dev boxes: SSH / VS Code Remote, pause & resume, file sync
m-gpux hub Interactive GPU session launcher
m-gpux sessions List, stop, inspect, and pull Hub/dev sessions
m-gpux preset Save and rerun common workload presets
m-gpux serve Deploy LLMs as OpenAI-compatible APIs
m-gpux gateway Authenticated async API for predeclared CPU/GPU jobs
m-gpux kaggle Kaggle CLI across accounts: GPU quota, live kernels, AUTO pushes
m-gpux colab Colab CLI across Google accounts: compute units, runtimes, AUTO runs
m-gpux stop Stop running m-gpux apps
m-gpux account Manage Modal profiles
m-gpux billing Track compute costs and prices
m-gpux budget Monthly spending limits per account, with auto-stop
m-gpux image Prebuild & publish reusable images
m-gpux init / up / runs mgpux.toml projects: define tasks, run them, and view their history
m-gpux run Run a script wherever there is capacity: Kaggle, Colab or Modal
m-gpux secrets Modal Secrets across every workspace
m-gpux volume Browse, upload, download and clean Volumes on any account
m-gpux notify Discord / Slack / Telegram / ntfy / webhook notifications

Global

Interactive menu

m-gpux          # in a terminal
m-gpux menu     # same menu, explicitly

Opens an arrow-key menu of every m-gpux command, grouped by workflow (GPU Hub, dev boxes, sessions, presets, serving, compute gateway, billing & budgets, images, accounts). Arguments a command needs are picked from lists: profiles, presets, tracked sessions, API keys and published images. Anything else is asked in a short prompt. The menu prints the command it runs (for example $ m-gpux sessions logs s-1a2b), so you can learn the direct form as you go, and it comes back when the command finishes. Press Ctrl+C or pick Quit to leave.

When stdin or stdout is not a terminal (pipes, CI), m-gpux prints the logo and a Quick Actions table instead.

ui

m-gpux ui [--port 7878] [--host 127.0.0.1] [--no-browser]

Serves the web dashboard on localhost and opens it in your browser. The printed link carries a private token that changes on every start.

Option Description Default
--port, -p Port to listen on; the next free one is used if taken 7878
--host Interface to bind; anything but loopback exposes your accounts 127.0.0.1
--no-browser Print the link instead of opening a browser off

info

m-gpux info

Prints the version number and framework metadata.


account

Manage local Modal profiles. Profiles are stored in ~/.modal.toml.

list

m-gpux account list

Displays a table of all configured profiles. The active profile is marked.

Example output:

Profile Workspace Active
personal puxpuxx yes
work team-ai

add

m-gpux account add

Interactive prompt to add or update a profile. You will be asked for:

  • Profile name - a local label such as personal, work, or team-gpu
  • Token ID - from modal.com/settings
  • Token Secret - shown once when the token is created

If a profile with the same name already exists, its credentials are updated.

switch

m-gpux account switch <profile_name>

Sets <profile_name> as the active Modal profile. All subsequent commands use this profile unless a command lets you override it.

remove

m-gpux account remove <profile_name>

Deletes a profile from ~/.modal.toml. If the removed profile was active, another existing profile is promoted automatically.


billing

Track usage costs from one or more profiles.

open

m-gpux billing open

Opens the Modal usage dashboard in your default browser.

usage

m-gpux billing usage
m-gpux billing usage --days 7
m-gpux billing usage --account personal
m-gpux billing usage --all
m-gpux billing usage --all --compute-only --resources
Option Description Default
--days Use a daily lookback instead of the current UTC calendar month Current UTC month
--account, -a Check a specific named profile Active profile
--all Aggregate usage across all configured profiles false
--resources, -r Add a cost breakdown by resource (CPU, memory, each GPU type) false
--compute-only Count CPU, memory and GPU charges, excluding storage, egress and other resources false

The current-month report uses completed hourly intervals. A service deployed in a previous month appears only for usage recorded in the requested period. The figures are metered charges before credits and adjustments. Use billing summary for the workspace's billed amount. Detailed reports depend on Modal's plan and workspace permissions.

Example:

m-gpux billing usage --days 7 --all --resources

rates

m-gpux billing rates
m-gpux billing rates --refresh

Prices per GPU-hour, CPU core-hour and GiB-hour (Functions vs. Sandboxes) used for the estimates in every picker. --refresh fetches live prices.

summary

m-gpux billing summary
m-gpux billing summary --all

Shows the current billing cycle per account: metered cost, credits and other adjustments, the amount actually billed, and the spending category (deployed apps, notebooks, volumes…) that cost the most.


dev

Persistent dev boxes on Modal Sandboxes.

m-gpux dev up [--name NAME] [--image IMG] [--hours 12] [--lock-ip] [--no-ssh]
m-gpux dev list
m-gpux dev ssh | code | shell [NAME]
m-gpux dev sync push [--all] | pull [--to DIR]
m-gpux dev pause [NAME] [--keep-days 30]
m-gpux dev resume [NAME] [--hours N]
m-gpux dev down [NAME]

See Dev Boxes for the full guide.


budget

m-gpux budget set 20 [-a ACCOUNT]
m-gpux budget show
m-gpux budget check [--stop]
m-gpux budget watch [--interval 600] [--no-stop]
m-gpux budget clear [-a ACCOUNT]

See Costs, Budgets & Images.


image

m-gpux image build NAME [--python 3.12] [-r requirements.txt] [--pip a,b] [--apt x,y] [-a ACCOUNT | --all]
m-gpux image list [--remote]
m-gpux image forget NAME

sessions

Manage Hub/dev sessions tracked in ~/.m-gpux/sessions.json.

m-gpux sessions list
m-gpux sessions show <session-id>
m-gpux sessions logs <session-id>
m-gpux sessions open <session-id>
m-gpux sessions pull <session-id> --to ./remote-workspace
m-gpux sessions stop <session-id>
m-gpux sessions forget <session-id>

The most common workflow is:

m-gpux sessions list
m-gpux sessions pull sess-1234abcd --to ./m-gpux-workspace
m-gpux sessions stop sess-1234abcd

sessions logs streams by default. Use --no-follow with --tail, --since or --search to read history instead:

m-gpux sessions logs sess-1234abcd --no-follow --tail 500
m-gpux sessions logs sess-1234abcd --since 2h --search error

Sessions are recorded as soon as a detached Hub/dev app starts successfully. If you stop it at the final prompt, the tracked state changes to stopped.


preset

Save and rerun common Jupyter Lab launch settings.

m-gpux preset create
m-gpux preset list
m-gpux preset show rl-a100
m-gpux preset run rl-a100
m-gpux preset delete rl-a100

Presets store:

  • selected profile
  • compute settings
  • pip dependency setup
  • upload exclude patterns

The Hub offers to save a preset after you configure a Jupyter Lab session.


hub

Start interactive provisioning for GPU sessions.

m-gpux hub

The hub is a step-by-step wizard:

Step What happens
1. Profile Select which Modal profile to use if multiple exist
2. GPU Pick from the available Modal GPU types
3. Action Choose Jupyter Lab or vLLM Inference
4. Python Choose Python 3.10, 3.11, 3.12, 3.13, 3.14, or enter a custom Modal-supported version
5. Review The generated modal_runner.py is shown for inspection
6. Launch Press Enter to execute, or edit the script first

Hub actions

Jupyter Lab

Launches a GPU-backed Jupyter Lab instance. A public URL is printed to the terminal so you can open it in the browser.

vLLM Inference

Starts an OpenAI-compatible API server for a selected HuggingFace model. Choose deploy mode for persistent serving, or run mode for one-off testing.

Editing before launch

The hub shows the full modal_runner.py before executing. You can modify pip packages, timeouts, environment variables, or the container image before pressing Enter.

After execution completes, you are prompted whether to stop the app and release the GPU.


serve

Deploy LLMs as OpenAI-compatible APIs with API key authentication.

m-gpux serve --help

deploy

m-gpux serve deploy

Interactive wizard to deploy a model:

Step Prompt Default
1 Model preset or custom HuggingFace ID Qwen/Qwen2.5-7B-Instruct
2 GPU type Recommended for selected model
3 Max context length 4096
4 vLLM engine tuning 0.92, 128, 1
5 Min containers / keep warm 1
6 API key First active key
Option Description Default
--strategy rolling keeps old containers serving during a redeploy; recreate replaces them immediately rolling

The endpoint URL is read from the deploy output and saved to ~/.m-gpux/serve.json, so dashboard and warmup find it without --url.

What gets deployed:

  • an auth proxy on port 8000
  • a vLLM backend on port 8001
  • shared cache volumes for model weights
  • /health and /stats endpoints for monitoring

dashboard

m-gpux serve dashboard
m-gpux serve dashboard --url https://workspace--m-gpux-llm-api-serve.modal.run
m-gpux serve dashboard --interval 5
Option Description Default
--url, -u Base URL of the deployed API Last deployed URL, else guessed from profiles
--interval, -i Refresh interval in seconds 3.0

Displays a live terminal dashboard for GPU, system, traffic, latency, and token metrics.

logs

m-gpux serve logs
m-gpux serve logs --no-follow --tail 300
m-gpux serve logs --since 1h --search "CUDA out of memory"
Option Description Default
--follow/--no-follow Keep streaming new lines --follow
--tail, -n Only the last N entries all / 100
--since Start of range (2h, 2026-09-01T05:00) —
--search, -s Only lines containing this text —
--source stdout, stderr or system all

stop

m-gpux serve stop

Stops the m-gpux-llm-api app on the current Modal profile.

restart

m-gpux serve restart
m-gpux serve restart --strategy rolling

Replaces the server's containers with fresh ones without redeploying code (modal app rollover). Handy after a hung vLLM engine or a changed Secret. recreate (default) swaps everything immediately; rolling avoids downtime.

warmup

m-gpux serve warmup
m-gpux serve warmup --url https://workspace--m-gpux-llm-api-serve.modal.run
m-gpux serve warmup --model Qwen/Qwen3-8B

Triggers the deployment, waits for the backend to become responsive, and sends a tiny completion to warm the engine.

keys create

m-gpux serve keys create
m-gpux serve keys create --name production

Generates a new API key in the format sk-mgpux-<48 hex chars> and stores it in ~/.m-gpux/api_keys.json.

keys list

m-gpux serve keys list

Shows a table of all keys with name, masked value, creation date, and status.

keys show

m-gpux serve keys show <name>

Reveals the full API key value for the given key name.

keys revoke

m-gpux serve keys revoke <name>

Marks a key as revoked locally.

Redeploy required

Revoking a key only updates the local store. Run m-gpux serve deploy again to propagate the change to the running server.


gateway

Expose predeclared CPU/GPU tasks as an authenticated asynchronous HTTP API. See the Compute Gateway guide for the manifest format, HTTP API and job states.

m-gpux gateway --help

init

m-gpux gateway init [DIRECTORY] [--force]

Writes mgpux.gateway.toml and a starter mgpux_worker.py (a CPU JSON echo task). Refuses to overwrite existing files unless --force is given.

validate

m-gpux gateway validate [-f mgpux.gateway.toml]

Checks the manifest offline and prints each task's compute, command and timeout.

deploy

m-gpux gateway deploy [-f mgpux.gateway.toml] [-p PROFILE] [--strategy rolling|recreate]

Creates a fresh API key in a new Modal Secret, generates modal_gateway.py next to the manifest, runs modal deploy, and saves the URL and key to ~/.m-gpux/gateway.json. Without --profile it shows the usual profile picker (including AUTO). On failure, the new Secret is removed and the previous local config is kept.

submit

m-gpux gateway submit TASK [--input JSON | --input-file FILE] [--wait] [--timeout 900] [--idempotency-key KEY]
Option Description Default
--input JSON object passed to the task on stdin {}
--input-file Read the JSON object from a file
--wait Poll until the job finishes and print the result off
--timeout Client-side wait limit in seconds 900
--idempotency-key Retrying with the same key returns the original job

result, logs, cancel

m-gpux gateway result JOB_ID [--wait] [--timeout 900]
m-gpux gateway logs JOB_ID [--limit 100]
m-gpux gateway cancel JOB_ID

jobs

m-gpux gateway jobs [--refresh]

Lists up to 100 jobs submitted from this machine. --refresh re-reads every unfinished job from the gateway; jobs the gateway no longer knows (idle for 7+ days) are marked expired.

tasks, show, key, open

m-gpux gateway tasks   # tasks advertised by the deployed gateway
m-gpux gateway show    # URL, app, profile, manifest; key masked
m-gpux gateway key     # print the full API key
m-gpux gateway open    # open <url>/docs in the browser

kaggle

Kaggle notebooks across the accounts in ~/.kaggle/zoo.json. See Kaggle & Colab for the account file and workflows.

Command Purpose
m-gpux kaggle accounts GPU / TPU hours left and reset time per account
m-gpux kaggle add TOKEN [--user] [--team] [--note] Register an API token (username detected)
m-gpux kaggle remove NAME Forget an account
m-gpux kaggle status [--comp SLUG] [--hours 14] Running / queued kernels, free GPU slots, submissions today per team
m-gpux kaggle free Accounts that can start a GPU kernel now
m-gpux kaggle push [FOLDER] [--as NAME\|auto] [--wait] [--out DIR] Push a kernel folder, optionally as another account
m-gpux kaggle watch OWNER/SLUG [--as NAME] [--out DIR] Wait for a kernel, then download its output
m-gpux kaggle run NAME\|auto -- ARGS… Any kaggle command as an account (no_submit enforced)

Projects: init, up, run, runs

Declarative tasks in mgpux.toml. See Projects & Run Anywhere.

Command Purpose
m-gpux init [--command CMD] [--gpu L4] [--github-action] Write mgpux.toml (and a workflow) for this folder
m-gpux up [TASK] [--account NAME\|auto\|env] [--download] [--yes] [--dry-run] [-- ARGS…] Run a task on Modal and record the result
m-gpux run SCRIPT [--gpu T4] [--hours 1] [--where auto\|kaggle\|colab\|modal] [--plan] Pick Kaggle, Colab or Modal by free capacity
m-gpux runs list / runs show ID [--json] Run history with metrics, failures and cost

secrets

Modal Secrets on every workspace. See Workspaces.

Command Purpose
m-gpux secrets status [NAMES…] [--to all] Which workspace has which Secret
m-gpux secrets sync NAME KEY… [--from-dotenv FILE] [--to all] [--replace] Create or merge a Secret everywhere (values from .env, env vars or a hidden prompt)
m-gpux secrets delete NAME [--to …] [--yes] Delete it from one or more workspaces

m-gpux image status and m-gpux image sync NAME --to all do the same for published images.


volume

Command Purpose
m-gpux volume list [--all \| --account NAME] Volumes per account
m-gpux volume ls NAME [PATH] / du NAME Browse a folder / size per top-level entry
m-gpux volume get NAME REMOTE [LOCAL] / put NAME LOCAL [REMOTE] Download / upload
m-gpux volume rm NAME PATH [-r] / delete NAME Delete a file or a whole volume

notify

See Workspaces for events and channel types.

Command Purpose
m-gpux notify add [TYPE] [--name] [--events a,b] Add a channel (credential asked hidden) and send a test
m-gpux notify list / events / test [CHANNEL] / remove NAME Manage channels
m-gpux notify send TITLE [MESSAGE] [--event E] [--level L] Send a custom message
m-gpux notify watch [--long-running 4h] [--low-credit 5] [--once] Watch apps, credit and gateway jobs

colab

Google Colab runtimes across Google accounts. See Kaggle & Colab.

Command Purpose
m-gpux colab accounts Compute units, burn rate and runtimes per account
m-gpux colab login NAME Add or re-login a Google account (OAuth in the terminal)
m-gpux colab remove NAME Delete an extra account's login
m-gpux colab run SCRIPT [--gpu G] [--tpu T] [--high-mem] [--keep] [--as NAME\|auto] [-- ARGS…] Run a script on a fresh VM, then release it
m-gpux colab new -s NAME [--gpu G] [--as NAME\|auto] Start a named runtime
m-gpux colab sessions [--as NAME] Live runtimes
m-gpux colab stop NAME [--as ACCOUNT] Release a runtime
m-gpux colab as NAME\|auto -- ARGS… Any colab command as an account

stop

Stop running m-gpux apps across profiles.

m-gpux stop
m-gpux stop --all
Option Description Default
--all Scan all configured Modal profiles Current profile only

How it works:

  1. Scans for running apps whose description starts with m-gpux
  2. Displays a numbered table of matching apps
  3. Lets you select individual apps or stop all at once

Example interaction:

# Profile App ID Name State
1 personal ap-abc123... m-gpux-llm-api deployed
2 work ap-def456... m-gpux-jupyter running
  0: Stop ALL (2 apps)
  1: m-gpux-llm-api (personal)
  2: m-gpux-jupyter (work)

Select app to stop (0=all):