niwaniwa0.1.2
saru-id/niwa
niwaniwa

niwa apply

Make the config true: plan, confirm, execute

niwa apply [--yes] [--dirty] [--force [<TARGET>...]] [--verify] [--interactive] [--no-privileged] [--only <ONLY>] [--sandbox]

Flags

FlagArgumentMeaning
--yes—Apply without asking
--dirty—With --yes: allow a config tree with uncommitted changes
--force[<TARGET>...]Overwrite files that hold edits niwa never wrote: bare covers the run, or name targets to lift one at a time
--verify—Re-check everything after the run; fail if anything still reports a change
--interactive—Step through every change one decision at a time
--no-privileged—Skip the steps that need administrator rights
--only<ONLY>Run one module by name and leave the rest as they stand
--sandbox—Rehearse from nothing: a throwaway home and fake prefixes. Files land there; packages are counted, never installed

-v, --verbose and --debug are global and this verb takes them too. The global flags table lists them.

Exit codes

CodeWhen
0Every step succeeded
1An error, a cancel at the confirmation, or --verify finding work still pending

Screens

The screen below is a snapshot the tool wrote, reproduced byte for byte.

[shell]
~/.zshrc
[desktop]
com.apple.dock autohide   false → true
3 checked · 2 changed · [t]
niwa apply --yes · tests/snapshots/snapshots__apply_pending_piped.snap

Next

  • The apply loop — explain the three phases, the two passes, and the overwrite ladder
  • niwa plan — the next verb in this group

↑↓ navigate · enter opens · esc closes