CLI: The Interactive Dev Server igniter dev
The igniter dev
command is your primary tool for running your application during development. It starts a powerful, file-watching development server that automatically reloads your application when you make changes to the code.
While it can be run standalone, its most powerful feature is the interactive mode.
The Interactive Dashboard (--interactive
)
Running the dev server with the --interactive
flag launches a terminal-based dashboard that gives you a real-time, comprehensive view of your entire application stack.
Key Features of the Dashboard:
- Multi-Process View: It manages and displays the output of multiple processes in a single, non-scrolling interface. This typically includes the core Igniter.js watcher and the dev server for your chosen frontend framework (e.g., Next.js).
- API Request Monitor: A dedicated panel logs every incoming API request to your Igniter.js backend in real-time. It shows the HTTP method, path, status code, and response time, making debugging incredibly fast.
- Clear Status Indicators: Each process has a clear status indicator (e.g.,
● Running
,○ Stopped
), so you always know the state of your application at a glance.
How to Use
To start the interactive development server, run the following command from the root of your project:
igniter dev --interactive
Integrating with a Frontend Framework
If your Igniter.js backend is part of a full-stack application (like with Next.js), you can tell the Igniter dev server to manage the frontend dev server process for you.
igniter dev --interactive --framework nextjs
This command will start both the Igniter.js process and the next dev
process, displaying both in the interactive dashboard.
Dashboard Interface Example
The interactive dashboard provides a clean, static view that does not scroll away, making it easy to monitor activity.
Igniter.js Interactive Dashboard
Uptime: 2m 45s | Press h for help
● 1. Igniter ○ 2. Next.js ● 3. API Requests
Status: Running | PID: 12345 | Last: 14:30:25
────────────────────────────────────────────────────────
14:30:23 GET /api/v1/users 200 45ms
14:30:24 POST /api/v1/auth/login 201 120ms
14:30:25 GET /api/v1/health 200 12ms
1-5: Switch process | Tab: Next | c: Clear logs | r: Refresh | h: Help | q: Quit
Navigating the Dashboard
1-5
keys: Switch between the logs of different processes.Tab
: Cycle to the next process view.c
: Clear the logs for the currently selected process.r
: Restart the currently selected process.h
: Show a help menu with available commands.q
: Quit the interactive dashboard and stop all processes.
Using the igniter dev
interactive mode streamlines the development workflow by consolidating all necessary information into a single, easy-to-read terminal window.
Automatic OpenAPI Generation
The igniter dev
command can automatically generate OpenAPI documentation for your API while you develop. This feature analyzes your controllers and creates comprehensive API documentation in real-time.
Basic OpenAPI Generation (--docs
)
To enable automatic OpenAPI generation during development:
igniter dev --docs
This command will:
- Analyze your API routes and generate OpenAPI 3.0 specification
- Serve the documentation UI at
http://localhost:3000/docs
(if your core server is running) - Automatically update the documentation when you modify your controllers
Custom Output Location (--docs-output
)
You can specify where to save the generated OpenAPI specification file:
igniter dev --docs --docs-output ./api-docs/openapi.json
This is useful for:
- Integrating with external documentation tools
- Version controlling your API specification
- Sharing documentation with frontend teams
Standalone Documentation UI (--ui
)
If you want to serve the documentation UI separately from your main application:
igniter dev --docs --ui
This starts a dedicated documentation server, typically at http://localhost:3001/docs
, allowing you to:
- Keep documentation separate from your main application
- Share documentation without exposing your development server
- Customize the documentation server port and configuration
Combined with Interactive Mode
You can combine OpenAPI generation with the interactive dashboard:
igniter dev --interactive --docs --framework nextjs
This provides the full development experience with real-time API documentation generation alongside your application processes.
Note: For detailed configuration options and advanced OpenAPI customization, see igniter generate docs.
Next Steps
- igniter generate - Discover code generation tools
- igniter init - Learn about project scaffolding
- Getting Started - Follow the complete setup guide