Skip to main content

usm

Release PyPI Release workflow Python

usm is a lightweight CLI for machine bootstrap tasks and day-to-day utility scripts. It gives you one command for common setup jobs, Azure/blobfuse workflows, and a few personal productivity helpers, while keeping the underlying scripts easy to iterate on.

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

Highlights

  • One entrypoint for machine setup, storage helpers, and quick admin tasks.
  • On-demand script download and caching under ~/.cache/usm/scripts.
  • Python subcommands run with the package interpreter, which keeps uv tool installs isolated and reliable.
  • Local --debug mode for iterating on scripts in this repository without downloading from GitHub.
  • Simple release flow driven by Git tags.

Installation

Quick Install (recommended)

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

The script will automatically install uv (via the official installer at https://astral.sh/uv) if needed, then install usmo via uv tool install. You may need to run source ~/.bashrc (or restart your shell) afterwards for the usm command to become available.

Manual Install

Install uv first, then install usmo as a uv-managed tool:

uv tool install usmo
# upgrade later with:
uv tool install --upgrade usmo

PyPI package page: https://pypi.org/project/usmo/

Or install from a local checkout while developing:

uv sync
uv tool install --force .

After installation, the CLI is available as:

usm <command> [args...]

Commands

usm bundles machine-setup scripts, networking/proxy tools, file servers, and a few built-in helpers. Scripts live in scripts/_config.json and download on first use — add new ones by editing that file, no Python changes required.

Find things from the CLI:

usm list                 # all commands
usm list --cached        # just what's downloaded
usm search blob          # match names and descriptions
usm <command> --help     # help for one command

Full reference: https://hspk.github.io/usm/commands/.

Aliases

Install any script as a short command on your PATH:

usm install clash cx     # `cx ...` now runs `usm clash ...`
usm uninstall cx

Shims are written to ~/.local/bin; usm warns if that directory isn't on your PATH.

Updating

usm update               # refresh the catalog (_config.json) only
usm update --all         # re-download every cached script
usm update tunnel        # refresh a single script

Examples

usm init                                        # bootstrap a machine
usm blobmount /mnt/data myaccount mycontainer   # mount an Azure blob container
usm cp /mnt/data/project ./backup               # azcopy-backed when Azure is involved
usm --upgrade check_py                          # force-refresh a script before running
usm --debug check_py                            # run from local ./scripts (no download)

See usm <command> --help or the docs for per-command usage.

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.

  • Shell scripts are executed with bash.
  • Python scripts run under the current interpreter via sys.executable, or — when they declare requirements — in a persistent per-script virtualenv.
  • Remote scripts are downloaded from this repository and cached locally.
  • --upgrade forces a fresh download of the selected script.
  • --debug bypasses the cache and runs the local file under scripts/.
  • Managed alias insertion uses start/end markers so rerunning the command updates the block instead of duplicating it.
  • inject-alias is implemented with click and supports bash, zsh, and PowerShell profile targets.

Development

Install the project locally:

uv sync

Build distributable artifacts:

uv build

Smoke-test the installed command:

uv run usm check_py

Release Flow

This repository includes a GitHub Actions workflow at .github/workflows/release.yml.

When you push a tag like v0.1.9, GitHub Actions will:

  1. Build the source distribution and wheel with uv build (version is derived from the git tag automatically via hatch-vcs).
  2. Create or update a GitHub Release for that tag.
  3. Upload the built artifacts to the release page.
  4. Publish to PyPI via Trusted Publishing (no secrets needed).

Create a new release with:

git tag -a v0.1.9 -m "v0.1.9"
git push origin v0.1.9

Notes

  • Some scripts are tailored for Ubuntu-based environments.
  • blobmount and cp expect Azure CLI / azcopy / blobfuse2 style workflows.
  • Cached scripts live in ~/.cache/usm/scripts.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

usmo-0.11.1.tar.gz (383.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usmo-0.11.1-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file usmo-0.11.1.tar.gz.

File metadata

  • Download URL: usmo-0.11.1.tar.gz
  • Upload date:
  • Size: 383.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for usmo-0.11.1.tar.gz
Algorithm Hash digest
SHA256 c3638fd71f789809b3f6598255617ed2d4ed5b56f210bb9b1b472b679a89c2fc
MD5 c71ee2dcfed89059b097fb08ab8e03ca
BLAKE2b-256 43c3ce21188e880a702298c8d5897aaf74666af80f68c6e575e4db8fc0578679

See more details on using hashes here.

Provenance

The following attestation bundles were made for usmo-0.11.1.tar.gz:

Publisher: release.yml on HSPK/usm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file usmo-0.11.1-py3-none-any.whl.

File metadata

  • Download URL: usmo-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for usmo-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea59f514bdfd934f8792c7b1fcd841eed52f8c55c854bc507c8491bbbd7dcbf7
MD5 d12d6c6a56d009886599b50f63505fb3
BLAKE2b-256 f40fb3420b583c89c626dbc06d90455d2bc22e6f066e5d648918dbc3e2d12661

See more details on using hashes here.

Provenance

The following attestation bundles were made for usmo-0.11.1-py3-none-any.whl:

Publisher: release.yml on HSPK/usm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.12.1

2 files

0.12.0

2 files

0.11.2

2 files

This release

0.11.1 This release

2 files

0.11.0

2 files

0.10.0

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.8

2 files

0.1.5

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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