LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

nix-search

Search for packages in Nix flakes

TLDR

Search Nixpkgs for a package
$ nix search nixpkgs [query]
copy
Search with JSON output
$ nix search nixpkgs [query] --json
copy
Search a specific flake
$ nix search [github:owner/repo] [query]
copy
Search and exclude matching packages
$ nix search nixpkgs [query] --exclude [regex]
copy
Search with multiple terms (AND logic)
$ nix search nixpkgs [python] [http]
copy

SYNOPSIS

nix search flake [query...] [options]

DESCRIPTION

nix search searches for packages in Nix flakes by matching against package names, attribute paths, and descriptions. Multiple search terms are ANDed together. Part of the experimental new Nix CLI (requires `nix-command` and `flakes` experimental features enabled).

PARAMETERS

flake

Flake reference to search (e.g., nixpkgs, github:owner/repo).
query
Search query as a regex. Multiple queries are ANDed together.
--json
Output results in JSON format.
-e, --exclude regex
Exclude packages whose attribute path, name, or description match the regex.
--impure
Allow access to mutable paths and external repositories.
-I, --include path
Add a path to the Nix search path for resolving lookup paths.
--offline
Operate without network access.
--refresh
Force a refresh of the flake registry and inputs before searching.

CAVEATS

Requires the nix-command and flakes experimental features to be enabled. The first search against a flake may be slow as it evaluates and caches the package set. Results depend on the flake's lock file version.

SEE ALSO

nix(1), nix-env(1), nix-profile(1), nix-shell(1)

Copied to clipboard
Kai