CLI

@contract-kit/cli creates new Contract Kit apps and gives the framework a place for maintenance commands over time.

Create a new app

bunx -p @contract-kit/cli contract-kit create my-app

By default the generated app uses the standard preset:

Choose a preset

Presets describe the kind of app you want to start from. Integrations stay separate, so you only add the services your app needs.

bunx -p @contract-kit/cli contract-kit create my-app --preset standard
PresetIncludes
minimalContracts, ports, use cases, server wiring, and API routes
standardminimal plus typed client, React Query, React Hook Form, and OpenAPI
productionOpinionated production starter with app errors, env validation, devtools, provider wiring, health checks, and separated ports/infrastructure

Use minimal when you want API routes and contracts only:

bunx -p @contract-kit/cli contract-kit create my-api --preset minimal

Use standard when you want a simple full-stack app:

bunx -p @contract-kit/cli contract-kit create my-app --preset standard

Use production when you want the recommended production architecture:

bunx -p @contract-kit/cli contract-kit create my-app --preset production

Choose features

Features are framework capabilities layered onto the base app.

bunx -p @contract-kit/cli contract-kit create my-app \
  --preset minimal \
  --features client,openapi

Available features:

FeatureAdds
clientA typed Contract Kit HTTP client
react-queryTanStack Query provider and contract query helpers
formsReact Hook Form wired to the contract body schema
openapi/api/openapi route generated from contracts

Choose integrations

Integrations add provider packages, setup notes, env examples, and provider wiring where the provider can run without app-specific infrastructure.

bunx -p @contract-kit/cli contract-kit create my-app \
  --integrations drizzle-turso,inngest,pino

You can also repeat --integration:

bunx -p @contract-kit/cli contract-kit create my-app \
  --integration inngest \
  --integration resend

Selected integrations add the provider package, required peer dependencies, .env.example, and setup notes in docs/integrations.md.

For a production starter with extra services, compose the preset and integrations explicitly:

bunx -p @contract-kit/cli contract-kit create my-app \
  --preset production \
  --integrations drizzle-turso,inngest,resend,upstash-rate-limit

Available integrations:

IntegrationAdds
better-auth@contract-kit/provider-auth-better-auth, better-auth, and notes for replacing the production starter's anonymous AuthPort
drizzle-turso@contract-kit/provider-drizzle-turso, @libsql/client, drizzle-orm, drizzle-kit, and production persistence scaffolding
inngest@contract-kit/provider-inngest and inngest
pino@contract-kit/provider-logger-pino and pino
resend@contract-kit/provider-mail-resend and resend
upstash-rate-limit@contract-kit/provider-rate-limit-upstash, @upstash/ratelimit, and @upstash/redis

Options

contract-kit create <directory> [options]
OptionDescription
--template nextSelects the app template. next is the only template today.
--preset standardSelects minimal, standard, or production. Defaults to standard.
--package-manager bunControls the package manager shown in next steps.
--feature <name>Adds one feature. Repeatable.
--features <names>Adds features from a comma-separated list.
--integration <name>Adds one integration. Repeatable.
--integrations <names>Adds integrations from a comma-separated list.
--forceWrites into a non-empty directory.