Christopher Ferrari

aliasman - Zsh Alias Manager

A Zsh alias manager for Kali Linux CTF setups, providing organization, syntax highlighting, and CLI management for aliases.

Features

Categorizes aliases based on # CTF Aliases and # Other Aliases sections

Truncated or full command preview with smart length management

Syntax-highlighted output using batcat (if installed)

Add, edit, remove, or search aliases directly from terminal

Instant .zshrc reload functionality

Built specifically for Kali Linux CTF environments

Quick Start

bash# Install dependencies (optional)
sudo apt install bat

# Download and setup
curl -L https://raw.githubusercontent.com/Tecttano/kali-utils/main/aliasman/aliasman -o aliasman
chmod +x aliasman

# Add to path (optional)
echo "alias aliasman='$PWD/aliasman'" >> ~/.zshrc
source ~/.zshrc

# Basic usage
aliasman # Default view (truncated)
aliasman --full # Show full commands
aliasman --add myalias # Add new alias

Installation

Quick Install

Download the script:

bashcurl -L https://raw.githubusercontent.com/Tecttano/kali-utils/main/aliasman/aliasman -o aliasman
chmod +x aliasman

Make it globally accessible:

bash# Option 1: Add alias to .zshrc
echo "alias aliasman='$PWD/aliasman'" >> ~/.zshrc
source ~/.zshrc

# Option 2: Move to system path
sudo mv aliasman /usr/local/bin/

Usage Examples

Basic Commands

bashaliasman           # Default view (truncated)
aliasman --full # Show full commands with syntax highlighting
aliasman --length 50 # Custom truncation length

Alias Management

bashaliasman --add myalias      # Add a new alias
aliasman --edit myalias # Edit existing alias
aliasman --rm myalias # Remove an alias
aliasman --search word # Search through aliases
aliasman --reload # Reload .zshrc configuration

Sample Output

Alias Overview:

# CTF Aliases
scripts → cd ~/CTF/scripts
update → sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y
nmap_quick → nmap -sS -O -F --version-intensity 0

# Other Aliases
ll → ls -l
la → ls -A
l → ls -CF

Command Options

OptionDescription
--fullShow full commands (uses batcat if available)
--length NTruncate commands to N characters
--add NAMEAdd a new alias interactively
--edit NAMEEdit an existing alias
--rm NAMERemove an alias
--search WORDSearch aliases containing WORD
--reloadReload .zshrc configuration

Requirements

Zsh shell with .zshrc file

.zshrc must contain # CTF Aliases comment line for categorization

Optional: bat package for enhanced syntax highlighting

Designed specifically for Kali Linux environments

Notes

Aliases under # CTF Aliases in .zshrc are grouped separately from other aliases

The tool expects a specific comment structure in your .zshrc file

Best experience requires batcat installed for proper syntax highlighting

Primarily designed for CTF and penetration testing workflows

Troubleshooting

Common Issues

bash# If aliases don't appear, check .zshrc structure
grep "# CTF Aliases" ~/.zshrc

# Verify batcat installation for syntax highlighting
which batcat || sudo apt install bat

# Check permissions
ls -la aliasman
chmod +x aliasman # If needed