pare-nix

v0.24.2
io.github.Dave-London/pare-nix Checked 5 hours ago Published 3 days ago

Pare Nix -- Structured Nix build, develop, and flake operations as typed JSON.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

build Nix Build

Builds a Nix derivation and returns structured output paths and diagnostics.

ParameterTypeDescription
compactbooleanPrefer compact output
installablestringInstallable reference (e.g. '.#package', 'nixpkgs#hello')
noLinkbooleanDo not create output link (--no-link)
outLinkstringOutput link path (--out-link)
pathstringProject root path

run Nix Run

Runs a Nix application from an installable and returns stdout, stderr, exit code, and duration.

ParameterTypeDescription
argsarrayArguments to pass to the application after --
compactbooleanPrefer compact output
installablestringInstallable reference (e.g. '.#app', 'nixpkgs#hello')
pathstringProject root path

develop Nix Develop

Enters or queries a Nix dev shell. When a command is provided, runs it inside the dev shell and returns the result.

ParameterTypeDescription
commandstringCommand to run inside the dev shell (uses --command)
compactbooleanPrefer compact output
installablestringInstallable reference for the dev shell (e.g. '.#devShell')
pathstringProject root path

shell Nix Shell

Makes packages available in the environment and optionally runs a command. Returns stdout, stderr, exit code, and duration.

ParameterTypeDescription
packages *arrayInstallable references for packages to make available (e.g. ['nixpkgs#jq', 'nixpkgs#curl'])
commandstringCommand to run with the packages available (uses --command)
compactbooleanPrefer compact output
pathstringProject root path

flake-show Nix Flake Show

Shows the outputs of a Nix flake as a structured tree. Uses --json for machine-parseable output by default.

ParameterTypeDescription
compactbooleanPrefer compact output
flakeRefstringFlake reference (defaults to '.')
jsonbooleanUse --json for machine-parseable output (default true)
pathstringProject root path

flake-check Nix Flake Check

Checks a Nix flake for errors and returns structured check results, warnings, and errors.

ParameterTypeDescription
compactbooleanPrefer compact output
flakeRefstringFlake reference (defaults to '.')
pathstringProject root path

flake-update Nix Flake Update

Updates flake lock file inputs and returns structured information about what was updated.

ParameterTypeDescription
compactbooleanPrefer compact output
flakeRefstringFlake reference (defaults to current directory)
inputsarraySpecific inputs to update (e.g. ['nixpkgs', 'flake-utils']). If omitted, all inputs are updated.
pathstringProject root path