Commands¶
Every subcommand of usm falls into one of two buckets:
- Scripts — declared in
scripts/_config.json, downloaded on first use, cached under~/.cache/usm/scripts/. Add new commands by editing that JSON file; no Python changes needed. - Built-ins — implemented directly in
usmo.cli. They don't touch the network (exceptupdate).
Scripts¶
| Command | Page |
|---|---|
tunnel |
SSH tunnel manager |
ssh |
Resilient ssh wrapper |
proxy |
HTTP/SOCKS/Clash proxy (mihomo) |
clash |
ClashX-style mihomo manager |
gpu |
GPU picker/watch |
port |
Port discovery/kill |
disk |
Disk partition/format/mount |
notify |
Long-task pings |
secret |
Encrypted env store |
git-auth |
Directory-aware Git identities and SSH keys |
rsync |
Smart rsync wrapper |
clip |
Clipboard / OSC52 |
wait |
wait-for-it |
bench |
Machine benchmark |
share |
File share over HTTP |
serve |
Rich file server (uploads, range, zip) |
init |
Machine bootstrap |
blobmount |
Mount Azure blob, refreshing the SAS |
cp |
Copy with Azure support |
azsync |
Watch and sync to Azure Blob |
cu122 |
CUDA 12.2 install |
inject-alias |
Shell alias injection |
openai-proxy |
OpenAI + Anthropic → TRAPI proxy |
sysinfo / check_py |
System / Python info |
Built-in helpers¶
See Built-in helpers: list, search, update, install, uninstall, clean, version.
Global flags¶
These work for any subcommand:
| Flag | Purpose |
|---|---|
-U, --upgrade |
Force re-download of the script before running it. |
--debug |
Bypass the cache; run from ./scripts/<name> in the current dir (for iterating on scripts inside a git clone). |
-h, --help |
Print usage for that command (works on the top-level CLI too). |
Note
Commands that forward an arbitrary command line — ssh, rsync,
notify run, secret run, git-auth exec/clone — accept --help but
not -h. Click matches registered short flags inside glued tokens, so
a -h alias would fire on ordinary arguments like rsync -avh or
ssh -L8080:localhost:80 and print help instead of running anything.
Exit codes¶
usm propagates the script's exit code unchanged. If ssh exits 255 or your
script errors with click.UsageError, that's what your shell sees. The CLI
wrapper itself only emits its own non-zero exit on MissingUv (the script
needs uv but it's not installed) and on OSError from the spawn itself.