Skip to content

CODE-Y02/express-cli

create-express-forge

⚑ Scaffold production-ready Express.js TypeScript backends in seconds

npm version CI License: MIT

Quick Start

npx create-express-forge my-api
# or scaffold in current directory
npx create-express-forge .

What You Get

Interactive prompts let you choose:

Option Choices
Architecture Modular (feature-based) Β· MVC
ORM Prisma Β· Sequelize Β· None
Database PostgreSQL Β· MySQL Β· SQLite Β· None
Logger Winston Β· Pino Β· None
Testing Vitest Β· Jest Β· None
Docker Dockerfile + docker-compose

Generated Project Includes

  • βœ… TypeScript + tsx hot-reload dev server + Path Aliases (@/)
  • βœ… Biome β€” 20x faster linting and formatting (replaces ESLint/Prettier)
  • βœ… Zod env validation on startup β€” fails fast on bad config
  • βœ… Global centralized error handler β€” ApiError, ZodError, unknown errors all handled
  • βœ… Request validation middleware via validate(schema)
  • βœ… ApiError β€” custom class with static factories (.notFound(), .unauthorized(), etc.)
  • βœ… ApiResponse β€” consistent JSON response helpers
  • βœ… asyncHandler β€” wraps async routes, no try/catch needed
  • βœ… Helmet + CORS + compression + rate limiter
  • βœ… Graceful shutdown (SIGTERM / SIGINT)
  • βœ… Multi-stage Dockerfile with healthcheck
  • βœ… docker-compose with correct DB service
  • βœ… Automated OpenAPI (Swagger) β€” Zero-JSDoc documentation via Zod schemas

Repository Structure

create-express-forge/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ create-express-forge/   ← The published CLI
β”‚   β”œβ”€β”€ mcp/                    ← @create-express-forge/mcp Server
β”‚   β”œβ”€β”€ typescript-config/      ← Shared internal TS config
β”‚   └── lint-config/            ← Shared internal Biome/Lint config
β”œβ”€β”€ examples/
β”‚   └── modular-postgres-prisma/ ← Pre-generated example
└── .github/workflows/           ← CI + Release

πŸ€– AI & MCP Integration

Create Express Forge is designed to be AI-friendly. We provide a built-in MCP (Model Context Protocol) server that lets you chat with your AI assistant about the project, fetch documentation, and generate scaffolding commands.

Using the MCP Server

You can run the MCP server directly via npx (recommended) or by building the source.

Option 1: Using npx (Recommended) Add this to your Claude Desktop config or other MCP client:

{
  "mcpServers": {
    "create-express-forge": {
      "command": "npx",
      "args": ["-y", "@create-express-forge/mcp"]
    }
  }
}

Option 2: From Source

  1. Build the project: pnpm build
  2. Add to your MCP Client:
{
  "mcpServers": {
    "create-express-forge": {
      "command": "node",
      "args": ["/absolute/path/to/express-cli/packages/mcp/dist/index.js"]
    }
  }
}

LLM Documentation

We also provide machine-readable documentation files for LLMs:

Legacy Support (v3.x)

Documentation for the legacy v3.x (LTS) version is available at https://code-y02.github.io/express-cli/v3/.

To scaffold a project using v3.x, run:

npx create-express-forge@3.3.2 [project-name]

Contributing

See CONTRIBUTING.md.

Versioning & Branches

Branch npm tag Description
main latest Stable releases
next next Pre-releases / beta

License

MIT Β© Yatharth Lakhate

About

πŸš€ express-cli is a lightweight command-line tool that helps developers quickly create and structure Express.js applications without repetitive setup. Designed for simplicity and speed, it provides a clean starting point so you can focus on building APIs instead of configuring boilerplate.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors