feat(cli): add interactive generate wizard - #304
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Sketchi Icons PreviewStatus:
Preview Worker cleanup has completed. |
Sketchi Web PreviewStatus:
Preview Worker cleanup has completed. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Sketchi Excalidraw Workspace PreviewStatus:
Preview Worker cleanup has completed. |
Sketchi Eval Harness PreviewStatus:
Preview Worker cleanup has completed. |
Sketchi Playground / Studio PreviewStatus:
Preview Worker cleanup has completed. |
f0d1391 to
f6b377c
Compare
f6b377c to
4a80db1
Compare
4a80db1 to
90efc4f
Compare
Merge activity
|
## Summary - add a Clack-based `sketchi generate` wizard only for human text TTY sessions, with prompt, diagram type, and PNG destination choices - share one typed Effect generation workflow between wizard and direct `--prompt` execution while preserving record-before-export recovery - replace the static root-help treatment with a responsive pencil lockup, progressive disclosure, Unicode/ASCII and terminal color fallbacks - document the human/automation contract, add terminal dependencies and notices, and include a patch changeset ## Contract - `sketchi generate --prompt` remains direct and noninteractive; PNG defaults to `<generated-id>.png` - omitted `--prompt` prompts only when stdin and stdout are TTYs, output is text, and CI is absent - JSON, pipes, redirects, and CI retain the deterministic missing-`--prompt` usage failure - wizard destinations are `<cwd>/<id>.png`, `<cwd>/diagrams/<id>.png`, or existing `--dest` semantics; no Git detection occurs ## Proof - `pnpm nx run-many -t typecheck,test,build` - `pnpm nx build-storybook diagram-ui` - `pnpm nx lint sketchi-cli` - `pnpm nx smoke sketchi-cli` - actual pseudo-TTY captures for dark/light/color/ASCII/narrow/non-TTY/cancellation under local `.memory/` - real public generation retry succeeded and produced a visually inspected 1981x1360 PNG
90efc4f to
ab9cd3f
Compare
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @sketchi/cli@0.4.2 ### Patch Changes - [#304](#304) [`ab9cd3f`](ab9cd3f) Thanks [@anandpant](https://github.com/anandpant)! - Add a human-TTY-only generate wizard and responsive, terminal-aware CLI presentation while preserving direct and machine-readable generation contracts.

Summary
sketchi generatewizard only for human text TTY sessions, with prompt, diagram type, and PNG destination choices--promptexecution while preserving record-before-export recoveryContract
sketchi generate --promptremains direct and noninteractive; PNG defaults to<generated-id>.png--promptprompts only when stdin and stdout are TTYs, output is text, and CI is absent--promptusage failure<cwd>/<id>.png,<cwd>/diagrams/<id>.png, or existing--destsemantics; no Git detection occursProof
pnpm nx run-many -t typecheck,test,buildpnpm nx build-storybook diagram-uipnpm nx lint sketchi-clipnpm nx smoke sketchi-cli.memory/