Skip to main content

usm

Tests PyPI Downloads Python License Docs

One CLI for the boxes you SSH into.

34 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 gpu never breaks because usm openai-proxy wanted 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, and logs.
  • Consistent by design. Same verbs (ls, status, logs, enable), same output vocabulary, same --json where 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
rm Delete Azure Blob files/directories after confirmation
mv Move Azure Blob files/directories by verified copy, then deletion
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
convo Pack and restore Copilot / Codex / Claude Code sessions
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 declare requirements.
  • Scripts are fetched from this repository and cached, pinned by content hash.
  • --upgrade forces a fresh download; --debug runs the local file in scripts/ 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, and tunnel are cross-platform.
  • blobmount, azsync, and cp expect Azure CLI / azcopy / blobfuse2.

License

MIT © Hangxing Wei

Metadata

Release files for usmo 0.12.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for usmo 0.12.2
File Size Uploaded Provenance Actions
usmo-0.12.2.tar.gz 605.7 kB With provenance Details for usmo-0.12.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for usmo 0.12.2
File Interpreter ABI Platform Actions
usmo-0.12.2-py3-none-any.whl Python 3 none any Details for usmo-0.12.2-py3-none-any.whl

Total release size: 643.3 kB

Release files / usmo-0.12.2.tar.gz

Download URL usmo-0.12.2.tar.gz
Size 605.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b3320c14a43e475b0f75af6c31055243ab00277559195a4bada389e1b3eac906
BLAKE2b-256 checksum
How to use checksums
3fcc9ac79a9e3988324a8be6536822db5e4a26b4d8690593626946cb8b83a1c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Release files / usmo-0.12.2-py3-none-any.whl

Download URL usmo-0.12.2-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02f1d93d7de23b21df05f83e61fbc9ce53356e7b9f445dfd5573734f134f5238
BLAKE2b-256 checksum
How to use checksums
dbb8f5be59d695f095737ed63f9501040e14fb7f19f82930c772ad3889b1340d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Security for usmo 0.12.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for usmo-0.12.2.tar.gz

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 Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.12.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page