IX is invoked asDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/pg83/ix/llms.txt
Use this file to discover all available pages before exploring further.
ix <subcommand> [arguments...] using the ./ix wrapper at the repository root. Every subcommand is documented below with its full syntax, arguments, and behavior. All subcommands share a common flag syntax: --name=[value] for per-package or per-realm configuration.
Synopsis
ix mut
Modify one or more realms by installing or removing packages.
Syntax:
mut is the primary command for managing realm contents. Package names are prefixed with + to add (the default) or - to remove. Flags can be scoped to a specific package or to the entire realm using --name=[value]. If no realm is specified, IX defaults to the realm matching your current username. If no packages are specified, IX updates all packages already installed in the specified realms.
Examples:
ix build
Build packages in a temporary ephemeral realm without modifying any existing realm.
Syntax:
build runs let over a freshly created temporary realm that is discarded after the command completes. It is the standard way to test whether a package or set of packages builds correctly, without touching any live realm. Flags work the same way as in mut and let.
Examples:
ix let
Compute a new realm state without switching the anchor link.
Syntax:
let performs the same resolution and build steps as mut but stops short of updating the anchor symlink in /ix/realm/. Use it to inspect the resulting realm — check installed packages, versions, and flag values — before committing the change with mut. The argument syntax is identical to mut.
Example:
ix run
Prepare a temporary realm with specified packages and execute a command inside it.
Syntax:
run builds a new realm containing the listed packages and immediately executes the given command within that realm’s environment. The -- separator is required between the package list and the command to run. The realm is ephemeral and not anchored.
Example:
ix gc
Collect garbage: move unused packages from the store to the trash.
Syntax:
gc scans /ix/store/ and identifies all packages that are not reachable from any anchor realm in /ix/realm/. Unreachable packages are moved to /ix/trash/ for asynchronous removal. You can supply one or more prefix names to restrict which package kinds are considered; the default set of prefixes is lib, bin, lnk, aux, and rlm.
Examples:
ix list
List realms or the packages installed within them.
Syntax:
list prints all known realms. When one or more realm names are provided, it prints the packages installed in each of those realms, along with any flags that were set at installation time.
Examples:
ix purge
Remove anchor links for one or more realms.
Syntax:
purge removes the anchor symlinks for the named realms from /ix/realm/. This does not delete the underlying store entries — those are cleaned up by ix gc. At least one realm name must be provided.
Example:
ix dep
Print the ix.sh recipe files for a package and all its dependencies.
Syntax:
dep resolves the full dependency tree for each listed package and prints the path to every ix.sh recipe file involved. This is useful for auditing the complete set of recipes that contribute to a package build, or for feeding the list into other tools.
Example:
ix tool
Access auxiliary tools implemented as separate scripts outside the core.
Syntax:
tool dispatches to one of several helper scripts that extend IX with functionality whose semantics are not yet fully stabilized or whose scope falls outside the core. If no tool name is given, IX attempts to invoke the list tool (which does not exist by default, producing an error — this is the documented behavior).
Available tools:
| Tool | Description |
|---|---|
listall | List all packages known to IX |
mkfs | Filesystem image creation helper |
pypi | PyPI package metadata helper |
reconf | Reconfigure a package recipe |
regen | Regenerate derived package files |
upver | Update the version of a package |
Exit Codes
| Code | Meaning |
|---|---|
0 | The operation completed successfully |
1 | IX was invoked without a subcommand, with an invalid subcommand, an internal error was encountered, or a keyboard interrupt was triggered |
| subprocess code | If a subprocess invoked by IX failed, IX returns that subprocess’s exit code directly |