| Crates.io | alx |
| lib.rs | alx |
| version | 0.4.0 |
| created_at | 2025-11-11 06:36:49.803808+00 |
| updated_at | 2025-11-17 23:59:28.140599+00 |
| description | Setup simple alias manager |
| homepage | https://github.com/hiro08gh/alx |
| repository | https://github.com/hiro08gh/alx |
| max_upload_size | |
| id | 1926772 |
| size | 294,988 |
A simple alias manager for multiple shells written in Rust.
Using Cargo install:
cargo install alx
alx init
Choose your shell.
Initialized alx configuration at: "/your_alx_path/alx"
Select your shell:
> zsh (default)
bash
fis
Choose whether to write the 'alx' alias configuration to your shell file. The default is No.
To enable aliases, add the following line to your shell config:
# Add to '/your/.zshrc'
[ -f '/your_alx_path/alx/shell/aliases.sh' ] && source '/your_alx_path/alx/shell/aliases.sh'
Do you want to add this line to '/your/.zshrc' automatically? [y/N]
See below for manual setup.
# Bash (`~/.bashrc`):
[ -f ~/your_alx_path/aliases.sh ] && source ~/your_alx_path/aliases.sh
# Zsh (`~/.zshrc`):
[ -f ~/your_alias_path/aliases.sh ] && source ~/your_alias_path/aliases.sh
# Fish (`~/.config/fish/config.fish`):
source ~/your_alias_path/aliases.sh
Initialization automatically creates the following structure in the alx directory.
~/your_alx_path/alx/
├── config.toml # Main configuration
├── aliases.toml # Aliases database
├── shell/
│ └── aliases.sh # Generated shell aliases
└── backups/ # Backup directory
alx info
alx add <name> <command> [--description] [--group]
# example
alx add ll "ls -la" --description "List all files" --group general
alx add gs "git status" --group git
alx list [--group]
# List all aliases
alx list
# List aliases in a specific group
alx list --group git
alx search git
alx edit <name> [--command] [--description] [--group]
# example
alx edit ll --command "ls -lah"
alx edit gs --description "Check git status"
alx remove <name>
# example
alx remove ll gs
This is useful for migrating external files or registering aliases in bulk.
# Export to JSON
alx export --output aliases.json --format json
# Export to TOML
alx export --output aliases.toml --format toml
# Import from fi
alx import aliases.json
alx groups
You can automatically apply settings from your current Bash shell configuration to alx.
Run the alx migrate command. This command targets files such as .bashrc, .zshrc, and config.fish, specifically focusing on alias (ex: alias gs="git status") definitions within those files.
# Initialize alx
alx init
# Migrate your target shell
alx migrate or alx migrate --from "./.bashrc"
# Check if the aliases are applied correctly
alx list
Remove the aliases from the shell settings, if there are no issues.
cargo build
cargo test
cargo run -- <command>
MIT License.© hiro08gh