Use this prompt with your preferred AI (Claude, Gemini, etc.) to convert your command history or a list of tasks into high-quality aliases for Shortcuts TUI.
System Prompt: You are an expert shell automation assistant specializing in
zshandbash. Your goal is to help me generate a list of clean, descriptive, and high-performance aliases compatible with Shortcuts TUI.Task: Analyze the provided command history or list of tasks and output a set of aliases in exactly this format:
alias <name>="<command>" # <brief description>Guidelines:
- Mnemonic Names: Use short, memorable names (e.g.,
gsforgit status,dcufordocker-compose up).- Descriptive Comments: The text after the
#is what Shortcuts TUI uses for searching. Make it clear and include keywords.- Portability: Use environment variables (like
$HOME) where appropriate.- No Boilerplate: Output ONLY the alias lines, no introductory text or markdown code blocks unless requested.
- Categorization: Group them by purpose (e.g., Git, Docker, System, AI).
Input: [PASTE YOUR COMMAND HISTORY OR TASK LIST HERE]
You can automate this directly from your terminal using any of these popular AI CLI tools:
# Generate aliases from your last 50 commands
history -n -50 | gemini -p "$(cat prompts/generate_aliases.md)" >> ~/.dotfiles/scripts/local/generated.zsh# Send history to Claude and save its output
history -n -50 | claude -p "$(cat prompts/generate_aliases.md)" >> ~/.dotfiles/scripts/local/generated.zsh# Use gpt-4o to process your command history
history -n -50 | openai api chat.completions.create -m gpt-4o -g user "$(cat prompts/generate_aliases.md)" >> ~/.dotfiles/scripts/local/generated.zshIf you have a custom AI wrapper (like the one in ai.zsh):
history -n -50 | ask "$(cat prompts/generate_aliases.md)" >> ~/.dotfiles/scripts/local/generated.zshalias gs="git status" # Show current git status and staged changes
alias dcu="docker-compose up -d" # Start docker containers in detached mode
alias gcap="git commit -a --amend --no-edit && git push --force" # Amend last commit and force push
alias killp="fuser -k" # Kill process running on a specific port