Skip to content

feat(app): compile JSONC diagrams#17

Open
douglance wants to merge 1 commit into
benvinegar:mainfrom
douglance:feat/compile-jsonc-diagrams
Open

feat(app): compile JSONC diagrams#17
douglance wants to merge 1 commit into
benvinegar:mainfrom
douglance:feat/compile-jsonc-diagrams

Conversation

@douglance
Copy link
Copy Markdown

Summary

  • add termdraw compile for rendering JSONC diagram documents without opening the interactive editor
  • support file/stdin input plus plain or fenced terminal-text output
  • document the JSONC workflow and render a README architecture diagram through the new compiler

Details

The compiler maps a compact JSONC document into retained DrawState objects for boxes, lines, paint strokes, and text, then exports through the existing terminal-text rendering path. The app CLI keeps the existing interactive default behavior and routes the new compile subcommand separately.

Testing

  • bun run check
  • bun run build
  • cd packages/app && bun run src/cli.tsx compile ../../docs/examples/architecture.diagram.jsonc

@douglance douglance marked this pull request as ready for review April 25, 2026 18:27
@benvinegar
Copy link
Copy Markdown
Owner

Was this to be able to save/restore diagrams? Is it covered by #19?

@douglance
Copy link
Copy Markdown
Author

@benvinegar this is for having non-tui interactions.

I wanted a way for the agent to be able to iterate on a design without a human in the loop.

Happy to update the PR and resolve conflicts if that's something you'd like to maintain here. 😄

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.

2 participants