-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
feat(cli): add generate command for boilerplate code generation #8674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Pawandasila
commented
Nov 1, 2025
- Add new 'generate' command to CLI with alias 'gen'
- Support 7 types: component, hook, util, context, page, layout, api
- Auto-format names (PascalCase for components, camelCase for hooks)
- Generate files in appropriate default directories
- Include comprehensive tests for command structure
- Add documentation to cli.mdx and README.md
- Provide helpful next-steps after generation
- Add new 'generate' command to CLI with alias 'gen' - Support 7 types: component, hook, util, context, page, layout, api - Auto-format names (PascalCase for components, camelCase for hooks) - Generate files in appropriate default directories - Include comprehensive tests for command structure - Add documentation to cli.mdx and README.md - Provide helpful next-steps after generation
|
@Pawandasila is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
|
@Pawandasila, hi. |
|
Hi! Thanks for the feedback, I really appreciate it. 🙏 That's a great point about registry-level vs core CLI functionality. Let me share my thinking: My reasoning for core CLI:
However, I see your point about registry templates:
I'm definitely open to moving this to a registry template if that aligns better with the project's vision. What do @shadcn and other maintainers think? Also, could you share a link to your registry implementation? I'd like to see how you approached it! 👀 |
|
@Pawandasila Here’s how I implemented it on my side: |
|
Thanks for sharing! I see the difference now your scripts are for building registries, mine is for end-users scaffolding in their apps. Valid point about architecture. Let's see what @shadcn thinks about the best place for this functionality. Open to moving it wherever makes most sense! 👍 |
|
@Pawandasila This is something that we definitely need. I have this on the roadmap. However there's something else I need to get done first before we do this. Let's keep this open. I'll ping you soonish and we can get this going. Appreciate you working on this. We'll collab. |
|
Thanks @shadcn ! Really appreciate the feedback. I'm excited to collaborate on this! I'll keep the PR open and ready to iterate based on your guidance. Just ping me whenever you're ready and I'm happy to:
Looking forward to working together on this! 🙏 |