KU
KurtWeston/alias-suggest
Analyze your shell history to automatically suggest useful aliases for frequently typed commands
alias-suggest
Analyze your shell history to automatically suggest useful aliases for frequently typed commands
Features
- Parse bash history (
/.bash_history) and zsh history (/.zsh_history) files - Calculate command frequency and identify top repeated commands
- Detect long commands (configurable threshold, default 30+ chars) worth aliasing
- Score alias candidates based on frequency, length, and complexity
- Generate smart alias names using command keywords and common abbreviations
- Filter out commands with sensitive data (passwords, tokens, API keys)
- Show before/after comparison with estimated keystrokes saved
- Export aliases to stdout in shell-compatible format
- Support --min-frequency flag to filter suggestions
- Support --min-length flag to only suggest aliases for long commands
- Interactive mode to review and select which aliases to export
- Append mode to add suggestions directly to ~/.bashrc or ~/.zshrc
- Dry-run mode to preview suggestions without modifying files
How to Use
Use this project when you need to:
- Quickly solve problems related to alias-suggest
- Integrate python functionality into your workflow
- Learn how python handles common patterns with click
Installation
# Clone the repository
git clone https://github.com/KurtWeston/alias-suggest.git
cd alias-suggest
# Install dependencies
pip install -r requirements.txtUsage
python main.pyBuilt With
- python using click
Dependencies
click>=8.0.0pytest>=7.0.0pytest-cov>=4.0.0
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
On this page
Languages
Python100.0%
Contributors
Latest Release
v1.0.0January 22, 2026MIT License
Created January 22, 2026
Updated January 22, 2026