next-generate-cli
v1.0.2
Published
Minimal CLI tool to generate Next.js projects with customizable options.
Maintainers
Readme
next-generate-cli
Minimal CLI for Next.js scaffolding. Auto-detects App Router or Pages Router.
Installation
npm install -g next-generate-cliUsage
next-gen page about # Generate a page
next-gen component Button # Generate a component
next-gen api users # Generate an API routeWhat it does
- Page: Creates in
src/app/[name]/page.jsxorsrc/pages/[name].jsx - Component: Creates in
src/components/[name].jsx - API: Creates in
src/app/api/[name]/route.jsorsrc/pages/api/[name].js
Automatically detects which router you're using based on your project structure.
License
MIT
