A lightweight CLI tool to manage your shell aliases
# Install
brew install kazetachinuu/alias-manager/alias-manager # macOS/Linux
yay -S alias-manager # Arch Linux
# Setup
am init
source ~/.bashrc # or ~/.zshrc
# Use
am add gc "git commit -m"
eval "$(am reload)"
gc "my first commit"brew install kazetachinuu/alias-manager/alias-manageryay -S alias-managerwget https://github.com/kazetachinuu/alias_manager/releases/latest/download/alias-manager_2.3.1_amd64.deb
sudo dpkg -i alias-manager_2.3.1_amd64.debwget https://github.com/kazetachinuu/alias_manager/releases/latest/download/alias-manager-2.3.1-linux-amd64.tar.gz
tar -xzf alias-manager-2.3.1-linux-amd64.tar.gz
sudo install -m 755 am /usr/local/bin/amgit clone https://github.com/kazetachinuu/alias_manager.git
cd alias_manager
make && sudo make install| Command | Description |
|---|---|
am init |
Setup shell integration |
am add <name> <cmd> |
Add or update an alias |
am rm <name> [-f] |
Remove an alias |
am ls [pattern] |
List aliases (optionally filter) |
am reload |
Output reload command: eval "$(am reload)" |
am path |
Show alias file location |
Tip: Create a reload shortcut: am add amr 'eval "$(am reload)"'
# Git
am add gs "git status"
am add gc "git commit -m"
am add gp "git push"
# System
am add update "sudo apt update && sudo apt upgrade -y"
am add myip "curl -s ifconfig.me"
# Navigation
am add projects "cd ~/projects"Aliases are stored at ~/.config/am/aliases.txt (XDG-compliant).
Override with:
export AM_ALIAS_FILE="$HOME/my-aliases.txt"