usm
One CLI for the boxes you SSH into.
33 tools for what you actually do on a remote machine — open a tunnel, find a free GPU, mount a blob container, serve a directory, kill whatever is holding port 8080 — behind a single command that installs in one line.
curl -fsSL https://raw.githubusercontent.com/HSPK/usm/main/scripts/install.sh | bash
Then, on any machine:
$ usm search proxy
2 match(es) for 'proxy'
name version description
──────────────────────────────────────────────────────────────────────────
● openai-proxy v1.4.1 Local OpenAI + Anthropic compatible proxy fo…
○ proxy v1.0.1 HTTP/SOCKS/Shadowsocks proxy server or simpl…
● cached ○ not yet downloaded · 1/2 cached · usm <name> --help for details
Why
Every one of these started as a script pasted between machines until it rotted.
usm is the version that stopped rotting: one install, one help system, and one
set of conventions everywhere you work.
- Nothing to set up per machine. Scripts download on first use and are
cached under
~/.cache/usm/scripts, pinned by SHA-256. - No dependency roulette. Each script declares its own requirements and gets
its own venv, so
usm gpunever breaks becauseusm openai-proxywanted a different httpx — and nothing lands in your system Python. - Long-running things stay running. Tunnels, proxies, syncs, and mounts
install as systemd/launchd units with
enable,status, andlogs. - Consistent by design. Same verbs (
ls,status,logs,enable), same output vocabulary, same--jsonwhere it matters. See the design system.
The package installs as usmo; the command is usm.
Commands
usm list # everything
usm list --cached # just what's downloaded
usm search blob # match names and descriptions
usm <command> --help # help for one command
Network & remote
| Command | What it does |
|---|---|
host |
SSH inventory in a fenced ~/.ssh/config block, plus fan-out exec |
ssh |
ssh with auto-reconnect and terminal repair |
tunnel |
SSH tunnels (local/remote/SOCKS) with state + autostart |
proxy |
Turn a box into an HTTP/SOCKS/Shadowsocks proxy, or a Clash client |
clash |
ClashX-style manager for mihomo: subs, TUN, nodes, latency |
net |
Inspect, diagnose, and monitor host networking |
port |
Show what holds a port; free it |
wait |
Block until host:port / TCP / HTTP answers |
session |
Inspect and manage logged-in user sessions |
Files & storage
| Command | What it does |
|---|---|
share |
Serve a file/dir over HTTP, optionally tunneled out |
serve |
Full file server via miniserve (uploads, range, zip, auth) |
rsync |
rsync with sensible defaults + auto-excludes |
cp |
Copy across local and blobfuse paths, delegating to azcopy |
azsync |
Watch a directory and keep it mirrored to Azure Blob |
blobmount |
Mount blob containers, keeping the SAS fresh |
dl |
Resumable, checksum-verified downloads with mirrors |
space |
Find what's eating the disk and reclaim it safely |
clip |
Clipboard from stdin; OSC52 fallback over SSH |
Machine & hardware
| Command | What it does |
|---|---|
doctor |
One-pass health check: disk, memory, GPU, mounts, services |
init |
Bootstrap a machine with modern dev tools (cross-platform) |
gpu |
GPU inventory, free-picker, watch, and kill |
disk |
Inspect, partition, format, and mount disks |
bench |
Benchmark CPU / memory / disk / network / GPU |
cu122 |
Install NVIDIA driver + CUDA 12.2 |
sysinfo |
System / GPU / CUDA environment summary |
check_py |
Show the active Python/pip versions |
Dev workflow
| Command | What it does |
|---|---|
svc |
Run any command as a supervised service, with boot integration |
watch |
Re-run a command whenever files change, debounced |
secret |
Encrypted local env store; inject secrets into processes |
git-auth |
Select Git identities and SSH keys by directory |
notify |
Ping ntfy.sh / Telegram / webhook when a command exits |
openai-proxy |
Local OpenAI + Anthropic compatible proxy for Microsoft TRAPI |
inject-alias |
Manage a marker-fenced alias block in your shell rc |
Full reference: https://hspk.github.io/usm/commands/.
Examples
usm init # bootstrap a fresh machine
usm tunnel local 8080:db:5432 user@bastion # forward a port, keep it up
usm port kill 8080 # evict whatever squats there
usm blobmount mount /mnt/data acct container # mount blob, refresh the SAS
usm notify -- python train.py # ping your phone when it exits
usm share ./build --tunnel user@bastion # hand someone a file, from anywhere
usm doctor # is this machine healthy?
usm svc add api -- ./serve.sh # keep it running, and at boot
usm watch src -- pytest -q # re-run tests on every save
CUDA_VISIBLE_DEVICES=$(usm gpu free 2) python train.py # grab the 2 idlest GPUs
Install any script as a short command on your PATH:
usm install clash cx # `cx ...` now runs `usm clash ...`
usm uninstall cx
Updating
usm update # refresh the catalog
usm update --all # re-download every cached script
usm update tunnel # refresh a single script
Scripts self-heal: if cached files stop matching the catalog's recorded hash,
usm refreshes the manifest before building the environment, so a stale
catalog can never pair old requirements with new code.
How it works
The CLI (src/usmo/cli/) is a thin frontend over the usmo.core SDK; the
command manifest lives in scripts/_config.json.
Adding a command means adding a script and an entry — no Python changes.
- Shell scripts run under
bash; Python scripts run under the current interpreter, or in a persistent per-script venv when they declarerequirements. - Scripts are fetched from this repository and cached, pinned by content hash.
--upgradeforces a fresh download;--debugruns the local file inscripts/instead, so iterating feels like editing any other repo file.
See Architecture for the full picture, and Development to contribute a script.
Notes
- Some scripts target Ubuntu;
init,clip, andtunnelare cross-platform. blobmount,azsync, andcpexpect Azure CLI /azcopy/blobfuse2.
License
MIT © Hangxing Wei
Metadata
Release files for usmo 0.12.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| usmo-0.12.1.tar.gz | 499.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| usmo-0.12.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 536.5 kB
Release files / usmo-0.12.1.tar.gz
| Download URL | usmo-0.12.1.tar.gz |
|---|---|
| Size | 499.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03d6f00e3e5a9281572789380060a7fb61eef601cbe8173b2d65fe1be44cf33f
|
|
BLAKE2b-256 checksum How to use checksums |
7d988183149ec7df0c3985a71d5b1afec8cf473a56a81574252ad4317af7d2ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / usmo-0.12.1-py3-none-any.whl
| Download URL | usmo-0.12.1-py3-none-any.whl |
|---|---|
| Size | 37.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cad54dff4916b729a93b8cab4dac7f9a7d8dc26d4f27af388238be87c91e3858
|
|
BLAKE2b-256 checksum How to use checksums |
e8a511d76c5f8f6070e802916552b9fb410987589beb25ca8770c717f5cf8570
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency log