Skip to content

usm

Release PyPI Python

Bootstrap machines and run cached utility scripts from one CLI.

usm is a lightweight CLI that wraps machine-setup tasks, Azure/blobfuse workflows, and a handful of day-to-day productivity helpers behind a single entry point. Scripts are fetched on demand, cached locally, and pinned by content hash — so a fresh machine can be productive in one command.

The package installs as usmo, but the executable is usm.

Highlights

  • One entry point for machine setup, storage helpers, and quick admin tasks.
  • On-demand script download with per-script versioning and SHA-256 pinning; cached under ~/.cache/usm/scripts.
  • uv-managed isolation for Python scripts — every script declares its own requirements, installed once into a persistent per-script venv, never polluting your Python env.
  • --debug mode runs scripts from a local checkout, so iterating on a script feels like editing any other repo file.

Quick start

# 1. install
curl -fsSL https://raw.githubusercontent.com/HSPK/usm/main/scripts/install.sh | bash

# 2. see what's available
usm list

# 3. run something
usm sysinfo
usm tunnel local 8080:db:5432 user@bastion
usm inject-alias --shell zsh

See Installation for alternatives, or jump to the command you want from the Commands section.

At a glance

Command What it does
usm tunnel SSH tunnels (local / remote / SOCKS) with state + launchd/systemd autostart
usm proxy Turn a box into an HTTP/SOCKS (+Shadowsocks) proxy, or a Clash client routing rule-matched traffic through one (mihomo)
usm clash ClashX-style CLI manager for mihomo: subscriptions, TUN, mode, node selection, system proxy, LAN, live logs, latency tests
usm gpu GPU inventory, free-picker, watch, kill (nvidia-smi wrapper)
usm port Show what's on a port; kill the holder
usm notify Wrap a command and ping ntfy.sh / Telegram / webhook when it exits
usm secret Encrypted local env store; inject into shells or processes
usm rsync rsync with sensible defaults + auto-excludes
usm clip Cross-platform clipboard; OSC52 fallback for SSH
usm wait wait-for-it (host:port, TCP, HTTP)
usm bench Quick machine benchmark (CPU / mem / disk / network / GPU)
usm share Serve a file/dir over HTTP, optionally tunneled out
usm serve Full-featured file server (uploads, range, zip, auth) via miniserve
usm init Bootstrap a fresh Ubuntu machine
usm blobmount Mount an Azure blob container locally
usm cp Copy across local + blobfuse mountpoints, delegating to azcopy
usm cu122 Install NVIDIA driver 535 + CUDA 12.2 on Ubuntu
usm inject-alias Manage a marker-fenced alias block in your shell rc
usm openai-proxy Run a local OpenAI-compatible proxy to Microsoft TRAPI
usm sysinfo / check_py Print system / Python info
Built-in helpers list, update, clean, version

How it works in 30 seconds

Scripts are declared in scripts/_config.json and downloaded from raw.githubusercontent.com/HSPK/usm/main/scripts/. The CLI looks the command up, fetches + caches the file (if missing), then runs it: shell scripts under bash, Python scripts under the current interpreter, and Python scripts with declared requirements in a persistent per-script venv (~/.cache/usm/envs/<name>) that is built once and reused offline thereafter.

See Architecture for the full picture.