Aliases
Create, manage, and auto-discover shell aliases directly from your command history. Suvadu analyzes what you type most and suggests shortcuts so you never have to configure aliases by hand again.
Quick Start
Register an alias, then apply it to your shell so it takes effect immediately.
suv alias add dcu "docker compose up -d"
suv alias apply Your alias is now available in every new shell session. Suvadu writes aliases to a sourceable file that your shell config loads automatically (set up during suv init).
Adding Aliases
Use suv alias add to register a new alias. The name must be alphanumeric and may include hyphens (-) and underscores (_). The command can be any valid shell expression.
suv alias add <NAME> <COMMAND> Examples
# Short alias for docker compose
suv alias add dcu "docker compose up -d"
# Git shortcut
suv alias add gp "git push origin HEAD"
# Compound command
suv alias add deploy "git pull && cargo build --release && systemctl restart myapp" If an alias with the same name already exists, Suvadu will ask you to confirm the overwrite.
Removing Aliases
Remove a previously registered alias by name.
suv alias remove <NAME> Example
suv alias remove dcu After removing an alias, run suv alias apply to update the sourceable file so the alias is no longer loaded in new shells.
Listing Aliases
View all aliases currently managed by Suvadu.
suv alias list This prints a human-readable table of alias names and their associated commands.
| Flag | Description |
|---|---|
--json | Output aliases as a JSON array. Useful for scripts, automation, or feeding into other tools. |
Example
# Plain table output
suv alias list
# Machine-readable JSON
suv alias list --json Applying Aliases
After adding or removing aliases, run suv alias apply to write them to a sourceable shell file. Your shell config (set up by suv init) sources this file on startup, so new terminal sessions will automatically pick up the changes.
suv alias apply | Flag | Description |
|---|---|
--stdout | Print the alias definitions to stdout instead of writing to the shell file. Useful for previewing or piping into a custom setup. |
Example
# Preview what will be written
suv alias apply --stdout
# Write to shell file (default behavior)
suv alias apply Suggesting Aliases
Suvadu can analyze your command history and suggest aliases for the commands you type most frequently. This is one of the most powerful features — it turns your actual usage patterns into time-saving shortcuts.
suv alias suggest The command scans your history, filters for commands above a minimum frequency and length threshold, and presents a ranked list of suggestions.
| Flag | Description |
|---|---|
-c, --min-count <N> | Minimum number of times a command must appear in history to be suggested. Defaults to 10. |
-l, --min-length <N> | Minimum character length of the command string. Short commands (like ls) are excluded by default. Defaults to 12. |
-d, --days <N> | Only analyze history from the last N days. Omit to scan all history. |
-n, --top <N> | Number of suggestions to show. Defaults to 20. |
--text | Output suggestions as plain text instead of the interactive TUI. |
Examples
# Suggest aliases from the last 30 days, minimum 5 uses
suv alias suggest --days 30 --min-count 5
# Top 10 suggestions, plain text output
suv alias suggest --top 10 --text
# Only suggest long commands (20+ chars) used at least 15 times
suv alias suggest --min-length 20 --min-count 15 Adding Suggested Aliases Interactively
Use suv alias add-suggested to run the same history analysis as suggest, but with an interactive picker that lets you select which suggestions to register as aliases. Suvadu auto-generates alias names based on the command structure.
suv alias add-suggested This command accepts the same flags as suv alias suggest (-c, -l, -d, -n, --text) to control which commands are surfaced.
Example
# Interactively pick from recent high-frequency commands
suv alias add-suggested --days 14 --min-count 3 How It Works
Aliases are stored in Suvadu's local SQLite database alongside your history. When you run suv alias apply, Suvadu generates a shell-specific file (e.g., ~/.config/suvadu/aliases.zsh) containing standard shell alias declarations. Your shell config sources this file on startup, so aliases are always in sync with what Suvadu manages.
The suggest and add-suggested commands query your history database directly, grouping and ranking commands by frequency. All analysis is performed locally — no data leaves your machine.
suv alias suggest periodically (e.g., monthly) to discover new aliases as your workflow evolves. Combine with tags to focus on specific projects.