### Setup Script
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/README.md
Runs the initial setup script for the project, which may include installing dependencies or configuring environment variables.
```bash
pnpm setup
```
--------------------------------
### Configure and Run App
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
After creating the app, copy the example environment file, start the Docker Compose services, apply database migrations, and run the development server.
```bash
cp env.example .env
docker compose up -d
pnpm db:migrate
pnpm dev
```
--------------------------------
### Starter Prompt for Coding Agent
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
Use this as the initial message to your coding agent after installing the starter kit. It guides the agent on how to approach planning and implementation, emphasizing the replacement of boilerplate code and adherence to project instructions.
```text
I am using the Agentic Coding Starter Kit. Treat the existing app as boilerplate that should be replaced by the product I describe.
Use the project instructions in AGENTS.md or CLAUDE.md. During planning, ask clarifying questions before making assumptions. During implementation, split the work into small chunks, use sub-agents where useful, follow DESIGN.md for UI, preserve the existing tech stack unless there is a good reason to change it, and run lint, typecheck, and build before finishing.
What I want to build:
[Describe your app here]
```
--------------------------------
### Example App Description for Starter Prompt
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
An example of how to describe the desired application within the starter prompt.
```text
What I want to build:
A lightweight CRM for solo consultants. It should let users manage clients, track deals, write notes, set follow-up reminders, and view a simple dashboard of open opportunities.
```
--------------------------------
### Non-Interactive Setup Skipping Install and Git
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/README.md
Scaffold a project non-interactively, skipping dependency installation and Git repository initialization for faster setup.
```bash
npx create-agentic-app@latest my-app -y -p npm --skip-install --skip-git
```
--------------------------------
### Install react-markdown
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/docs/technical/react-markdown.md
Install the react-markdown package using npm.
```sh
npm install react-markdown
```
--------------------------------
### Install AI SDK Dependencies (bun)
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/docs/technical/ai/streaming.md
Install the AI SDK, its React hooks, and the OpenRouter provider using bun. Zod is also included for data validation.
```bash
bun add ai @ai-sdk/react @openrouter/ai-sdk-provider zod
```
--------------------------------
### Environment Variables Example
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
Example environment variables for configuring the database, authentication, AI integration, and file storage. Update these values for your specific environment.
```env
# Database
POSTGRES_URL=postgresql://dev_user:dev_password@localhost:5432/postgres_dev
# Authentication - Better Auth
BETTER_AUTH_SECRET=your-random-secret
# AI Integration via OpenRouter
OPENROUTER_API_KEY=
OPENROUTER_MODEL="openai/gpt-5-mini"
# Optional - for vector search only
OPENAI_EMBEDDING_MODEL="text-embedding-3-large"
# App URL
NEXT_PUBLIC_APP_URL="http://localhost:3000"
# File storage
BLOB_READ_WRITE_TOKEN=
# Polar payment processing
POLAR_WEBHOOK_SECRET=polar_
POLAR_ACCESS_TOKEN=polar_
```
--------------------------------
### Agent Instruction Prompt
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
Example prompt to instruct a coding agent to add Google OAuth to the existing Better Auth setup. This includes enabling email/password login, adding the Google provider, updating the UI, and documenting environment variables.
```text
Add Google OAuth to this Better Auth setup. Keep email/password login enabled, add the Google provider, update the auth UI, and document the required Google environment variables.
```
--------------------------------
### Start and Migrate Database Locally
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
Use these commands to start the PostgreSQL database in detached mode and apply database migrations for local development.
```bash
docker compose up -d
pnpm db:migrate
```
--------------------------------
### Production Server Script
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/README.md
Starts the production-ready server after the project has been built.
```bash
pnpm start
```
--------------------------------
### Install AI SDK Dependencies (yarn)
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/docs/technical/ai/streaming.md
Install the AI SDK, its React hooks, and the OpenRouter provider using yarn. Zod is also included for data validation.
```bash
yarn add ai @ai-sdk/react @openrouter/ai-sdk-provider zod
```
--------------------------------
### Install AI SDK Dependencies
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/docs/technical/ai/streaming.md
Install the AI SDK, its React hooks, the OpenRouter provider, and Zod for schema validation. Choose the package manager that suits your project.
```bash
pnpm add ai @ai-sdk/react @openrouter/ai-sdk-provider zod
```
```bash
npm install ai @ai-sdk/react @openrouter/ai-sdk-provider zod
```
```bash
yarn add ai @ai-sdk/react @openrouter/ai-sdk-provider zod
```
```bash
bun add ai @ai-sdk/react @openrouter/ai-sdk-provider zod
```
--------------------------------
### Install AI SDK Dependencies (npm)
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/docs/technical/ai/streaming.md
Install the AI SDK, its React hooks, and the OpenRouter provider using npm. Zod is also included for data validation.
```bash
npm install ai @ai-sdk/react @openrouter/ai-sdk-provider zod
```
--------------------------------
### Install Polar Dependencies
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/docs/technical/betterauth/polar.md
Install the necessary packages for Better Auth and Polar integration using pnpm.
```bash
pnpm add better-auth @polar-sh/better-auth @polar-sh/sdk
```
--------------------------------
### Agent Request for Spec Creation
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
Example agent request to create a specification for a feature, emphasizing parallel implementation waves and manual setup steps.
```text
Create a spec for the billing and subscriptions feature we just planned. Break it into parallel implementation waves and include any manual setup steps.
```
--------------------------------
### Deploy to Vercel
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
Install the Vercel CLI and deploy the application to production. Ensure all required production environment variables are set.
```bash
npm install -g vercel
vercel --prod
```
--------------------------------
### Start PostgreSQL Database
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
If the application cannot connect to Postgres, confirm Docker is running and use this command to start the database service.
```bash
docker compose up -d
```
--------------------------------
### Install AI SDK Dependencies (pnpm)
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/docs/technical/ai/streaming.md
Install the AI SDK, its React hooks, and the OpenRouter provider using pnpm. Zod is also included for data validation.
```bash
pnpm add ai @ai-sdk/react @openrouter/ai-sdk-provider zod
```
--------------------------------
### Run the Chatbot Application
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/docs/technical/ai/streaming.md
Start your Next.js application using the provided command to test the chatbot interface. Access it via http://localhost:3000 in your browser.
```bash
pnpm run dev
```
--------------------------------
### Development Server Script
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/README.md
Starts the development server using Turbopack for fast hot-reloading.
```bash
pnpm dev
```
--------------------------------
### Auth Route Handler Setup
Source: https://context7.com/leonvanzyl/agentic-coding-starter-kit/llms.txt
Mounts the Better Auth HTTP surface under `/api/auth/` for handling sign-in, sign-up, sign-out, sessions, OAuth callbacks, password reset, and email verification. This setup requires no changes as it's already wired up.
```typescript
// src/app/api/auth/[...all]/route.ts (already wired up — no changes needed)
import { toNextJsHandler } from "better-auth/next-js";
import { auth } from "@/lib/auth";
export const { GET, POST } = toNextJsHandler(auth);
// Example HTTP calls handled automatically:
// POST /api/auth/sign-in/email { email, password }
// POST /api/auth/sign-up/email { name, email, password }
// POST /api/auth/sign-out
// GET /api/auth/session → { user, session } | null
// POST /api/auth/forget-password { email, redirectTo }
// POST /api/auth/reset-password { token, newPassword }
// GET /api/auth/verify-email?token=…
// Verify the route is responding:
curl http://localhost:3000/api/auth/session
# → {"user":null,"session":null} (when not logged in)
```
--------------------------------
### Example Agent Skill Invocations (Claude Code)
Source: https://context7.com/leonvanzyl/agentic-coding-starter-kit/llms.txt
Illustrates how to invoke specific agent skills using a command-line interface. These examples show the command and a brief description of the expected outcome.
```text
/create-spec
# Then describe the feature; the agent writes specs/{feature}/README.md,
# requirements.md, tasks/*.md, and action-required.md.
```
```text
/implement-feature
# Reads the spec and implements wave by wave, pausing for review between waves.
```
```text
/ship-it
# Runs: pnpm lint && pnpm typecheck && pnpm build
# Reports errors and suggests fixes before deployment.
```
--------------------------------
### Scaffold New Project with create-agentic-app CLI
Source: https://context7.com/leonvanzyl/agentic-coding-starter-kit/llms.txt
Use this CLI to bootstrap a new Next.js project with an agentic development workflow. It handles template copying and dependency installation. Customize with flags for package manager, skipping install, or skipping git initialization.
```bash
npx create-agentic-app@latest my-app
cd my-app
```
```bash
npx create-agentic-app@latest . --package-manager pnpm --yes
```
```bash
npx create-agentic-app@latest my-app --skip-install --skip-git
```
```bash
cp env.example .env # fill in POSTGRES_URL, BETTER_AUTH_SECRET, etc.
docker compose up -d # start local PostgreSQL
pnpm db:migrate # apply Drizzle migrations
pnpm dev # start Next.js dev server at http://localhost:3000
```
--------------------------------
### Available Scripts (npm/pnpm)
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/README.md
Lists common scripts available for development, building, linting, type checking, formatting, database operations, and setup.
```bash
pnpm dev # Start the development server with Turbopack
pnpm build # Run migrations, then build for production
pnpm build:ci # Build without running migrations
pnpm start # Start the production server
pnpm lint # Run ESLint
pnpm typecheck # Run TypeScript without emitting files
pnpm check # Run lint and typecheck
pnpm format # Format the repository
pnpm format:check # Check formatting
pnpm setup # Run the setup script
pnpm db:generate # Generate Drizzle migrations
pnpm db:migrate # Run Drizzle migrations
pnpm db:studio # Open Drizzle Studio
```
--------------------------------
### Clear npx Cache and Install Latest
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/README.md
Instruct users to clear their npx cache and install the latest version of the create-agentic-app package if they are encountering issues with old versions.
```bash
npx clear-npx-cache
npx create-agentic-app@latest my-project
# or use specific version
npx create-agentic-app@1.1.4 my-project
```
--------------------------------
### React Markdown with GitHub Flavored Markdown Example
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/docs/technical/react-markdown.md
Demonstrates using remark-gfm for task lists and tables in markdown.
```js
import Markdown from "react-markdown";
import remarkGfm from "remark-gfm";
const markdown = `
* [x] todo
* [ ] done
| Column 1 | Column 2 |
|----------|----------|
| Cell 1 | Cell 2 |
`;
{completed}/{steps.length} completed
...checklist items stay the same...
{data ? (
{JSON.stringify(part, null, 2)}
);
}
})}
{JSON.stringify(part, null, 2)}
);
}
})}
Hello, {session.user.name}
; } // Sign out await signOut(); // Request a password reset (link logged to terminal in dev) await requestPasswordReset({ email: "alice@example.com", redirectTo: "/reset-password" }); // Confirm the reset with the token from the URL await resetPassword({ token: searchParams.get("token")!, newPassword: "newpassword" }); ``` -------------------------------- ### Complete Publishing Workflow Commands Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/README.md A concise sequence of commands for maintainers to sync the template, update the version, and publish the package to npm. ```bash cd create-agentic-app npm run sync npm version patch npm publish ``` -------------------------------- ### Define Better Auth Database Schema with Drizzle Source: https://context7.com/leonvanzyl/agentic-coding-starter-kit/llms.txt Defines the core Drizzle schema for Better Auth tables (`user`, `session`, `account`, `verification`). Uses `text` primary keys for auth tables as required by Better Auth, and suggests `uuid` for custom app tables. Includes setup for indexes and timestamps. ```typescript import { pgTable, text, timestamp, boolean, index } from "drizzle-orm/pg-core"; // Built-in auth tables (do not rename or remove columns) export const user = pgTable("user", { id: text("id").primaryKey(), // managed by Better Auth name: text("name").notNull(), email: text("email").notNull().unique(), emailVerified: boolean("email_verified").default(false).notNull(), image: text("image"), createdAt: timestamp("created_at").defaultNow().notNull(), updatedAt: timestamp("updated_at").defaultNow().$onUpdate(() => new Date()).notNull(), }, (t) => [ index("user_email_idx").on(t.email) ]); // Extend the schema with your own tables using UUIDs: // import { uuid } from "drizzle-orm/pg-core"; // // export const post = pgTable("post", { // id: uuid("id").primaryKey().defaultRandom(), // title: text("title").notNull(), // authorId: text("author_id").notNull().references(() => user.id, { onDelete: "cascade" }), // createdAt: timestamp("created_at").defaultNow().notNull(), // }); // // Then: pnpm db:generate && pnpm db:migrate ``` -------------------------------- ### Initialize Checkout Session Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/docs/technical/betterauth/polar.md Initiate a checkout session using the `authClient.checkout` method. You can provide product IDs or slugs, and optionally a reference ID for organization tracking. ```APIDOC ## Initialize Checkout Session ### Description Initiate a checkout session using the `authClient.checkout` method. You can provide product IDs or slugs, and optionally a reference ID for organization tracking. ### Method `authClient.checkout(options)` ### Parameters #### Request Body - **products** (string[]) - Required - Array of Polar Product IDs. - **slug** (string) - Optional - The slug of a product defined in the Checkout Config. - **referenceId** (string) - Optional - A reference ID to associate with the checkout, order, and subscription. ### Request Example (Product ID) ```typescript await authClient.checkout({ products: ["e651f46d-ac20-4f26-b769-ad088b123df2"] }); ``` ### Request Example (Slug) ```typescript await authClient.checkout({ slug: "pro" }); ``` ### Request Example (with Organization Support) ```typescript const organizationId = (await authClient.organization.list())?.data?.[0]?.id; await authClient.checkout({ products: ["e651f46d-ac20-4f26-b769-ad088b123df2"], slug: 'pro', referenceId: organizationId }); ``` ``` -------------------------------- ### Publish Package to npm Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/README.md Navigate to the package directory and run this command to publish the agentic-app package to npm. ```bash cd create-agentic-app npm publish ``` -------------------------------- ### Dry Run Package Contents Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/README.md Before publishing, use this command to list the files that will be included in the npm package, allowing for verification. ```bash npm pack --dry-run | grep "template/" ``` -------------------------------- ### Create Next.js App Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/docs/technical/ai/streaming.md Use this command to create a new Next.js application with the App Router and Tailwind CSS. ```bash pnpm create next-app@latest my-ai-app ``` -------------------------------- ### Configure Better Auth Server with Drizzle and Email/Password Source: https://context7.com/leonvanzyl/agentic-coding-starter-kit/llms.txt Sets up the Better Auth server using the Drizzle adapter for PostgreSQL. Enables email/password login and email verification. In development, password reset and verification emails are logged to the console; replace these callbacks with a real email provider for production. ```typescript import { betterAuth } from "better-auth"; import { drizzleAdapter } from "better-auth/adapters/drizzle"; import { db } from "./db"; export const auth = betterAuth({ database: drizzleAdapter(db, { provider: "pg" }), emailAndPassword: { enabled: true, sendResetPassword: async ({ user, url }) => { // In production: send an email via Resend, Postmark, etc. // In development: the reset URL is printed to the terminal. console.log(`PASSWORD RESET for ${user.name}: ${url}`); }, }, emailVerification: { sendOnSignUp: true, sendVerificationEmail: async ({ user, url }) => { console.log(`EMAIL VERIFICATION for ${user.name}: ${url}`); }, }, }); // To add Google OAuth: // import { googleProvider } from "better-auth/providers/google"; // export const auth = betterAuth({ // ... // socialProviders: { // google: { // clientId: process.env.GOOGLE_CLIENT_ID!, // clientSecret: process.env.GOOGLE_CLIENT_SECRET!, // }, // }, // }); ``` -------------------------------- ### Grid Layout for Quick Actions Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/DESIGN.md Defines a responsive grid for quick action items, using three columns on medium screens and one on smaller screens. ```html grid grid-cols-1 md:grid-cols-3 gap-4 ``` -------------------------------- ### Drizzle Studio Script Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/README.md Opens the Drizzle Studio GUI for inspecting and interacting with the database. ```bash pnpm db:studio ``` -------------------------------- ### Initialize Checkout Session Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/docs/technical/betterauth/polar.md Initiate a checkout session using the BetterAuth client. This can be done by passing Polar Product IDs or configured slugs. The user will be redirected to the product checkout. ```typescript await authClient.checkout({ // Any Polar Product ID can be passed here products: ["e651f46d-ac20-4f26-b769-ad088b123df2"], // Or, if you setup "products" in the Checkout Config, you can pass the slug slug: "pro", }); ``` -------------------------------- ### Import tw-animate-css Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/create-agentic-app/template/specs/ui-polish-responsive/tasks/task-01-globals-css.md Import the tw-animate-css package after the tailwindcss import to enable its animation utilities. ```css @import "tailwindcss"; @import "tw-animate-css"; ``` -------------------------------- ### Code Formatting Script Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/blob/master/README.md Formats the entire repository according to the defined code style. ```bash pnpm format ```