Hey everyone,
I built alman (alias manager) a command-line tool and TUI designed to make alias management easier, by using a cool algorithm to detect commands in your terminal workflow which could benefit from having an alias, and then intelligently suggesting an alias for that command, thereby saving you time and keystrokes.
Here is the github : https://github.com/vaibhav-mattoo/alman
Alman ranking algorithm
Alman ranks your commands based on:
- Length: Longer commands get a slight boost (using length^(3/5) to avoid bias).
- Frequency: Commands you use often score higher.
- Last use time: Recent commands get a multiplier (e.g., 4x for <1 hour, 2x for <1 day, 0.5x for <1 week, 0.25x for older).
This ensures the most useful commands are prioritized for alias creation. It then generates intelligent alias suggestions using schemes like:
- Vowel Removal: git status → gst
- Abbreviation: ls -la → ll
- First Letter Combination: docker compose → dcompose
- Smart Truncation: git checkout → gco
- Prefix Matching: git commands → g + subcommand letter
Some of its features are:
- Interactive aliases for browsing adding and removing aliases.
- Ability to track your aliases across multiple shells and multiple alias files.
- Command-line mode for quick alias operations.
- Cross-platform: Works on Linux, macOS, BSD, and Windows (via WSL).
Alman offers an installation script that works on any platform for easy setup and is also available through cargo, yay, etc.
Try it out and streamline your workflow. I’d really appreciate any feedback or suggestions, and if you find it helpful, feel free to check it out and star the repo.
submitted by /u/YboMa2
[link] [comments]