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
pipxinstalls isolated and reliable. - Local
--debugmode for iterating on scripts in this repository without downloading from GitHub. - Simple release flow driven by Git tags.
Installation
Install from PyPI with pipx:
pipx install usmo
PyPI package page: https://pypi.org/project/usmo/
Or install from a local checkout while developing:
uv sync
pipx install --force .
After installation, the CLI is available as:
usm <command> [args...]
Commands
| Command | Description |
|---|---|
usm init |
Bootstrap a fresh Ubuntu machine with common packages, shell aliases, pipx tools, tmux plugins, and Neovim config. |
usm blobmount <mount_dir> <account> <container> |
Install blobfuse2 if needed, generate a SAS token from your Azure CLI login, and mount a blob container locally. |
usm cu122 |
Install NVIDIA driver 535, CUDA 12.2, and Vulkan-related packages on Ubuntu. |
usm cp [--use-sas-token] <source>... <destination> |
Copy between local paths and blobfuse2 mountpoints, delegating to azcopy when Azure storage is involved. |
usm check_py |
Print the active Python and pip locations and versions. |
| `usm inject-alias [--shell bash | zsh |
Examples
Initialize a new machine:
usm init
Mount a blob container:
usm blobmount /mnt/data myaccount mycontainer
Copy from a blobfuse mount to a local directory:
usm cp /mnt/data/project ./project-backup
Refresh the cached script before running it:
usm --upgrade check_py
Run against the local scripts/ directory instead of downloading from GitHub:
usm --debug check_py
Inject aliases into your zsh profile:
usm inject-alias --shell zsh
Inject aliases into your PowerShell profile:
usm inject-alias --shell powershell
Write the managed alias block into a specific file:
usm inject-alias --file ~/.config/usm/test-shell.rc
Write PowerShell-flavored aliases into a custom profile file:
usm inject-alias --shell powershell --file ~/Documents/PowerShell/Microsoft.PowerShell_profile.ps1
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.4, GitHub Actions will:
- Build the source distribution and wheel with
uv build. - Create or update a GitHub Release for that tag.
- Upload the built artifacts to the release page.
- Publish to PyPI if the repository secret
PYPI_API_TOKENis configured.
Create a new release with:
git tag -a v0.1.4 -m "v0.1.4"
git push origin v0.1.4
Notes
- Some scripts are tailored for Ubuntu-based environments.
blobmountandcpexpect Azure CLI /azcopy/blobfuse2style workflows.- Cached scripts live in
~/.cache/usm/scripts.
Project details
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.1.5.tar.gz.
File metadata
- Download URL: usmo-0.1.5.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3981d2625d785f5fc2f0d46769f6ffe02109ea06b4378249b3eed4a0e2d35e6
|
|
| MD5 |
9caf96a49d961aca53e02c8c5a8360a8
|
|
| BLAKE2b-256 |
e5cd9107e77e251d4ab459fcc3aecc85ae1e90eabde6725ef8427c3a75cb105e
|
File details
Details for the file usmo-0.1.5-py3-none-any.whl.
File metadata
- Download URL: usmo-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24528093e536415cf6f13324840056ecb62f50233ef969a423ac4920afdeecc1
|
|
| MD5 |
bd22cb83f75807b9961bedf7482d4079
|
|
| BLAKE2b-256 |
ef73a1f64140dd9d955a238dea52e734c335c1346f277abeea961461797e25e7
|