create-nestforge
v1.5.0
Published
Interactive CLI to scaffold a NestJS starter project.
Maintainers
Readme
NestForge Starter
create-nestforge scaffolds a production-ready NestJS backend from the command
line. Answer a couple of prompts and you get a working application you can build
on top of — Express + REST or Express + GraphQL (Apollo), Redis-backed sessions,
and no-op persistence so it boots before you've written a line.
Usage
npx create-nestforge@latestYou will be asked for a project name and which variant to scaffold. The project
is created in the current directory, named after the project. The CLI copies
the template (layering the GraphQL overlay when selected), sets the package
name, and creates a .env from the example.
Non-interactive
Pass the same options as flags for automation and CI:
npx create-nestforge@latest --project-name my-app --variant graphqlAvailable flags:
| Flag | Description |
| --- | --- |
| --help | Show help message and exit |
| --version | Print version and exit |
| --project-name | Project name (defaults to an interactive prompt) |
| --oauth-providers | Comma-separated provider list: google,github |
| --variant | rest or graphql (defaults to an interactive prompt, then rest) |
| --target-dir | Override where the project is created (defaults to ./<project-name>) |
| --git | Initialize a git repository (default) |
| --no-git | Skip git initialization |
Running the generated project
cd my-app
pnpm install
cp .env.example .env
pnpm start:devThe app runs at http://localhost:3000, with interactive docs at
http://localhost:3000/api-docs (Scalar on top of the Swagger/OpenAPI document). Docker users can skip local setup entirely:
docker compose up --buildWhat you get
- Express + REST with URI versioning (
/api/v1), or Express + GraphQL with an Apollo code-first/graphqlendpoint - Auth-ready: Passport local + Google OAuth, Redis-backed sessions
- WebSocket gateway with gated, session-authenticated connections
- BullMQ background jobs, mailer with Handlebars templates
- Security baseline: Helmet, CSRF double-submit cookies, global rate limiting
- Swagger/Scalar docs, Terminus health checks, Winston logging
- Boots without a database (no-op persistence stub)
Documentation
- GitHub — source, docs, and the landing site
License
MIT © Mouloud Hasrane
