niwaniwa0.1.2
saru-id/niwa
niwaniwa

niwa check

Validate the config: it loads, every spec is well formed, and declarations do not conflict

niwa check [--notify] [--upstream]

Flags

FlagArgumentMeaning
--notify—The watcher's voice: post a notification when something needs a decision. Never applies anything
--upstream—Ask the upstreams: does everything you declare still exist? The watcher runs this weekly

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

Screens

The screens below are snapshots the tool wrote, reproduced byte for byte.

declarations conflict
  defaults:com.apple.dock:autohide is declared twice with different values:
    modules/a.luau:2
    modules/b.luau:2
  keep one, or move the override into a host file
niwa check · tests/snapshots/snapshots__check_conflict_piped.snap
the config failed to load
  runtime error: init.luau:2: niwa.run: a command needs a guard: add `unless`, `only_if`, or `creates` so the run can be skipped when it is already done
  --> init.luau:2
   |  niwa.run("echo hi")
   |  ^^^^^^^^^^^^^^^^^^^
niwa check · tests/snapshots/snapshots__check_unguarded_piped.snap
no config found
  looked in ~/.config/niwa
  run `niwa init` to scan this machine into a starter config
  or clone your config repo to ~/.config/niwa
niwa check · tests/snapshots/snapshots__check_missing_config_piped.snap

Next

  • The watcher — explain a stateless launchd job whose whole vocabulary is notify
  • niwa update — the next verb in this group

↑↓ navigate · enter opens · esc closes