- 📄 Generate Next.js pages with modern layouts
- 🔌 Create API routes with pre-configured handlers
- 🎯 TypeScript and JavaScript support
- 🎨 Tailwind CSS integration
- 💻 Interactive CLI experience
- ⚡ Lightning fast setup
- 🎭 Clean and consistent code generation
npx next-genkit generate
You'll be prompted to:
- Choose your preferred language (TypeScript/JavaScript)
- Select what to generate (Page/API Route)
- Enter the route path
- Configure Tailwind CSS (for pages)
$ next-genkit generate
? Which language are you using? TypeScript
? What would you like to generate? Page
? Enter the route path: blog/[slug]
? Are you using Tailwind CSS? Yes
✨ Created page at: app/blog/[slug]/page.tsx
$ next-genkit generate
? Which language are you using? TypeScript
? What would you like to generate? API Route
? Enter the route path: api/users
✨ Created API route at: app/api/users/route.ts
export default function Page() {
return (
<div className="min-h-screen bg-gray-100 py-12 px-4 sm:px-6 lg:px-8">
<div className="max-w-7xl mx-auto">
<div className="text-center">
<h1 className="text-4xl font-bold tracking-tight text-gray-900">
New Page
</h1>
<p className="mt-4 text-lg text-gray-500">
Edit this page in app/page.tsx
</p>
</div>
</div>
</div>
);
}
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json({ message: "Hello from the API" });
}
export async function POST(request: Request) {
const data = await request.json();
return NextResponse.json({ message: "Success", data });
}
- Node.js 14.0.0 or newer
- Next.js 13.0.0 or newer (using App Router)
- npm or yarn package manager
This project is licensed under the MIT License.
Hayden Wadsworth
- Initial release
- Basic page and API route generation
- TypeScript and JavaScript support
- Tailwind CSS integration
Made with ❤️ by Hayden Wadsworth