1.1.9 • Published 8 months ago

next-genkit v1.1.9

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Next-GenKit šŸš€

A powerful CLI tool for generating Next.js app router pages and API routes with ease.

npm version License: MIT Downloads


🌟 Features

  • šŸ“„ 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

šŸš€ Installation & Usage

Using npx (Recommended - No Installation Required)

npx next-genkit generate

You'll be prompted to:

  1. Choose your preferred language (TypeScript/JavaScript)
  2. Select what to generate (Page/API Route)
  3. Enter the route path
  4. Configure Tailwind CSS (for pages)

šŸ“ Examples

Creating a New Page

$ 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

Creating an API Route

$ 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

šŸ“¦ Generated Files

Page Template

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>
  );
}

API Route Template

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 });
}

āš™ļø Requirements

  • Node.js 14.0.0 or newer
  • Next.js 13.0.0 or newer (using App Router)
  • npm or yarn package manager

šŸ“ License

This project is licensed under the MIT License.

šŸ™‹ā€ā™‚ļø Author

Hayden Wadsworth

šŸ”„ Changelog

1.1.9

  • Initial release
  • Basic page and API route generation
  • TypeScript and JavaScript support
  • Tailwind CSS integration

1.1.9

8 months ago

1.1.8

8 months ago

1.1.7

8 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.0

8 months ago

1.0.0

8 months ago