Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✨ Aliasx

logo

CI License: AGPL-3.0 Release

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.

Features

  • 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

Quick Install

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/ax

Optional: load aliasx automatically in future shells:

printf '\n# aliasx\n[ -f "$HOME/.local/bin/ax" ] && source "$HOME/.local/bin/ax"\n' >> ~/.bashrc
source ~/.bashrc

Now you can run bundled commands directly:

root
name
now
year
sec
rand
weather

Development Install

Clone the repository if you want to customize, extend, or build your own command bundle:

git clone https://github.com/comstrx/aliasx.git
cd aliasx

Add your own commands under:

src/mod/

Then rebuild and reinstall:

bash src/main.sh test --check
bash src/main.sh install

Usage

bash 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 release

Tests

Tests are discovered from functions that either:

  1. Start with test_
test_example () {
    assert_eq "1" "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_.

Assertions

Basic assertions are available:

assert_eq "actual" "expected"
assert_ne "actual" "unexpected"

CI

The project uses GitHub Actions:

- name: Run test
  run: bash src/main.sh test --check

Requirements

  • Bash 4+
  • ShellCheck

Optional modules may require extra tools depending on the command used.

Why aliasx?

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.

Philosophy

  • One file.
  • Many commands.
  • Zero drama.

Contributing

This project is intentionally small and practical.

If you want to extend it:

  1. Add shared helpers under src/core/
  2. Add commands under src/mod/
  3. Add tests under tests/
  4. Run:
bash src/main.sh test --check

License

See LICENSE. Commercial usage outside the license terms requires written permission.

About

A lightweight Bash aliases framework for building, testing, installing, and releasing self-contained shell command bundles.

Topics

Resources

Security policy

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages