TypeScript backend generator CLI

Scaffold a backend from the command line.

StartXKit is a TypeScript CLI toolkit for generating Express, Fastify, and Hono boilerplates. Run one create command, choose the project shape, then add feature modules as your API grows.

TypeScript only todayNo database lock-inExpress, Fastify, Hono
terminal

$ npm create @startxkit@latest

Welcome to StartXKit

Project name: my-api

Framework: Fastify

Architecture: Layered

API prefix: /api/v1

Validation: Zod

Logger: Pino

$ npx @startxkit/cli add module users

Generated files: 6

generated tree

my-api/

src/

server.ts

app.ts

modules/

health/

users/

users.route.ts

users.controller.ts

users.service.ts

users.repository.ts

routes/index.ts

startxkit.config.json

package.json

CLI workflow

Commands this repo actually ships

Read the docs
npm create @startxkit@latest

Create a backend

Launches the interactive scaffold flow for a new TypeScript API.

npx @startxkit/cli add module users

Add a module

Generates route, controller, service, repository, interface, and validation files based on the selected layer.

npx @startxkit/cli doctor

Check the project

Validates StartXKit config, framework, architecture, package manager, and module directory.

npx @startxkit/cli info

Print project info

Shows framework, language, architecture, module directory, API prefix, and validation choices.

The create flow is the main product.

StartXKit asks for the framework, architecture, API prefix, package manager, and optional features, then writes a runnable project with a health module and config file.

npm create @startxkit@latest
Project name
Framework: Express, Fastify, Hono
Architecture: Minimal, Modular, Layered
API prefix: /api/v1, /api, none, custom
Package manager: pnpm, npm, yarn, bun
Optional CORS, env config, Zod, logger, Docker, Vitest

Interactive setup

A create command asks the right project questions and writes a runnable backend.

Architecture presets

Choose minimal, modular, or layered structure before files are generated.

Optional plumbing

Generate CORS, env config, validation, logging, error handling, Docker, and tests when needed.

Module generator

Add feature modules later without manually wiring route registration.

Framework-native output

Generated projects stay close to Express, Fastify, or Hono instead of hiding behind a runtime.

Clear MVP boundary

No auth, database, ORM, Prisma, Drizzle, Mongoose, OAuth, JWT, or sessions yet.

MVP scope is intentional

Start with backend structure, not auth or database opinions.

The current CLI generates simple request/response handlers, modules, docs, config, and project scaffolds. Auth, databases, ORMs, Prisma, Drizzle, Mongoose, JWT, OAuth, and sessions are roadmap items.

View roadmap