npkg
Manage Nix profiles; helper commands support --help
Usage reference
Try an example
npkg add batSyntax
npkg <command> [args]- Availability
- Available when nix is installed
- Dependencies
- nix; jq and fzf 0.68.0+ for optional workflows
Some subcommands change stored data or packages. Check the selected operation before running.
Features & Examples
Examples appear only where they add useful detail.
add [pkg ...]Add package(s); with no args opens an fzf pickerAlso known as: install [pkg ...]
Examplenpkg add batfind [--] [query ...]Fuzzy-pick nixpkgs attributes and add selections
Examplenpkg find nvimsearch <query>Run a plain nixpkgs search with descriptions
Examplenpkg search ripgreplistList packages in the current profile
remove [pkg ...]Remove package(s); with no args opens an fzf picker
outdatedCompare installed and evaluated Nix output identities
refreshRebuild the cached nixpkgs attribute index
upgrade [pkg ...]Upgrade all packages or only the named ones
helpShow this help text
| Usage | Description | Example |
|---|---|---|
| Add package(s); with no args opens an fzf pickerAlso known as: install [pkg ...] | |
| Fuzzy-pick nixpkgs attributes and add selections | |
| Run a plain nixpkgs search with descriptions | |
| List packages in the current profile | No example documented |
| Remove package(s); with no args opens an fzf picker | No example documented |
| Compare installed and evaluated Nix output identities | No example documented |
| Rebuild the cached nixpkgs attribute index | No example documented |
| Upgrade all packages or only the named ones | No example documented |
| Show this help text | No example documented |
Notes
- Bare install names become nixpkgs#<name>; any option passes all add arguments to nix unchanged
- npkg find searches a cached list of nixpkgs attribute names
- npkg refresh and outdated need jq
- Interactive add/find/remove needs jq and fzf 0.68.0+
- refresh/outdated/check/diff accept no operands; -h/--help shows usage
- find/pick/fzf recognizes -h/--help before --; after -- they are query text
- Native add/remove/list/search/upgrade arguments pass through as documented
- Advanced nix flags can be passed through by calling nix directly