niwaniwa0.1.2
saru-id/niwa
niwaniwa

Environment variables

Everything in the environment that changes what niwa does. Nothing else in it is read.

What niwa reads

A path variable is honored only when it is absolute. Anything else is ignored, and the default stands.

VariableWhat it does
HOMEThe home directory. It must be set and absolute, or niwa stops before it does anything.
XDG_CONFIG_HOMEMoves the config repo to <value>/niwa. Honored when absolute, ignored otherwise.
XDG_STATE_HOMEMoves the state directory to <value>/niwa. Honored when absolute, ignored otherwise.
XDG_DATA_HOMEMoves shared data, including the shipped types and resolved modules. Honored when absolute.
HOMEBREW_PREFIXWhere Homebrew lives, in place of the architecture default. Honored when absolute.
NIWA_MANAGED_PREFSWhere managed preferences are read from. It exists so the tests can run against a fake one.
NIWA_PROGRESS_EVERYHow often a long run prints a progress line, in seconds. The default is 30.
NO_COLORSet and not empty: no color. The marks stay, so the screen still reads.
FORCE_COLORSet, not empty, and not "0": color even when the output is a pipe.
TERM"dumb" turns color off, like NO_COLOR.
TERM_PROGRAMNames the terminal. On the ones known to render OSC 8, niwa prints clickable links.
EDITORThe editor pull opens for the edit answer. It may carry arguments, for example "code --wait".
ZDOTDIRWhere .zshrc lives. uninstall reads it to find the PATH line the installer wrote.
PATHWhere niwa finds the tools it drives, and what every command it runs inherits.

What the installer reads

install.sh reads two more. They are for mirrors and for testing; neither is needed to install niwa.

VariableWhat it does
NIWA_RELEASE_BASEWhere install.sh fetches a release from. For mirrors, and for testing.
NIWA_VERSIONThe version install.sh fetches. The default is the current release.

Next

  • File locations — say where every file lives and which are committed
  • Reference — index the twenty verbs by how often you reach for them, and route to the rest

↑↓ navigate · enter opens · esc closes