2 releases
| 0.3.5 | Jan 21, 2026 |
|---|---|
| 0.3.4 | Oct 25, 2024 |
#46 in #cli-automation
91KB
1.5K
SLoC
bx
DEPRECATION NOTICE: The
codemonument_bxcrate has been renamed tobx-cli. Please update your installation:cargo install bx-cli
Simple, cross-platform, and fast command aliases with superpowers.
A fork of Bonnie with a shorter command name.
Why "bx"?
- Short: Only 2 characters to type (vs 6 for "bonnie")
- Unique: Fairly unused command name in the Linux world
- Meaningful: Can stand for "bonnie execute" or "Benny execute"
Features
- Simple key-value aliasing
- Custom arguments interpolation
- Environment variable interpolation
- Different commands on different operating systems
- Custom shells for individual commands
- Infinitely nestable subcommands
- Subcommands executed based on exit codes
- Caching for large config files
- Config file templates
- Debug mode
Quick Start
The simplest bx.toml (or bonnie.toml) configuration:
version = "0.3.2"
[scripts]
build = "echo Building"
test = "cargo test"
Run with:
bx build
bx test
Installation
From Cargo
cargo install bx-cli
From Releases
Download pre-built binaries from the releases page for:
- Linux (amd64)
- macOS (amd64, arm64)
- Windows (amd64)
- musl (Alpine Linux)
After downloading, move the binary to your PATH (e.g., /usr/local/bin on Linux/macOS) and make it executable:
chmod +x bx
sudo mv bx /usr/local/bin/
In Docker
RUN curl -L https://github.com/codemonument/bx/releases/download/[VERSION]/bx-[OS]-amd64 -o /usr/local/bin/bx && chmod +x /usr/local/bin/bx
Replace [VERSION] with the version (e.g., v0.3.4) and [OS] with linux or musl.
Configuration
bx looks for configuration in this order:
BX_CONFenvironment variablebx.tomlin current directoryBONNIE_CONFenvironment variablebonnie.tomlin current directory
Documentation
For full documentation on all features (subcommands, environment variables, shells, etc.), see the Bonnie documentation.
License
MIT - See LICENSE
Credits
Based on Bonnie by arctic_hen7.
Dependencies
~2.8–7MB
~127K SLoC