If you've been on NixOS for a while, you've probably built up a pile of shellAliases across configuration.nix, Home Manager modules, and a few files you forgot existed. I kept forgetting what I'd named things, so I wrote nix-alias-browser.
What it does
It scans your .nix files for alias definitions and gives you a searchable list of each alias, its command, and a description. Type a few letters to filter, hit enter, and the command lands on your prompt ready to run (or edit first with ctrl+e).
It picks up:
environment.shellAliases
programs.äbash,zsh,fishñ.shellAliases
programs.fish.shellAbbrs
programs.nushell.shellAliases
home.shellAliases
By default it searches /etc/nixos and your home directory (5 levels deep). Descriptions are stored in ü/.config/nix-alias-browser.toml and re-synced from your Nix files on every start. It can also show commented-out aliases (tab), and -sources lists which files it found and how many aliases each one has.
Try it
nix run github:rezadoz/nix-alias-browser
To keep it, add it as a flake input and put packages.<system>.default in environment.systemPackages or home.packages. The README has small shell functions for zsh, bash, and fish that put the picked command on your prompt, plus an alt+j keybinding for bash and fish.
Known limitation: it reads your Nix files as text and doesn't evaluate them, so aliases built with let bindings or other computed values may not show up. If you have a setup it misses, I'd love an issue with an example.
It's written in Go and MIT licensed. A few friends and I have used it daily for about a month. I'd like to get it into nixpkgs once it has more use behind it, so feedback, bug reports, and "it broke on my config" stories are all welcome.
Repo: https://github.com/rezadoz/nix-alias-browser