| Crates.io | alman |
| lib.rs | alman |
| version | 0.1.2 |
| created_at | 2025-07-12 06:48:39.552746+00 |
| updated_at | 2025-07-13 20:41:46.183167+00 |
| description | A command-line tool and TUI for managing shell aliases with intelligent suggestions |
| homepage | https://github.com/vaibhav-mattoo/alman |
| repository | https://github.com/vaibhav-mattoo/alman |
| max_upload_size | |
| id | 1749037 |
| size | 254,681 |
A command-line tool and TUI for managing shell aliases with intelligent suggestions based on your command history. Alman helps you organize, create, and manage aliases across multiple files and shells, making your workflow faster and smarter.
Watch alman in action! See how it can transform your command-line workflow with intelligent alias suggestions and intuitive management.
https://github.com/user-attachments/assets/53ae73cf-15ff-4f9e-af31-51ac2b4f3c5e
[!IMPORTANT] Shell Configuration Required: After installation, you must add the shell configuration line to your shell config file (check with
which $SHELL) or the app will not work. See the Shell Configuration section below for detailed instructions.
The easiest way to install alman on any system:
curl -sSfL https://raw.githubusercontent.com/vaibhav-mattoo/alman/main/install.sh | sh
This script will automatically detect your system and install the appropriate binary.
[!NOTE] Remember to add
~/.local/binto your$PATHif prompted by the install script, by addingexport PATH="$HOME/.local/bin:$PATH"in the end of your shell config (~/.bashrc, ~/.zshrc etc).
cargo install alman
Using yay:
yay -S alman
Using paru:
paru -S alman
git clone https://github.com/vaibhav-mattoo/alman.git
cd alman
cargo install --path .
After installation, you need to configure your shell to use alman. The installer will detect your shell and provide specific instructions, but here are the general steps:
[!NOTE] The installer will automatically detect your shell and show you the exact configuration line to add to your shell config file.
Add this line to your ~/.bashrc:
eval "$(alman init bash)"
Then reload your configuration:
source ~/.bashrc
Add this line to your ~/.zshrc:
eval "$(alman init zsh)"
Then reload your configuration:
source ~/.zshrc
Add this line to your ~/.config/fish/config.fish:
alman init fish | source
Then reload your configuration:
source ~/.config/fish/config.fish
[!TIP] Alman automatically initializes with your shell history when first run, so you'll have intelligent suggestions right from the start!
Launch the interactive alias manager:
alman
# or
alman tui
Navigate with arrow keys or jk, select aliases, and manage them interactively.
Add, remove, list, and get suggestions for aliases directly from the command line:
# Add an alias
alman add -c "git status" gs
# Remove an alias
alman remove gs
# List all aliases
alman list
# Get alias suggestions
alman get-suggestions -n 10
The Terminal User Interface (TUI) provides an intuitive way to browse, add, remove, and change aliases:
# Add a new alias
alman add -c "ls -la" ll
# Remove an alias
alman remove ll
# List all aliases
alman list
# Get intelligent suggestions
alman get-suggestions -n 5
# Add a new alias
alman add -c "ls -la" ll
# Remove an alias
alman remove ll
# List all aliases
alman list
# Get intelligent suggestions
alman get-suggestions -n 5
# Change an alias name (keeps the same command)
alman change old-alias new-alias
# Delete suggestions for an alias
alman delete-suggestion gs
# Use a specific alias file
alman --alias-file-path ~/.my-aliases add -c "htop" h
[!IMPORTANT] After running
alman change old newand sourcing your aliases, only the new alias will work. The old alias will be completely removed from all managed alias files.
# Add alias to a specific file
alman --alias-file-path ~/.bash_aliases add -c "ls -lh" lh
# List aliases from a specific file
alman --alias-file-path ~/.zsh_aliases list
# Get more suggestions
alman get-suggestions -n 10
# Delete a specific suggestion
alman delete-suggestion gs
The Terminal User Interface provides an intuitive way to manage aliases:
[!TIP] The TUI mode is perfect for browsing your command history and discovering new alias opportunities!
-c, --command <COMMAND>: Command to associate with the alias (for add and change)-n, --num <N>: Number of suggestions to display (for get-suggestions)--alias-file-path <PATH>: Path to the alias file to use# Add an alias to a specific file
alman --alias-file-path ~/.bash_aliases add -c "ls -lh" lh
# Get 10 suggestions
alman get-suggestions -n 10
Alman displays aliases in a clear, tabular format:
┌─────────┬───────────────┐
│ ALIAS │ COMMAND │
├─────────┼───────────────┤
│ gs │ git status │
│ ll │ ls -la │
└─────────┴───────────────┘
Alman uses a sophisticated scoring algorithm to rank commands based on three key factors:
Score = Time Multiplier × Length^(3/5) × Frequency
[!TIP] The algorithm automatically adapts to your usage patterns, prioritizing commands you use most frequently and recently!
Alman employs multiple intelligent schemes to generate meaningful alias suggestions:
Removes vowels to create shorter, memorable aliases:
git status → gst (removes 'i', 'a', 'u')docker ps → dckr ps (removes 'o', 'e')Creates abbreviations from command words:
git pull → gpls -la → llnpm install → niCombines first letter of first word and rest:
git status → gstatusdocker compose → dcomposesystemctl status → sstatusTruncates long commands intelligently:
git checkout → gcodocker build → dbnpm run dev → nrdSuggests aliases based on common command prefixes:
git commands → g + first letter of subcommanddocker commands → d + first letter of subcommand[!NOTE] Alman evaluates all these schemes and ranks suggestions by their effectiveness and memorability, ensuring you get the most useful aliases first.
Perfect for managing your shell aliases, discovering new shortcuts, and keeping your workflow efficient:
# Quick alias management
alman tui
# Add and remove aliases on the fly
alman add -c "git pull" gp
alman remove gp
# Get suggestions for new aliases
alman get-suggestions -n 5
[!TIP] Try the interactive TUI mode (
alman tui) for the most intuitive alias management experience!
To uninstall alman, you can run the command:
curl -sSfL https://raw.githubusercontent.com/vaibhav-mattoo/alman/main/uninstall.sh | sh
Or download and run the uninstall script manually:
curl -sSfL https://raw.githubusercontent.com/vaibhav-mattoo/alman/main/uninstall.sh -o uninstall.sh
chmod +x uninstall.sh
./uninstall.sh
[!NOTE] After uninstalling, remember to remove the shell configuration lines from your shell config files:
- From
~/.bashrc: Removeeval "$(alman init bash)"- From
~/.zshrc: Removeeval "$(alman init zsh)"- From
~/.config/fish/config.fish: Removeeval (alman init fish)
MIT License - see LICENSE file for details.