| Crates.io | supi-cli |
| lib.rs | supi-cli |
| version | 1.0.1 |
| created_at | 2025-10-24 23:07:45.902329+00 |
| updated_at | 2025-10-25 00:52:25.331138+00 |
| description | A simple process supervisor for spawning, restarting and stopping arbitrary commands |
| homepage | https://github.com/bjesuiter/supi-cli |
| repository | https://github.com/bjesuiter/supi-cli |
| max_upload_size | |
| id | 1899448 |
| size | 159,023 |
A lightweight CLI tool for supervising and managing arbitrary processes with easy restart capabilities.
supi is a simple process supervisor that spawns and manages child processes.
It allows you to restart processes on-demand using hotkeys or Unix signals,
making it ideal for development workflows where you need to frequently restart
services.
I made myself a zellij (a rust terminal multiplexer, like
tmux) layout with various panels but most importantly with a panel on the left
for a npm run build:app && npm run dev command. This command builds the app
and then starts the development server. I wanted to be able to restart the
development server with a hotkey or signal. Since the app is really big with a
lot of components, I don't want to rebuild the app everytime I make a change. If
you look for this behavior, you might enjoy
watchexec-cli.
SIGUSR1 (default) - Restarts the child processr key (default) to restart the child process--stop-on-child-exit# Basic usage
supi <command> [args...]
# Example: Run a development server
supi npm run dev
# Example: Run a Rust application
supi cargo run
# Stop supi when child exits
supi --stop-on-child-exit ./my-script.sh
--stop-on-child-exitDefault: false
When enabled, supi will exit if the child process exits. When disabled (default), supi continues running and you can restart the process using the restart signal or hotkey.
supi --stop-on-child-exit npm start
--restart-signal <SIGNAL>Default: SIGUSR1
Specifies which Unix signal should trigger a process restart.
supi --restart-signal SIGUSR2 ./my-app
--restart-hotkey <KEY>Default: r
Specifies which key should trigger a process restart when pressed. Only works when the terminal running supi is focused.
supi --restart-hotkey R ./my-app
--restart-debounce-ms <MILLISECONDS>Default: 1000 (1 second)
Sets the debounce time for restart requests in milliseconds. This prevents
accidental rapid restarts from multiple hotkey presses or signals. Set to 0 to
disable debouncing.
# Prevent restarts within 3 seconds of each other
supi --restart-debounce-ms 3000 npm run dev
# Disable debouncing (allow instant restarts)
supi --restart-debounce-ms 0 ./my-app
--log-color <COLOR>Default: yellow
Sets the color for supervisor log messages. Supported colors: yellow, red,
green, blue, cyan, magenta, white, none.
supi --log-color cyan npm run dev
--info-color <COLOR>Default: green
Sets the color for informational messages (like hotkey prompts). Supported
colors: yellow, red, green, blue, cyan, magenta, white, none.
supi --info-color blue npm run dev
--silentDefault: false
Suppresses all supervisor output. Child process output remains visible. Useful when you want to see only the output from your managed process.
supi --silent npm run dev
# Start your dev server, press 'r' to restart anytime
supi npm run dev
# Exit when the main process exits
supi --stop-on-child-exit ./production-app
# Use SIGUSR2 for restart
supi --restart-signal SIGUSR2 python app.py
# In another terminal, send restart signal
kill -SIGUSR2 $(pgrep -f "supi python")
cargo install --locked supi-cli
git clone https://github.com/bjesuiter/supi-cli
cd supi-cli
cargo install --path .
Pre-built binaries might be provided later for:
aarch64-apple-darwin - Apple Silicon macOSx86_64-unknown-linux-gnu - Linux with glibcx86_64-unknown-linux-musl - Linux static binary (portable)Right now the main way to get supi is to install it from crates.io.
Licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Update version in Cargo.toml:
version = "0.3.0" # Bump from 0.2.0
Update CHANGELOG.md with changes in the new version
Test everything:
cargo clean
cargo build --release
cargo test --release
cargo package --list # Check included files
cargo publish --dry-run # Test publication
Commit changes:
git add Cargo.toml CHANGELOG.md
git commit -m "Bump version to 0.3.0"
git push
Publish to crates.io:
cargo publish
Tag the release:
git tag v0.3.0
git push origin v0.3.0
Verify installation:
cargo install --locked supi-cli --force
supi --version
--locked for reproducible buildsThis repository uses bonnie/bx cli as a
task runner. bx is a custom fork of bonnie with a shorter CLI name for
convenience.
See bonnie.toml for all available commands.
The following features and enhancements are being considered for future releases:
Add an optional interactive mode that allows switching between normal mode (hotkeys active) and insert mode (stdin forwarded to child):
Use cases:
An optional terminal UI mode (--tui flag) for enhanced monitoring:
This would be opt-in, preserving the simple passthrough behavior by default.
Features that might be explored much later: