Skip to content

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 (except update).

Scripts

Command Page
tunnel SSH tunnel manager
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
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
cp Copy with Azure support
cu122 CUDA 12.2 install
inject-alias Shell alias injection
openai-proxy OpenAI → TRAPI proxy
sysinfo / check_py System / Python info

Built-in helpers

See Built-in helpers: list, update, 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).

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.