CliCommands

init

Create a new Igniter.js project or install into an existing one. Starters, add-ons, inline option notation, and CLI flags — the complete reference.

igniter init

The init command is the entry point for every Igniter.js project. It handles project creation, starter selection, add-on configuration, dependency installation, Docker setup, and Git initialization — all in a single command.

igniter init [project-name] [options]

Modes

The CLI supports two modes of operation:

ModeTriggerBehavior
new-project (default)igniter init my-appCreates a new directory with a selected starter, then applies add-ons
installigniter init . --mode installAdds Igniter.js to an existing project without overwriting files

In install mode, the CLI auto-detects your framework by checking for next.config.js/next.config.ts (Next.js) or @tanstack/react-start in your package.json (TanStack Start). If neither is found, it defaults to generic.


Options

OptionTypeDefaultDescription
[project-name]stringName of the project directory (positional argument)
--mode"install" | "new-project"new-projectWhether to create a new project or install into existing
--pm, --package-manager"npm" | "yarn" | "pnpm" | "bun"auto-detectedPackage manager override
--templatestringinteractive promptStarter template to use
--add-onsstringComma-separated list of add-ons with optional inline options
--database"none" | "postgresql" | "mysql" | "sqlite"Database provider (shorthand for database add-on)
--no-gitflagfalseSkip Git initialization
--no-installflagfalseSkip automatic dependency installation
--no-dockerflagfalseSkip Docker Compose setup

Available Starters (--template)

ValueNameRuntimeType
nextjsNext.jsNode.jsFull-stack (React + API)
tanstack-startTanStack StartNode.jsFull-stack (React + API)
express-rest-apiExpress REST APINode.jsBackend API
bun-rest-apiBun REST APIBunBackend API
bun-react-appBun React AppBunFull-stack (React + API)
deno-rest-apiDeno REST APIDenoBackend API

Available Add-ons (--add-ons)

ValueNameDescription
databaseDatabasePrisma or Drizzle ORM with PostgreSQL, MySQL, or SQLite
authAuthenticationBetter Auth with 20+ plugin options
jobsJobsBackground job processing
storeStoreRedis-backed key-value store
mcpMCP ServerModel Context Protocol server for AI agents
loggingLoggingStructured logging with Pino
telemetryTelemetryOpenTelemetry tracing, metrics, and events
botsBotsMulti-platform bot setup (Telegram, WhatsApp, Discord)
shadcn-uishadcn/uiUI component library initialization

Interactive Mode

When you run igniter init without flags, the CLI guides you through an interactive setup:

igniter init
# ? What will your project be called? my-saas
# ? Which starter would you like to use? Next.js
# ? What add-ons would you like for your project? database, auth
# ? Which ORM? Prisma
# ? Which database provider? PostgreSQL
# ? Which package manager? pnpm
# ? Setup Docker services for development? Yes
# ? Initialize Git repository? Yes
# ? Install dependencies automatically? Yes

The CLI auto-detects your current package manager from npm_config_user_agent and pre-selects it.


Inline Add-on Options

Add-ons with configurable options support an inline notation for non-interactive use:

--add-ons "addon-name:option1:option2+value2+value3"

Database Add-on

OptionPositionValues
orm1prisma, drizzle
provider2postgresql, mysql, sqlite
# Prisma + PostgreSQL
igniter init app --add-ons "database:prisma:postgresql"

# Drizzle + MySQL
igniter init app --add-ons "database:drizzle:mysql"

# Drizzle + SQLite
igniter init app --add-ons "database:drizzle:sqlite"

Auth Add-on

OptionPositionValues
provider1better-auth
plugins2multi-select: email, two-factor, username, magic-link, passkey, jwt, etc.
# Better Auth with email + magic link + passkey
igniter init app --add-ons "auth:better-auth:email+magic-link+passkey"

# Better Auth with username + two-factor
igniter init app --add-ons "auth:better-auth:username+two-factor"

Multiple Add-ons Combined

# SaaS starter: database + auth + jobs + logging
igniter init my-saas \
  --template nextjs \
  --add-ons "database:prisma:postgresql,auth:better-auth:email+passkey,jobs,logging"

Add-ons without options (like jobs, logging, store) just use their ID. Add-ons with options use the : separator for positional values and + for multi-value selections.


Init Flow (Internal)

When you run igniter init, the CLI executes these steps in order:

1. Collect prompts
   ├── Project name, starter, add-ons
   ├── Add-on options (ORM, provider, plugins)
   └── Package manager, Docker, Git preferences

2. Create project structure
   └── Clone/apply starter template

3. Apply add-ons (in registration order)
   ├── Dependencies → package.json
   ├── Docker services → docker-compose.yml
   ├── Environment variables → .env
   └── Templates → source files

4. Install dependencies (optional)
   └── npm/pnpm/yarn/bun install

5. Docker setup (optional)
   ├── Stop conflicting containers
   ├── Free occupied ports
   └── docker-compose up -d

6. Git initialization (optional)
   ├── git init
   ├── git add .
   └── git commit -m "Initial commit from Igniter.js CLI"

7. Post-install hooks (add-ons)
   └── Run add-on postInstall scripts (requires deps installed)

Examples

Create a Full-Stack SaaS Project

igniter init my-saas \
  --template nextjs \
  --add-ons "database:prisma:postgresql,auth:better-auth:email+magic-link+passkey,jobs,logging,telemetry" \
  --pm pnpm

Create a Minimal Backend API

igniter init my-api \
  --template express-rest-api \
  --add-ons logging \
  --no-docker \
  --no-git

Install into an Existing Next.js Project

cd my-existing-nextjs-app
igniter init . --mode install --add-ons "database:prisma:postgresql"

Create a Bun Project

igniter init my-bun-api \
  --template bun-rest-api \
  --add-ons "database:drizzle:sqlite,logging"

Create a Deno Project

igniter init my-deno-api \
  --template deno-rest-api \
  --add-ons logging,telemetry

Package Manager Detection

The CLI detects your package manager from the npm_config_user_agent environment variable:

User Agent PrefixDetected PMExecutor
yarn/yarnyarn dlx
pnpm/pnpmpnpx
bun/bunbunx
(anything else)npmnpx

If --pm is passed explicitly, it overrides auto-detection.


Framework Detection (Install Mode)

In --mode install, the CLI auto-detects your framework:

Detection RuleFramework
next.config.js or next.config.ts existsnextjs
@tanstack/react-start in package.json dependenciestanstack-start
Neithergeneric

This determines which templates and add-on adapters are used.


Next Steps