I have quite a few shell aliases, especially for my daily work dealing with a lot of Kubernetes clusters and configurations. Unfortunately, I don't always remember all of them.
I know they're there but always have a typo in them, and it's created a lot of frustration. I'd spend more time trying to recall or correct an alias than actually running the command.
sobriquet solves this.
sobriquet is a blazingly fast fuzzy finder for your shell aliases. It reads your aliases and presents them in a beautiful, full-screen interactive search interface. Just type to search, preview the exact command before executing it, and press Enter to run it.
Think of it like Atuin but for your aliases instead of shell history.
- 🚀 Blazingly Fast - Written in Rust with minimal dependencies, startup time is ~3ms
- 🔍 Full-Screen Search - Beautiful, distraction-free fuzzy finder
- 📊 Frecency Sorting - Smartly sorts aliases by frequency and recency
- 🖥️ Cross-Platform - Works on macOS, Linux, and Windows
- 🐚 Multi-Shell - Supports zsh, bash, and fish
- 🚨 Security Audit - Detect embedded secrets and duplicate aliases
- 🔒 Safe Preview - Commands shown without expansion by default (no accidental execution)
- 💾 Smart Caching - Instant startup with automatic cache invalidation
- 📈 Usage Tracking - See your most-used aliases with built-in stats
- 👁️ Rich Preview - Command breakdown, warnings, source location, and more
- 🔄 Dynamic Toggle - Expand variables and command substitutions on-demand with Ctrl+X
- ⚡ Zero Config - Works out of the box, but customizable if you want
- 📚 Shell Integration - Built-in
initcommand for easy setup - 🔄 Shell Completions - Generate completions for zsh, bash, and fish
$ sq
┌─ sobriquet ────────────────────────────────────────┐
│ k8s▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ 3/150 │
├──────────────────────────────────────────────────────┤
│ > k8s_prod │
│ > k8s_staging │
│ > k8s_logs │
│ │
│ ────────────────────────────────────────────────────│
│ KUBECONFIG=~/.kube/prod.yaml kubectl │
│ ────────────────────────────────────────────────────│
│ Command: kubectl │
│ Args: (none) │
│ Source: ~/.zshrc:42 │
│ Usage: 157 times (last used 2 hours ago) │
└──────────────────────────────────────────────────────┘
Start typing to search, press Enter to select.
brew tap benjaminch/tap
brew install sobriquetyay -S sobriquet
# or
paru -S sobriquetOr manually:
git clone https://aur.archlinux.org/sobriquet.git
cd sobriquet
makepkg -sicargo install sobriquetThis installs sobriquet globally and works on any system with Rust installed.
git clone https://github.com/benjaminch/sobriquet.git
cd sobriquet
cargo install --path .Download the latest binary for your platform from the Releases page.
# Apple Silicon
curl -LO https://github.com/benjaminch/sobriquet/releases/latest/download/sobriquet-aarch64-apple-darwin.tar.gz
tar xzf sobriquet-aarch64-apple-darwin.tar.gz
mv sobriquet-aarch64-apple-darwin/sobriquet ~/.local/bin/
# Intel
curl -LO https://github.com/benjaminch/sobriquet/releases/latest/download/sobriquet-x86_64-apple-darwin.tar.gz
tar xzf sobriquet-x86_64-apple-darwin.tar.gz
mv sobriquet-x86_64-apple-darwin/sobriquet ~/.local/bin/# x86_64
curl -LO https://github.com/benjaminch/sobriquet/releases/latest/download/sobriquet-x86_64-unknown-linux-musl.tar.gz
tar xzf sobriquet-x86_64-unknown-linux-musl.tar.gz
mv sobriquet-x86_64-unknown-linux-musl/sobriquet ~/.local/bin/
# ARM64
curl -LO https://github.com/benjaminch/sobriquet/releases/latest/download/sobriquet-aarch64-unknown-linux-gnu.tar.gz
tar xzf sobriquet-aarch64-unknown-linux-gnu.tar.gz
mv sobriquet-aarch64-unknown-linux-gnu/sobriquet ~/.local/bin/Download sobriquet-x86_64-pc-windows-msvc.zip from the releases page and extract it to a directory in your PATH.
After installing, set up shell integration. The easiest way is to use the built-in init command:
Add this to your ~/.zshrc:
eval "$(sobriquet init zsh)"Add this to your ~/.bashrc:
eval "$(sobriquet init bash)"Add this to your ~/.config/fish/config.fish:
sobriquet init fish | sourceThen restart your shell and you're ready to go!
# Run with Ctrl+S or just type:
sqJust run sobriquet (or sq if you set up the alias):
sqThe full-screen search interface will open. Start typing to search, use arrow keys to navigate, and press Enter to execute.
Keybindings:
Enter- Execute the selected aliasCtrl+X- Toggle secret masking (show/hide sensitive values like tokens, API keys)Ctrl+C/Esc- Exit without executing
Security Note: By default, sensitive values (tokens, API keys, secrets) are automatically masked in both the list and preview. Press Ctrl+X to reveal the full command.
sobriquet --listOr with formatting:
sobriquet --list --format json
sobriquet --list --format json-prettysobriquet --query "git"This opens the search interface with "git" pre-filled.
sobriquet statsSee your most-used aliases and usage patterns:
# Clear statistics
sobriquet stats clearsobriquet auditScan for potential security issues:
# Check for secrets only
sobriquet audit secrets
# Check for duplicate commands
sobriquet audit duplicates# Zsh
sobriquet generate complete-zsh > ~/.zsh/completions/_sobriquet
# Bash
sobriquet generate complete-bash > ~/.local/share/bash-completion/completions/sobriquet
# Fish
sobriquet generate complete-fish > ~/.config/fish/completions/sobriquet.fishsobriquet looks for a config file in these locations (in order of priority):
~/.config/sobriquet/config.toml(recommended, XDG standard)~/.config/sobriquet.toml~/.sobriquet.toml
Run sobriquet config to see which config file is being used.
[ui]
height = "100%" # Full screen by default
prompt = "Select alias > " # Search prompt
preview = true # Show rich preview
preview_position = "right" # Preview position: right, up, down
preview_expand_details = false # Expand variables and show command details (default: false)
# When false: Shows raw commands (secure, no expansion)
# When true: Expands $HOME, $(commands), etc.
# Tip: Toggle on-the-fly with Ctrl+X
[shell]
prefer = "zsh" # Preferred shell
cache_ttl = 300 # Cache validity in seconds (0 to disable)
[output]
color = "auto" # Color mode: auto, always, never- Collection - sobriquet runs your shell in interactive mode to collect all defined aliases
- Caching - Aliases are cached for instant startup (~3ms vs ~2s without cache)
- Search - When you run
sobriquet, it launches a full-screen fuzzy finder using skim - Preview - As you search, sobriquet shows a rich preview with command breakdown, warnings, and source location
- Execute - Select an alias and the expanded command is placed on your command line, ready to execute or edit
The key difference from just typing an alias: you see the expanded command before execution, making it impossible to have typos frustrate you.
| Operation | Time |
|---|---|
| Cold start (no cache) | ~2s |
| Warm start (cached) | ~3ms |
| Search/Filter | <10ms |
| Shell startup overhead | <5ms |
sobriquet is carefully optimized to be invisible in your workflow.
- ✅ zsh
- ✅ bash
- ✅ fish
sobriquet can audit your aliases for:
- Embedded Secrets - API keys, tokens, passwords, AWS credentials, etc.
- Duplicate Commands - Multiple aliases pointing to the same command
- Dangerous Patterns - Risky commands like
rm -rf,sudo rm, etc.
All analysis happens locally on your machine. Nothing is sent anywhere.
A sobriquet is a nickname or epithet that describes someone or something. Your shell aliases are exactly that—custom nicknames for your commands. The tool helps you remember and use them effectively.
git clone https://github.com/benjaminch/sobriquet.git
cd sobriquet
# Build
cargo build --release
# Run tests
cargo test
# Run clippy
cargo clippy --all-targets
# Install
cargo install --path .The minimum supported Rust version is 1.92.0.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Install git hooks:
./scripts/install-hooks.sh - Make your changes
- Commit your changes using Conventional Commits
- Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
After cloning the repository, install the git hooks to ensure code quality:
./scripts/install-hooks.shThis installs a pre-commit hook that automatically runs:
cargo fmt --check- Ensures code is properly formattedcargo clippy- Catches common mistakes and enforces best practices
If you need to bypass the hooks temporarily (not recommended), use:
git commit --no-verifyFor detailed development instructions, see DEVELOPMENT.md.
Please make sure to:
- Run
cargo fmtbefore committing (automated by pre-commit hook) - Run
cargo clippy --all-targetsand fix any warnings (automated by pre-commit hook) - Add tests for new functionality
- Update documentation if needed
For coding standards and best practices, see CODING_PRACTICES.md.
Releasing a new version is fully automated:
# One command to create and publish a release
make release VERSION=0.3.0This will:
- Update
Cargo.tomlandCargo.lock - Run tests
- Create commit and tag
- Push to GitHub
- Automatically trigger CI to build binaries, publish to crates.io, and update Homebrew
See docs/QUICK_RELEASE.md for quick reference or docs/RELEASING.md for detailed documentation.
This project is licensed under the MIT License - see the LICENSE file for details.