usm
One CLI for the boxes you SSH into.
27 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 |
|---|---|
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 |
clip |
Clipboard from stdin; OSC52 fallback over SSH |
Machine & hardware
| Command | What it does |
|---|---|
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 |
|---|---|
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
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usmo-0.11.2.tar.gz.
File metadata
- Download URL: usmo-0.11.2.tar.gz
- Upload date:
- Size: 399.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ef5296cd3fe8ad523a6abaa10c8f822a5d34f94678e7f61674c330bd38e8aec
|
|
| MD5 |
f5707ecd01a9d272eab80fe5998a2502
|
|
| BLAKE2b-256 |
41c39185ca115de5027782f721560c75e16a9c9ecf1a050a3984107393707756
|
Provenance
The following attestation bundles were made for usmo-0.11.2.tar.gz:
Publisher:
release.yml on HSPK/usm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
usmo-0.11.2.tar.gz -
Subject digest:
3ef5296cd3fe8ad523a6abaa10c8f822a5d34f94678e7f61674c330bd38e8aec - Sigstore transparency entry: 2463194077
- Sigstore integration time:
-
Permalink:
HSPK/usm@3caac17b9e97693485d9fab190ac9096ee0da8d0 -
Branch / Tag:
refs/tags/v0.11.2 - Owner: https://github.com/HSPK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3caac17b9e97693485d9fab190ac9096ee0da8d0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file usmo-0.11.2-py3-none-any.whl.
File metadata
- Download URL: usmo-0.11.2-py3-none-any.whl
- Upload date:
- Size: 36.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b50275c5acf096141839c0186ba52d1be4732bfa889d578bbed6c0c70a940e7
|
|
| MD5 |
32f30d6dc4cdfbb8ee9ed1f9a7929058
|
|
| BLAKE2b-256 |
7cea9757d45204ab79499761b9e68f6f3c28b03117bf3a7159321a95e14b9c38
|
Provenance
The following attestation bundles were made for usmo-0.11.2-py3-none-any.whl:
Publisher:
release.yml on HSPK/usm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
usmo-0.11.2-py3-none-any.whl -
Subject digest:
7b50275c5acf096141839c0186ba52d1be4732bfa889d578bbed6c0c70a940e7 - Sigstore transparency entry: 2463194168
- Sigstore integration time:
-
Permalink:
HSPK/usm@3caac17b9e97693485d9fab190ac9096ee0da8d0 -
Branch / Tag:
refs/tags/v0.11.2 - Owner: https://github.com/HSPK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3caac17b9e97693485d9fab190ac9096ee0da8d0 -
Trigger Event:
push
-
Statement type: