Skip to content

CLI flag conventions ​

Put every flag after the subcommand. The one exception is -c <path>, which goes before it.

bash
noorm -c packages/db run build --dry-run

Here -c packages/db sets the working directory, and --dry-run belongs to run build. A flag in the wrong position is an error, not a silent no-op:

$ noorm --dry-run run build
Error: Unrecognized flag '--dry-run' before the subcommand — noorm can't forward it there. The only root-level flag is -c/--cwd <path>; every other flag goes on the command that uses it. Move '--dry-run' after the subcommand instead, e.g. noorm <command> ... --dry-run.

The first non-flag token is the subcommand. It decides who reads each flag:

--help, -h, --version, and -v skip this check. --version and -v work only as the sole argument.

Which flags go where? ​

FlagBefore the subcommandAfter the subcommand
-c <path>, --cwd <path>, --cwd=<path>Working directory, like git -C-c means --config
-c <name>, --config <name>-c is read as --cwd; --config is an errorConfig to use instead of the active one
--jsonErrorPrint JSON on stdout
--dry-runErrorPreview without executing
--force, -fErrorForce the operation; the effect varies per command
--yes, -yErrorSkip confirmations, same as NOORM_YES=1

Each command declares the subset it accepts, and noorm <command> --help lists them. It prints --dryRun for --dry-run; the two spellings are one flag. After the subcommand, a misspelled flag is dropped without an error, so check the spelling there. The full table is in the CLI reference.

What does -c / --cwd do? ​

noorm normally walks up from the current directory to the nearest .noorm/ and runs there. --cwd skips the walk and runs in the path you name.

bash
noorm -c packages/db run build
noorm --cwd /repos/shop change ff
SituationResult
Path is not a directoryError: --cwd path is not a directory: <absolute path>, exit 2
-c followed by the subcommand, noorm -c run buildrun is taken as the path, so this fails as above
-c with no valueIgnored; noorm walks up as usual
-c prod meant as a config, noorm -c prod run buildprod is a path, not a config. Use noorm run build --config prod

Next ​