Commands & Flags
The koko init Command
The primary command to scaffold a new workspace on your local machine:
Syntax: `koko init [project-name] [flags]`
koko init my-project Complete Flags Reference
All supported flags for automating project generation without interactive prompts:
Instantly bootstraps using the default recipe (SaaS Starter with Next.js + Drizzle + Better-Auth).
Chooses a production blueprint recipe: saas, pern, mern, fastapi_react, enterprise_nestjs, java_spring, mobile_expo.
Frontend framework: nextjs, react, nuxt, svelte, astro, native, none.
Backend runtime: express, hono, fastapi, go_chi, spring_boot, nestjs, self, none.
Typed API layer: trpc, orpc, none.
Package manager: pnpm, npm, bun, go_mod, pip, uv, mvn, gradle.
Database server: postgres, mongodb, mysql, sqlite, none.
ORM or query tool: drizzle, prisma, mongoose, sqlalchemy, gorm, jpa, none.
Authentication provider: better-auth, clerk, next-auth, none.
Comma-separated addons: shadcn, lucide, svgl, motion, stripe, polar, resend, brevo, zod, docker, github_actions.
Initialize local Git repository (default: no in headless CLI mode).
CI/CD & Scripting Examples
Integrate Koko CLI into bash scripts, Makefiles, or CI/CD pipelines for automated scaffolding:
Dynamic Addon Injection (koko add)
The `koko add <addon>` subcommand allows you to inject payment, authentication, email, or UI services into an existing Koko workspace weeks or months after creation, without manual wiring.
- stripe - Global payment processing with Stripe (injects STRIPE_SECRET_KEY and NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY).
- polar - Developer-first payment integration with Polar.sh.
- resend - Transactional email delivery powered by Resend SDK.
- brevo - Marketing and transactional email engine with Brevo.
- shadcn - Base UI component primitives and Tailwind CSS utilities.
- lucide - Official Lucide Icons icon pack.
- zod - Strict runtime validation and type-safety with Zod.
- docker - Containerized developer infrastructure via docker-compose.yml.
- github_actions - CI/CD pipeline workflows for linting, testing, and integrity checks.
# Example: Inject Stripe payments into an existing project
koko add stripe
# Example: Add transactional email service with Resend
koko add resend
# Example: Incorporate shadcn/ui components
koko add shadcn The koko doctor Command
Diagnoses project architecture, detects discrepancies and drift against koko.config.json, and synchronizes manifest automatically. For an extensive deep-dive with CI/CD recipes, explore our dedicated Diagnostics guide.
Automatically apply detected fixes and update koko.config.json.
Target project directory to analyze (default: .).
Output comprehensive diagnostic trace for each module.
Structured machine-readable output for automated CI/CD pipelines.
# Run project diagnostics
koko doctor
# Diagnose and auto-repair koko.config.json
koko doctor --fix The koko version Command
Prints detailed build information, semantic version, operating system, architecture, and Go runtime version:
koko version