A powerful, htop-style terminal UI for managing shell aliases. Never forget a command again!
- Interactive TUI: Beautiful terminal interface inspired by htop
- Multi-Shell Support: Works with bash, zsh, and fish
- Smart Search: Real-time filtering and searching
- Auto-Backup: Automatic backups before every change
- Import/Export: Share alias collections with your team
- Shell Integration: Apply aliases directly to your shell config
- Usage Tracking & Analytics: Track alias usage with detailed statistics
- Automatic Tracking: Set up automatic usage tracking for all aliases
- Productivity Metrics: See which aliases save you the most time
- Usage History: View detailed usage patterns and trends
- Themes: Multiple color themes (ocean, forest, monochrome)
- Safe Operations: Confirmation prompts for destructive actions
# Using Homebrew to install Python (if needed)
brew install python@3.11
# Clone the repository
git clone https://github.com/TheDevOpsBlueprint/alix-cli.git
cd alix-cli
# Create virtual environment
python3 -m venv alix-venv
source alix-venv/bin/activate
# Install alix
pip install -e .
# Run alix
alix
# Install Python and dependencies
sudo apt update
sudo apt install python3 python3-pip python3-venv
# Clone the repository
git clone https://github.com/TheDevOpsBlueprint/alix-cli.git
cd alix-cli
# Create virtual environment
python3 -m venv alix-venv
source alix-venv/bin/activate
# Install alix
pip install -e .
# Run alix
alix
# Install Python and dependencies
sudo dnf install python3 python3-pip
# Clone the repository
git clone https://github.com/TheDevOpsBlueprint/alix-cli.git
cd alix-cli
# Create virtual environment
python3 -m venv alix-venv
source alix-venv/bin/activate
# Install alix
pip install -e .
# Run alix
alix
# Install Python and dependencies
sudo pacman -S python python-pip
# Clone and install (same as above)
git clone https://github.com/TheDevOpsBlueprint/alix-cli.git
cd alix-cli
python3 -m venv alix-venv
source alix-venv/bin/activate
pip install -e .
alix
# Clone the repository
git clone https://github.com/TheDevOpsBlueprint/alix-cli.git
cd alix-cli
# Install with make
make dev-install # Creates venv and installs everything
make run # Run alix
Launch the interactive TUI by simply running:
alix
Key | Action | Description |
---|---|---|
a |
Add | Add a new alias |
e |
Edit | Edit selected alias |
d |
Delete | Delete selected alias |
/ |
Search | Focus search box |
ESC |
Clear | Clear search |
j /β |
Down | Navigate down |
k /β |
Up | Navigate up |
r |
Refresh | Reload from disk |
q |
Quit | Exit application |
# Interactive add
alix add
# Quick add with flags
alix add -n "gs" -c "git status" -d "Git status shortcut"
# Add complex commands
alix add -n "gpl" -c "git pull origin $(git branch --show-current)" -d "Pull current branch"
# Docker shortcuts
alix add -n "dps" -c "docker ps -a" -d "List all containers"
alix add -n "dex" -c "docker exec -it" -d "Docker exec interactive"
# List all aliases
alix list
# Beautiful table view
alix ls
# Remove an alias
alix remove <name>
# Example
alix remove gs
# Track usage of an alias manually
alix track my-alias --context "working on project"
# View usage history and trends
alix history
# View history for specific alias
alix history --alias my-alias --days 30
# Set up automatic usage tracking
alix setup-tracking
# Create standalone tracking script
alix setup-tracking --standalone --output ~/.alix_tracking.sh
# Set up tracking for specific shell
alix setup-tracking --shell zsh --file ~/.zshrc
Apply your aliases to your shell configuration:
# Detect and apply to current shell
alix apply
# Apply to specific config file
alix apply --target ~/.zshrc
# Apply with preview what can be changed
alix apply --target ~/.zshrc --dry-run
# The command will:
# 1. Backup your current config
# 2. Add managed aliases section
# 3. Make them available after restart
Then reload your shell:
# For bash
source ~/.bashrc
# For zsh
source ~/.zshrc
# For fish
source ~/.config/fish/config.fish
Enable command completions for alix
(bash, zsh, fish):
# Preview / generate the script
alix completion bash > ~/.config/alix/completions/alix.bash
alix completion zsh > ~/.config/alix/completions/alix.zsh
alix completion fish > ~/.config/fish/completions/alix.fish
# One-shot install for your current shell (auto-detects)
alix completion --install
# Or during apply
alix apply --install-completions
# Manual sourcing (bash/zsh) if needed
echo 'source ~/.config/alix/completions/alix.bash' >> ~/.bashrc # bash
echo 'source ~/.config/alix/completions/alix.zsh' >> ~/.zshrc # zsh
# Fish autoloads from ~/.config/fish/completions/
After installation, restart your terminal or source your shell config to enable completions.
Share your alias collections:
# Export to JSON
alix export --output my-aliases.json
# Export to YAML
alix export --output my-aliases.yaml --format yaml
# Import aliases (merge with existing)
alix import my-aliases.json --merge
# Import without merging (skip duplicates)
alix import team-aliases.json
Track your alias usage and productivity gains with comprehensive analytics:
# View comprehensive statistics
alix stats
# View detailed analytics with usage patterns
alix stats --detailed
# Export analytics data for analysis
alix stats --export analytics.json
# Manually track usage of an alias
alix track my-alias --context "working on project"
# View usage history and trends
alix history
# View history for specific alias
alix history --alias my-alias
# Set up automatic usage tracking
alix setup-tracking
# Create standalone tracking script
alix setup-tracking --standalone --output ~/.alix_tracking.sh
Analytics Features:
- Usage Frequency: Track how often each alias is used
- Productivity Metrics: See which aliases save the most keystrokes
- Usage Patterns: View daily, weekly, and monthly usage trends
- Unused Aliases: Identify aliases that are never used
- Recently Used: See which aliases you've used recently
- Context Tracking: Track usage context (working directory, etc.)
- Export/Import: Share analytics data across systems
Example Output:
π Alias Statistics & Analytics
Total Aliases: 15
Total Uses: 1,247
Characters Saved: ~3,450 keystrokes
Average Usage per Alias: 83.1
Most Used: ll (156 times)
Unused Aliases: 2
Recently Used (7 days): 8
π Detailed Usage Analytics
β οΈ Unused Aliases (2):
β’ old-alias
β’ unused-command
π₯ Recently Used (7 days):
β’ ll - 23 uses
β’ gst - 15 uses
πͺ Most Productive Aliases:
Rank Alias Chars Saved Usage Count
1. gst saves 7 156
2. ll saves 4 89
Manage alix settings:
# Show current config
alix config
# Change theme
alix config --theme ocean
# Available themes:
# - default (cyan/blue)
# - ocean (blue tones)
# - forest (green tones)
# - monochrome (black & white)
# Toggle settings
alix config --auto-backup true
alix config --confirm-delete false
# Kubernetes shortcuts
alix add -n "k" -c "kubectl" -d "Kubectl shortcut"
alix add -n "kgp" -c "kubectl get pods" -d "Get pods"
alix add -n "kgs" -c "kubectl get services" -d "Get services"
alix add -n "kaf" -c "kubectl apply -f" -d "Apply file"
alix add -n "kdel" -c "kubectl delete" -d "Delete resource"
alix add -n "klog" -c "kubectl logs -f" -d "Follow logs"
# Docker shortcuts
alix add -n "dcu" -c "docker-compose up -d" -d "Compose up detached"
alix add -n "dcd" -c "docker-compose down" -d "Compose down"
alix add -n "dcl" -c "docker-compose logs -f" -d "Compose logs"
alix add -n "dprune" -c "docker system prune -af" -d "Clean docker system"
# Terraform shortcuts
alix add -n "tf" -c "terraform" -d "Terraform shortcut"
alix add -n "tfi" -c "terraform init" -d "Terraform init"
alix add -n "tfp" -c "terraform plan" -d "Terraform plan"
alix add -n "tfa" -c "terraform apply -auto-approve" -d "Terraform apply"
# Git shortcuts
alix add -n "gs" -c "git status" -d "Git status"
alix add -n "ga" -c "git add ." -d "Stage all changes"
alix add -n "gc" -c "git commit -m" -d "Git commit"
alix add -n "gp" -c "git push" -d "Git push"
alix add -n "gpl" -c "git pull" -d "Git pull"
alix add -n "gco" -c "git checkout" -d "Git checkout"
alix add -n "gcb" -c "git checkout -b" -d "Create new branch"
alix add -n "glog" -c "git log --oneline --graph --decorate" -d "Pretty git log"
alix add -n "gdiff" -c "git diff --staged" -d "Show staged changes"
# System monitoring
alix add -n "ports" -c "sudo lsof -i -P -n | grep LISTEN" -d "List listening ports"
alix add -n "myip" -c "curl -s ifconfig.me" -d "Get public IP"
alix add -n "diskspace" -c "df -h | grep -E '^/dev/'" -d "Check disk space"
alix add -n "meminfo" -c "free -h" -d "Memory information"
alix add -n "cpuinfo" -c "lscpu | grep -E 'Model name|Socket|Core'" -d "CPU information"
# Network utilities
alix add -n "flushdns" -c "sudo systemd-resolve --flush-caches" -d "Flush DNS cache"
alix add -n "listening" -c "netstat -tuln" -d "Show listening ports"
alix add -n "connections" -c "ss -tunap" -d "Show network connections"
Alix stores data in your home directory:
~/.alix/
βββ aliases.json # Main alias storage
βββ config.json # Configuration settings
βββ backups/ # Automatic backups
βββ aliases_20250117_103000.json
βββ aliases_20250117_143000.json
{
"gs": {
"name": "gs",
"command": "git status",
"description": "Git status shortcut",
"tags": ["git", "vcs"],
"created_at": "2025-01-17T10:30:00",
"used_count": 42,
"shell": "zsh"
}
}
Alix automatically detects your shell and modifies the appropriate config file:
Shell | Config Files (in priority order) |
---|---|
Bash | .bash_aliases , .bashrc , .bash_profile |
Zsh | .zsh_aliases , .zshrc |
Fish | .config/fish/config.fish |
# Custom storage location (optional)
export ALIX_HOME=/custom/path
# Disable colored output
export NO_COLOR=1
Add to your shell config for quick access:
# Quick shortcuts
alias a='alix'
alias aa='alix add'
alias al='alix list'
alias as='alix stats'
# Clone repository
git clone https://github.com/TheDevOpsBlueprint/alix-cli.git
cd alix-cli
# Using make (recommended)
make dev-install
make test
# Or manually
python3 -m venv alix-venv
source alix-venv/bin/activate
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
alix-cli/
βββ alix/
β βββ __init__.py
β βββ cli.py # CLI commands
β βββ tui.py # Terminal UI
β βββ models.py # Data models
β βββ storage.py # Storage backend
β βββ config.py # Configuration
β βββ shell_integrator.py # Shell integration
β βββ shell_detector.py # Shell detection
β βββ porter.py # Import/export
β βββ render.py # CLI UI templates
βββ tests/
β βββ test_cli.py
β βββ test_models.py
β βββ test_storage.py
βββ Makefile
βββ pyproject.toml
βββ CONTRIBUTING.md
βββ README.md
We follow strict PR guidelines for quality:
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Keep PRs small - Maximum 80 lines per PR
- Test your changes
- Submit Pull Request
See CONTRIBUTING.md for detailed guidelines.
Issue: alix: command not found
# Ensure virtual environment is activated
source alix-venv/bin/activate
# Or add to PATH
export PATH="$HOME/alix-cli/alix-venv/bin:$PATH"
Issue: Aliases not appearing in shell
# After running 'alix apply', reload your shell
source ~/.bashrc # or ~/.zshrc
# Check if aliases section exists
grep "ALIX MANAGED" ~/.bashrc
Issue: TUI colors not displaying correctly
# Set proper terminal encoding
export TERM=xterm-256color
export LC_ALL=en_US.UTF-8
Issue: Permission denied errors
# Fix permissions
chmod 755 ~/.alix
chmod 644 ~/.alix/aliases.json
- Instant startup: < 50ms to launch TUI
- Efficient storage: JSON format for fast read/write
- Smart backups: Only keeps last 10 backups
- Lightweight: ~200KB total footprint
- No cloud sync: All data stored locally
- Safe operations: Automatic backups before changes
- Shell injection protection: Commands are properly escaped
- Confirmation prompts: For destructive operations
MIT License - see LICENSE file for details.
Built with:
- Click - CLI framework
- Rich - Beautiful terminal formatting
- Textual - Terminal UI framework
- Python - Programming language
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: valentin.v.todorov@gmail.com
Made with β€οΈ by TheDevOpsBlueprint | β Star us on GitHub