feat(cli): add --sdui flag to ag init#431
Merged
roblevintennis merged 1 commit intomasterfrom Mar 21, 2026
Merged
Conversation
Adds --sdui to the init command so users can go from impressed by the
SDUI demo to a working scaffold in a single command:
npx agnosticui-cli init -f react --sdui
When the flag is set, after standard init completes, scaffoldSdui():
- Creates src/sdui/fixture.ts with a minimal 4-node contact form
- Creates src/sdui/SduiDemo.{tsx|vue|ts} wired to AgDynamicRenderer
and a simple dark-mode toggle, for all three frameworks
- Installs @agnosticui/render-{framework} + @agnosticui/schema
(gracefully degrades with a manual-install hint if packages are
not yet on npm)
- Prints a "SDUI Scaffold Ready" box with import/usage instructions
Closes #423
✅ Deploy Preview for agnosticui-demo-vue ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
5 tasks
✅ Deploy Preview for agnosticui-demo-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for agnosticui-demo-lit ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--sduiflag toag init(alongside existing-f/--framework)src/sdui/fixture.ts— 4-node contact form as anAgNode[]src/sdui/SduiDemo.tsx/SduiDemo.vue/SduiDemo.ts—AgDynamicRendererwired to the fixture with a dark-mode toggle, for all three frameworks@agnosticui/render-{framework}+@agnosticui/schema(gracefully degrades with a manual-install hint if packages aren't yet on npm)Test plan
init.test.tscovering all three frameworks and the no-flag case (829 total passing)ag init --framework react --sduismoke test in/tmpwith freshagnosticui-core-2.0.0-alpha.24.tgzSduiDemo.tsx+fixture.tstype-checked withtscagainst local@agnosticui/render-react+@agnosticui/schema— 0 errorsSduiDemo.ts+fixture.tstype-checked withtsc— 0 errorsSduiDemo.vuestructure verified; fixture.ts type-checks cleanNotes
Full end-to-end (
npx agnosticui-cli init --sdui) requires the renderer/schema packages to be published to npm. Tracked in a follow-up issue.Closes #423
🤖 Generated with Claude Code