aliasx is a small Bash-based command framework for running a self-contained shell command bundle.
It is designed to turn a modular Bash codebase into one executable CLI file.
- Build dev and release bundles
- Run bundled commands
- Install the CLI into
~/.local/bin - Source installed commands into the current shell
- Lightweight test discovery
- Optional ShellCheck validation
- Project sync / backup / repo helpers through modules
- Simple modular layout
Install the latest release bundle as ax:
curl -fsSL https://github.com/comstrx/aliasx/releases/latest/download/ax.sh -o ~/.local/bin/ax
chmod +x ~/.local/bin/axOptional: load aliasx automatically in future shells:
printf '\n# aliasx\n[ -f "$HOME/.local/bin/ax" ] && source "$HOME/.local/bin/ax"\n' >> ~/.bashrc
source ~/.bashrcNow you can run bundled commands directly:
root
name
now
year
sec
rand
weatherClone the repository if you want to customize, extend, or build your own command bundle:
git clone https://github.com/comstrx/aliasx.git
cd aliasxAdd your own commands under:
src/mod/Then rebuild and reinstall:
bash src/main.sh test --check
bash src/main.sh installbash src/main.sh build # Build dev bundle into target/dev
bash src/main.sh build-release # Build release bundle into target/release
bash src/main.sh check # Run bash -n and ShellCheck on the final bundle
bash src/main.sh test # Run tests from the dev bundle
bash src/main.sh run CMD # Run a bundled command
bash src/main.sh install # Install release bundle into ~/.local/bin
bash src/main.sh release # Build and publish a GitHub releaseTests are discovered from functions that either:
- Start with
test_
test_example () {
assert_eq "1" "1"
}- Or are marked with one of:
# test
# [test]Example:
# test
hello_world () {
assert_eq "Done" "Done"
}To exclude a test, use:
# no-test
# [no-test]This exclusion wins even if the function starts with test_.
Basic assertions are available:
assert_eq "actual" "expected"
assert_ne "actual" "unexpected"The project uses GitHub Actions:
- name: Run test
run: bash src/main.sh test --check- Bash 4+
- ShellCheck
Optional modules may require extra tools depending on the command used.
Bash aliases are fast, but hard to structure.
Shell scripts are powerful, but annoying to bundle.
aliasx gives you a tiny framework to build, test, release, and install one portable CLI from modular shell files.
- One file.
- Many commands.
- Zero drama.
This project is intentionally small and practical.
If you want to extend it:
- Add shared helpers under
src/core/ - Add commands under
src/mod/ - Add tests under
tests/ - Run:
bash src/main.sh test --checkSee LICENSE. Commercial usage outside the license terms requires written permission.
