alman - Intelligent Alias Manager
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.
🚀 Installation
Universal Install Script
The easiest way to install alman on any system:
|
This script will automatically detect your system and install the appropriate binary.
[!IMPORTANT] 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).
From Cargo
From AUR (Arch Linux)
Using yay:
Using paru:
From Source
⚙️ Shell Configuration
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.
Bash
Add this line to your ~/.bashrc:
Then reload your configuration:
Zsh
Add this line to your ~/.zshrc:
Then reload your configuration:
Fish
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!
📋 Table of Contents
- Installation
- Shell Configuration
- Quick Start
- Interactive Mode
- Command Line Usage
- Usage Examples
- Advanced Usage
- TUI Navigation
- Command Line Options
- Output Format
- Use Cases
- Uninstallation
- License
🚀 Quick Start
Interactive Mode
Launch the interactive alias manager:
# or
Navigate with arrow keys or jk, select aliases, and manage them interactively.
Command Line Mode
Add, remove, list, and get suggestions for aliases directly from the command line:
# Add an alias
# Remove an alias
# List all aliases
# Get alias suggestions
🖥️ Interactive Mode
The Terminal User Interface (TUI) provides an intuitive way to browse, add, remove, and change aliases:
Navigation
- Arrow keys or jk: Move cursor
- Enter: Select
- a: Add alias
- r: Remove alias
- l: List aliases
- q or Ctrl+C: Quit
TUI Features
- Visual selection: Selected items are highlighted
- Alias suggestions: Get smart suggestions based on your command history
- Multi-file support: Manage aliases across multiple files
💻 Command Line Usage
Basic Commands
# Add a new alias
# Remove an alias
# List all aliases
# Get intelligent suggestions
📝 Usage Examples
Basic Usage
# Add a new alias
# Remove an alias
# List all aliases
# Get intelligent suggestions
Advanced Usage
# Change an alias name (keeps the same command)
# Delete suggestions for an alias
# Use a specific alias file
[!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.
🔧 Advanced Usage
Multi-file Management
# Add alias to a specific file
# List aliases from a specific file
Suggestion Management
# Get more suggestions
# Delete a specific suggestion
🎮 TUI Navigation
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!
Key Bindings
- Arrow keys or jk: Navigate through aliases
- Enter: Select an alias or action
- a: Add a new alias
- r: Remove selected alias
- l: List all aliases
- q or Ctrl+C: Exit the interface
Features
- Visual feedback: Selected items are highlighted
- Smart suggestions: Get intelligent alias suggestions
- Multi-file support: Manage aliases across different files
⚙️ Command Line Options
Output Options
-c, --command <COMMAND>: Command to associate with the alias (foraddandchange)-n, --num <N>: Number of suggestions to display (forget-suggestions)--alias-file-path <PATH>: Path to the alias file to use
Examples
# Add an alias to a specific file
# Get 10 suggestions
📊 Output Format
Alman displays aliases in a clear, tabular format:
┌─────────┬───────────────┐
│ ALIAS │ COMMAND │
├─────────┼───────────────┤
│ gs │ git status │
│ ll │ ls -la │
└─────────┴───────────────┘
🎯 Use Cases
Perfect for managing your shell aliases, discovering new shortcuts, and keeping your workflow efficient:
# Quick alias management
# Add and remove aliases on the fly
# Get suggestions for new aliases
[!TIP] Try the interactive TUI mode (
alman tui) for the most intuitive alias management experience!
🗑️ Uninstallation
To uninstall alman, you can run the command:
|
Or download and run the uninstall script manually:
[!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)
📄 License
MIT License - see LICENSE file for details.