Filesystem-driven command tree generator for @parshjs/core.
Walks a commands/ directory and emits a commandTree.gen.ts that wires the runtime command tree and full ctx typing into @parshjs/core.
This file is generated — never hand-edit it. Commit it and re-run after any structural change under commands/ (added / renamed / deleted file, edited path string). Editing the body of an existing command never needs a regeneration.
npm install -D @parshjs/codegenparsh-codegen generate # one-shot
parsh-codegen generate --help # full flag reference- One file per command. Export
commandfrom each. - The directory layout mirrors the path string passed to
defineCommand.[name]directories or files declare params. _root.tsis the optional root command (defineRootCommand).
src/commands/
_root.ts // ''
s3.ts // 's3'
s3/
buckets/
list.ts // 's3 buckets list'
[name].ts // 's3 buckets [name]'
[name]/
create.ts // 's3 buckets [name] create'