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:checkorfixfound 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
fixwould change without writing it (fix --dry-run)