idk-plans

Command line

module

◐ 66% (2/3)

Runs the commands check, fix, tree, model, and site. It is the only part that reads arguments and writes to the terminal.

The idk-plans command is how people and CI use the tool. Each command loads the project with the Engine, then does one job.

Command Changes files Use
check no In CI and in a pre-push hook.
fix yes Before you commit.
tree no To see progress in the terminal.
model no To give the model to another tool, as JSON.
site no To build the website.
How it works

bin/idk-plans.js reads the options with node:util parseArgs. It calls loadProject once, then the function for the command.

Exit codes:

  • 0: no errors.
  • 1: check or fix found an error.
  • 2: the tool could not run, for example because the configuration is not valid.

fix runs check again after it writes, and shows what is left.

Tasks

  • Run check, fix, tree, model, and site
  • Exit with 1 when check finds an error
  • Show what fix would change without writing it (fix --dry-run)

In other views

Viewers

◐ 66% (2/3)

Linked from