Bootstrap machines and run cached utility scripts from one CLI.
Project description
usm
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 toolinstalls isolated and reliable. - Local
--debugmode 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.
See everything (with one-line descriptions and cache status) from the CLI:
usm list # all commands
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 keeps a small manifest of commands in src/usmo/cli.py.
- Shell scripts are executed with
bash. - Python scripts are executed with the current interpreter via
sys.executable. - Remote scripts are downloaded from this repository and cached locally.
--upgradeforces a fresh download of the selected script.--debugbypasses the cache and runs the local file underscripts/.- Managed alias insertion uses start/end markers so rerunning the command updates the block instead of duplicating it.
inject-aliasis implemented withclickand 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:
- Build the source distribution and wheel with
uv build(version is derived from the git tag automatically viahatch-vcs). - Create or update a GitHub Release for that tag.
- Upload the built artifacts to the release page.
- 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.
blobmountandcpexpect Azure CLI /azcopy/blobfuse2style workflows.- Cached scripts live in
~/.cache/usm/scripts.
Project details
Release history Release notifications | RSS feed
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.8.1.tar.gz.
File metadata
- Download URL: usmo-0.8.1.tar.gz
- Upload date:
- Size: 131.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9663b09b2123d4f5f0cd68f5ebf51e75f4ae6ab82e025248a8aeef559078d768
|
|
| MD5 |
0f5245d6d3e31939a8109f7b5446fd42
|
|
| BLAKE2b-256 |
dd10bb79f8eed7cc878fe19648420ddccfe4165d2b952c8e6fb5c522eae5056d
|
Provenance
The following attestation bundles were made for usmo-0.8.1.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.8.1.tar.gz -
Subject digest:
9663b09b2123d4f5f0cd68f5ebf51e75f4ae6ab82e025248a8aeef559078d768 - Sigstore transparency entry: 1792038650
- Sigstore integration time:
-
Permalink:
HSPK/usm@f6c749da0daa02b49c9dc1c1248d7039f37a4dc2 -
Branch / Tag:
refs/tags/v0.8.1 - Owner: https://github.com/HSPK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f6c749da0daa02b49c9dc1c1248d7039f37a4dc2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file usmo-0.8.1-py3-none-any.whl.
File metadata
- Download URL: usmo-0.8.1-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e378033b5581d9beeba82bf53f4cdca30f89fbb3d2ef18916b6442e36db75c5
|
|
| MD5 |
450ba765eb732c6e996e3f75315b8968
|
|
| BLAKE2b-256 |
69b6a5a769b1fd9dbea25add46ba4dd251cedb5f129b93fb2402e8baa6c124e1
|
Provenance
The following attestation bundles were made for usmo-0.8.1-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.8.1-py3-none-any.whl -
Subject digest:
3e378033b5581d9beeba82bf53f4cdca30f89fbb3d2ef18916b6442e36db75c5 - Sigstore transparency entry: 1792038731
- Sigstore integration time:
-
Permalink:
HSPK/usm@f6c749da0daa02b49c9dc1c1248d7039f37a4dc2 -
Branch / Tag:
refs/tags/v0.8.1 - Owner: https://github.com/HSPK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f6c749da0daa02b49c9dc1c1248d7039f37a4dc2 -
Trigger Event:
push
-
Statement type: