Skip to content

feat(cli): add interactive generate wizard - #304

Merged
graphite-app[bot] merged 1 commit into
mainfrom
feat/cli-interactive-generate
Jul 31, 2026
Merged

feat(cli): add interactive generate wizard#304
graphite-app[bot] merged 1 commit into
mainfrom
feat/cli-interactive-generate

Conversation

@anandpant

@anandpant anandpant commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge - adds this PR to the back of the merge queue
  • fast - for urgent changes, fast-track this PR to the front of 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.

@anandpant
anandpant marked this pull request as ready for review July 31, 2026 00:42
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Sketchi Icons Preview

Status: deleted

Preview Worker cleanup has completed.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Sketchi Web Preview

Status: deleted

Preview Worker cleanup has completed.

@socket-security

socket-security Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedis-ci@​4.1.01001007382100
Addedwrap-ansi@​10.0.01001009382100
Addedstring-width@​8.2.21001008987100
Addedchalk@​6.0.010010010088100
Added@​clack/​prompts@​1.7.010010010096100

View full report

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Sketchi Excalidraw Workspace Preview

Status: deleted

  • Surface: internal preview; not linked from public navigation
  • Project: excalidraw
  • Worker identity: sketchi-excalidraw
  • Route policy: internal canvas workspace; no public product domain
  • Preview Worker: sketchi-excalidraw-pr-304
  • Commit: ab9cd3fd44e8
  • Workflow run: https://github.com/shpitdev/sketchi/actions/runs/30596784990

Preview Worker cleanup has completed.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Sketchi Eval Harness Preview

Status: deleted

  • Surface: internal preview; not linked from public navigation
  • Project: eval-harness
  • Worker identity: sketchi-playground
  • Route policy: internal eval harness; no public product domain
  • Preview Worker: sketchi-playground-pr-304
  • Commit: ab9cd3fd44e8
  • Workflow run: https://github.com/shpitdev/sketchi/actions/runs/30596784990

Preview Worker cleanup has completed.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Sketchi Playground / Studio Preview

Status: deleted

  • Surface: public product preview
  • Project: playground
  • Worker identity: sketchi-studio
  • Route policy: playground.sketchi.app product surface; authenticated Studio remains unexposed
  • Preview Worker: sketchi-studio-pr-304
  • Commit: ab9cd3fd44e8
  • Workflow run: https://github.com/shpitdev/sketchi/actions/runs/30596784990

Preview Worker cleanup has completed.

@anandpant
anandpant force-pushed the feat/cli-interactive-generate branch from f0d1391 to f6b377c Compare July 31, 2026 00:44
@anandpant
anandpant force-pushed the feat/cli-interactive-generate branch from f6b377c to 4a80db1 Compare July 31, 2026 01:05
@anandpant
anandpant force-pushed the feat/cli-interactive-generate branch from 4a80db1 to 90efc4f Compare July 31, 2026 01:25
@graphite-app

graphite-app Bot commented Jul 31, 2026

Copy link
Copy Markdown

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
@graphite-app
graphite-app Bot force-pushed the feat/cli-interactive-generate branch from 90efc4f to ab9cd3f Compare July 31, 2026 01:35
@graphite-app
graphite-app Bot merged commit ab9cd3f into main Jul 31, 2026
10 checks passed
@graphite-app
graphite-app Bot deleted the feat/cli-interactive-generate branch July 31, 2026 01:36
@github-actions github-actions Bot mentioned this pull request Jul 31, 2026
graphite-app Bot pushed a commit that referenced this pull request Jul 31, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant