A shell plugin that helps you work smarter by:
- Alias Reminders β When you type a full command that has an alias defined, it reminds you to use the alias
- Modern Command Suggestions β When you use legacy commands (cat, ls, find, grep, etc.), it suggests modern Rust/Go alternatives if they're installed
- AI-Powered Suggestions β Uses a local LLM (via Ollama) to suggest better ways to write your commands
Supports Zsh, Fish, Bash, and Nushell.
Forgot you had an alias? The plugin gently reminds you.
Still using cat, find, or ls? Get suggestions for modern alternatives.
With Ollama running locally, get intelligent command rewrites.
See your full configuration at a glance with ysu status.
# Homebrew (macOS β recommended)
brew install vangie/formula/you-should-use
# Or one-line install (auto-detects your shell)
curl -fsSL https://raw.githubusercontent.com/vangie/you-should-use/main/install.sh | shThen follow the post-install instructions to add the source line to your shell config.
brew install vangie/formula/you-should-useThen add to your shell config as shown in the post-install message:
# Zsh (~/.zshrc)
source $(brew --prefix)/Cellar/you-should-use/*/you-should-use.plugin.zsh
# Bash (~/.bashrc)
source $(brew --prefix)/Cellar/you-should-use/*/you-should-use.plugin.bash
# Fish
ln -sf $(brew --prefix)/Cellar/you-should-use/*/conf.d/you-should-use.fish ~/.config/fish/conf.d/curl -fsSL https://raw.githubusercontent.com/vangie/you-should-use/main/install.sh | shAuto-detects your shell (zsh/bash/fish), clones the repo, and adds the source line to your rc file.
git clone https://github.com/vangie/you-should-use ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/you-should-useThen add you-should-use to your plugins in ~/.zshrc:
plugins=(... you-should-use)zinit light vangie/you-should-usezplug "vangie/you-should-use"Add to your .zsh_plugins.txt:
vangie/you-should-use
fisher install vangie/you-should-useomf install https://github.com/vangie/you-should-usegit clone https://github.com/vangie/you-should-use ~/.you-should-use
echo 'source ~/.you-should-use/you-should-use.plugin.zsh' >> ~/.zshrcgit clone https://github.com/vangie/you-should-use ~/.you-should-use
ln -sf ~/.you-should-use/conf.d/you-should-use.fish ~/.config/fish/conf.d/git clone https://github.com/vangie/you-should-use ~/.you-should-use
echo 'source ~/.you-should-use/you-should-use.plugin.bash' >> ~/.bashrcNote: Requires Bash 3.2+. Uses
DEBUGtrap for pre-execution hooks andPROMPT_COMMANDfor post-execution processing.
git clone https://github.com/vangie/you-should-use ~/.you-should-useThen add to your config.nu or env.nu:
source ~/.you-should-use/you-should-use.plugin.nuNote: Requires Nushell >= 0.80. Uses
pre_executionhooks. Nushell support is experimental.
ysu update # Update to the latest version
ysu uninstall # Remove from your systemThese commands auto-detect your install method (Homebrew, oh-my-zsh, zinit, zplug, antidote, Fisher, Oh My Fish, or git clone) and provide the appropriate instructions.
All configuration is done via environment variables. Set them in your shell config before the plugin is loaded.
YSU_REMINDER_ENABLED=true # Enable alias reminders (default: true)
YSU_SUGGEST_ENABLED=true # Enable modern tool suggestions (default: true)
YSU_LLM_ENABLED=true # Enable AI-powered suggestions (default: false, auto-detected with Ollama)YSU_PREFIX="π‘" # Prefix for all messages
YSU_REMINDER_PREFIX="" # Extra prefix for alias reminders
YSU_SUGGEST_PREFIX="" # Extra prefix for tool suggestions
YSU_MESSAGE_FORMAT="{prefix} {arrow} {message}" # Custom message templateThe YSU_MESSAGE_FORMAT variable supports three placeholders:
{prefix}β The combined prefix (YSU_PREFIX + feature-specific prefix){arrow}β The colored arrow separator (β){message}β The actual suggestion text
Examples:
YSU_MESSAGE_FORMAT="[{prefix}] {message}" # No arrow
YSU_MESSAGE_FORMAT="{message}" # Message only
YSU_MESSAGE_FORMAT="{prefix}: {arrow} {message}" # Custom separatorAvoid being too intrusive with these settings:
YSU_PROBABILITY=50 # Show tips 50% of the time (default: 100)
YSU_COOLDOWN=30 # Minimum 30 seconds between tips (default: 0)YSU_IGNORE_ALIASES="g gc" # Don't remind about these aliases
YSU_IGNORE_COMMANDS="cat ls" # Don't suggest alternatives for theseWhen a modern tool alternative is not installed, the plugin can show the install command:
YSU_INSTALL_HINT=true # Show install commands (default: true)The plugin auto-detects your package manager (brew, apt, pacman, dnf, zypper, apk, pkg) and generates appropriate install commands. WSL is also detected.
Example output:
π‘ β Try bat instead of cat β Syntax highlighting, line numbers (install: brew install bat)
π‘ β Try bat instead of cat β Syntax highlighting, line numbers (install: sudo apt install bat)
You can customize the install commands mapping:
typeset -gA YSU_INSTALL_COMMANDS
YSU_INSTALL_COMMANDS=(
bat "brew install bat"
eza "cargo install eza" # Override default
myutil "pip install myutil" # Add custom
)Override or extend the default mappings. Use | to separate multiple alternatives β the first installed one is suggested.
typeset -gA YSU_MODERN_COMMANDS
YSU_MODERN_COMMANDS=(
cat "bat:Syntax highlighting, line numbers, git integration"
ls "eza:Modern file listing with icons|lsd:LSDeluxe - colorful ls with icons"
find "fd:Simpler syntax, faster, respects .gitignore"
grep "rg:Ripgrep - faster, respects .gitignore|ag:The Silver Searcher"
vim "nvim:Neovim - modernized Vim fork"
)Configure the AI-powered suggestion engine. Works with any OpenAI-compatible API (Ollama, OpenAI, etc.).
YSU_LLM_API_URL="http://localhost:11434/v1" # API endpoint (default: Ollama)
YSU_LLM_MODEL="auto" # Model name or "auto" (picks first available)
YSU_LLM_API_KEY="" # API key (not needed for Ollama)
YSU_LLM_MODE="single" # single, multi, or both
YSU_LLM_WINDOW_SIZE=5 # Commands for multi-command analysisIn multi or both mode, the plugin analyzes your recent command history as a sliding window and suggests workflow optimizations:
YSU_LLM_MODE="both" # Enable both single-command and multi-command analysis
YSU_LLM_WINDOW_SIZE=5 # Analyze the last 5 commands- single β Analyze each command individually (default)
- multi β Only analyze command sequences (sliding window)
- both β Analyze both individual commands and sequences
Ollama Auto-Detection: If Ollama is running locally, the plugin automatically enables LLM suggestions β no configuration needed.
ysu status # Show current configuration and statistics
ysu config # Interactive configuration wizard
ysu cache # Manage LLM suggestion cache (clear, size)
ysu doctor # Run diagnostics and check for issues
ysu discover # Analyze history and suggest aliases (optional: min count)
ysu update # Update to the latest version
ysu uninstall # Remove from your systemRuns comprehensive diagnostics:
- Shell version compatibility
- Hook registration status
- Plugin load time
- Config conflict detection
- Package manager detection
- LLM connection status
- Dependency checks
Scans your shell history for frequently typed multi-word commands and suggests creating aliases:
$ ysu discover
git checkout -b (used 47 times)
alias gc='git checkout -b'
docker compose up (used 23 times)
alias dcu='docker compose up'
Pass a threshold to customize: ysu discover 3 (default: 5).
| Legacy Command | Modern Alternatives | Description |
|---|---|---|
cat |
bat |
Syntax highlighting, line numbers, git integration |
ls |
eza, lsd |
Modern file listing with icons, git status, tree view |
find |
fd |
Simpler syntax, faster, respects .gitignore |
grep |
rg, ag |
Ripgrep / Silver Searcher - faster, respects .gitignore |
du |
dust, ncdu |
Intuitive disk usage with visual chart |
top |
btop, htop |
Beautiful resource monitor with mouse support |
ps |
procs |
Modern process viewer with tree display |
diff |
delta, colordiff |
Syntax highlighting, side-by-side view |
sed |
sd |
Simpler syntax, uses regex by default |
curl |
httpie, curlie |
Human-friendly HTTP client |
ping |
gping |
Ping with a graph |
dig |
dog |
DNS client with colorful output |
man |
tldr |
Simplified, community-driven man pages |
cd |
zoxide |
Smarter cd that learns your habits |
Note: Suggestions only appear when the modern alternative is actually installed on your system. When multiple alternatives are configured, the first installed one is suggested.
The plugin hooks into the shell's pre-execution mechanism (preexec in Zsh, fish_preexec event in Fish, DEBUG trap in Bash, pre_execution hook in Nushell) to intercept commands before they run. It:
- Checks if you typed a command that matches an existing alias expansion (alias reminder)
- Checks if the command has a known modern alternative that is installed (tool suggestion)
- Sends complex commands to a local LLM for intelligent rewrite suggestions (async, cached)
All checks respect the probability and cooldown settings to avoid being annoying. LLM suggestions run asynchronously and display on the next prompt to avoid slowing down your workflow.
- Zsh support
- Fish support
- AI-powered suggestions (Ollama / OpenAI)
- Install command hints
- Custom message templates
- Multi-command workflow analysis
- Bash support
- Platform-aware install hints (auto-detect OS)
- Diagnostic command (
ysu doctor) - Alias discovery (
ysu discover) - Nushell support (experimental)
- Homebrew formula and install script
- Plugin lifecycle management (
ysu update,ysu uninstall)
MIT License β see LICENSE for details.
Contributions are welcome! Feel free to:
- Add new modern command mappings
- Improve alias matching logic
- Add support for more shells or plugin managers
- Fix bugs or improve documentation
Please open an issue or pull request on GitHub.