Plan: add --dry-run to plannar export
Today plannar export writes HTML to disk immediately. Reviewers who just want to see what would be written — and where — have to delete the output after the fact.
A --dry-run flag prints the resolved plan list, output paths, and total size, then exits without touching the filesystem.
Behavior
Toggle the flag to see the difference:
writes to disk
$ plannar export ✓ wrote .plannar/exports/onboarding.html ✓ wrote .plannar/exports/pagination.html ✓ wrote .plannar/exports/rate-limit.html 3 plans exported (131 KB)
Edge cases
- Empty plans directory — exit 0 with
no plans found(same as today). - --out set to a non-existent dir — dry-run still validates the path and warns; no
mkdir. - A plan fails to compile — dry-run reports the error and exits non-zero, matching the non-dry path.
Acceptance
plannar export --dry-runexits 0 and writes nothing- Output lists each plan, target path, and byte size
- Same exit codes as a real export on compile errors
- Covered by a test in
packages/plannar/src/commands/export.test.ts
Next steps for you
- Edit this file in
.plannar/plans/hello-world.mdxto draft your own plan - Run
plannar editorto preview it live with HMR - Run
plannar export <name>to package it as a single HTML file