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
- Alias Templates: Pre-built alias collections for common tools (git, docker, k8s)
- Template Marketplace: Extensible template system for custom alias collections
- 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 alixLaunch 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 gsNever worry about mistakes! alix keeps a history of your operations so you can easily undo and redo changes:
# Undo the last operation
alix undo
# Redo the last undone operation
alix redo
# List undo history (most recent last)
alix list-undo
# List redo history (most recent last)
alix list-redoExamples:
# Add an alias
alix add -n "test" -c "echo hello"
# Oops! Let's undo that
alix undo
# β
Undid add (1 alias removed)
# Changed my mind, let's redo it
alix redo
# π Redid add (1 alias added)
# Delete a group of aliases
alix group delete docker
# Undo the group removal
alix undo
# β
Undid group_delete (2 aliases processed)
# View what operations can be undone
alix list-undo
# π Undo History (most recent last):
# Use 'alix undo --id <number>' to undo a specific operation
# 1. πβ GROUP_ADD deploy
# at 2025-10-10 23:00:40
# 2. πβ GROUP_ADD test1
# at 2025-10-10 23:00:49
# 3. πβ GROUP_ADD test2
# at 2025-10-10 23:00:51
# 4. πβ GROUP_ADD test1
# at 2025-10-10 23:02:11
# 5. πβ GROUP_ADD test1
# at 2025-10-10 23:03:41
# 6. πβ GROUP_ADD test1
# at 2025-10-10 23:03:58
# 7. πβ GROUP_ADD deploy
# at 2025-10-11 16:39:44
# 8. πβ GROUP_ADD test1
# at 2025-10-11 16:39:51
# 9. πβ GROUP_ADD test2
# at 2025-10-11 16:39:56
# 10. β ADD alix-test-echo
# at 2025-10-11 16:49:55
# 11. β REMOVE alix-test-echo
# at 2025-10-11 16:49:55
# 12. β ADD alix-test-echo
# at 2025-10-11 16:51:16
# π‘ Tip: Use 'alix undo --id 1' for most recent, 'alix undo --id 20' for oldest
# View what operations can be redone
alix list-redo
# π Redo History (most recent last):
# Use 'alix redo --id <number>' to redo a specific operation
# 1. πβοΈ GROUP_DELETE test2, test1
# at 2025-10-11 17:02:50
# π‘ Tip: Use 'alix redo --id 1' for most recent, 'alix redo --id 1' for oldestFeatures:
- β Clean emoji formatting: Consistent, properly formatted messages with emojis
- π Full operation history: Track add, remove, and remove_group operations
- β‘ Quick navigation: Easily move back and forth through history
- πΎ Persistent storage: History survives between sessions
- π‘οΈ Safe operations: Automatic backups before every change
# 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 ~/.zshrcApply 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 restartThen reload your shell:
# For bash
source ~/.bashrc
# For zsh
source ~/.zshrc
# For fish
source ~/.config/fish/config.fishEnable 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.jsonQuickly import pre-built alias collections for common development tools:
# List available templates
alix templates list
# Import git aliases
alix templates add git
# Preview docker aliases before importing
alix templates add docker --dry-run
# Import specific aliases from kubernetes template
alix templates add k8s --aliases kgp,kgs,klog
# Import entire category (all templates in a category)
alix templates add-category docker
# Apply imported aliases to your shell
alix applyAvailable Templates:
- Git: Version control shortcuts (gs, ga, gc, gp, gl, gb, gco, gd)
- Docker: Container management (di, dc, dca, dr, db, de, dl, drm)
- Kubernetes: Cluster management (k, kgp, kgs, kgd, kgn, kl, kd, kctx)
Custom Templates:
Users can add their own templates by creating YAML files in alix/templates/:
version: "1.0"
category: "python"
description: "Python development aliases"
aliases:
- name: "py"
command: "python"
description: "Run Python interpreter"
tags: ["python", "dev"]
- name: "pipi"
command: "pip install"
description: "Install Python packages"
tags: ["python", "pip"]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.shAnalytics 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=1Add 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/ -valix-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" ~/.bashrcIssue: TUI colors not displaying correctly
# Set proper terminal encoding
export TERM=xterm-256color
export LC_ALL=en_US.UTF-8Issue: 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