Lighthouse Package
Terminal UI for local development management
The @serverless-monolith/lighthouse package provides an interactive terminal user interface (TUI) for managing your Serverless Monolith development environment.
Installation
pnpm add @serverless-monolith/lighthouse
Features
- Interactive TUI: Beautiful terminal interface built with React and Ink
- Process Management: Start, stop, and restart your services
- Bruno Integration: Execute API requests from Bruno collections
- Real-time Logs: Stream logs from all running processes
- Dashboards: Monitor status, queues, and metrics
- Keyboard Shortcuts: Efficient navigation and control
Quick Start
Create Configuration
// lighthouse.config.ts
import { defineLighthouseConfig } from '@serverless-monolith/lighthouse';
export default defineLighthouseConfig({
proxy: {
port: 5454,
cors: true,
logRequests: true,
},
brunoPath: './bruno',
coreGroups: [
{
coreName: 'my-service',
baseUrl: 'http://localhost:4005',
routes: [
{ name: 'api', pathPrefix: '/api/http/' },
],
},
],
processes: [
{
id: 'my-service',
name: 'My Service',
command: 'pnpm',
args: ['dev'],
cwd: './my-service',
mode: 'auto',
healthCheck: { // Required
url: 'http://localhost:4005/health',
interval: 5000,
},
},
],
});
Start Lighthouse
lighthouse
Interface Overview
┌─────────────────────────────────────────────────────────────────────┐
│ Lighthouse TUI [?] Help │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────┐ ┌─────────────────────────────────────┐ │
│ │ Navigation │ │ Content Panel │ │
│ │ │ │ │ │
│ │ > Docs & API │ │ Process Status │ │
│ │ Search │ │ ─────────────── │ │
│ │ Dashboards │ │ ● my-service Running │ │
│ │ Processes │ │ ○ other-service Stopped │ │
│ │ │ │ │ │
│ └─────────────────────┘ └─────────────────────────────────────┘ │
│ │
│ [Tab] Switch Panel [/] Search [?] Help [q] Quit │
└─────────────────────────────────────────────────────────────────────┘
Main Sections
1. Documentation & API
Browse and execute Bruno requests organized by collection and core.
2. Search
Quick fuzzy search across all endpoints and documentation.
3. Dashboards
- Status Dashboard: Overview of all services
- Logs Dashboard: Real-time log streaming
- SQS Dashboard: Queue monitoring
- Metrics Dashboard: Performance metrics
4. Process Manager
Control all configured processes:
- Start individual or all processes
- Stop and restart services
- View process logs
- Check health status
Configuration Options
Process Configuration
| Option | Type | Required | Description |
|---|---|---|---|
id | string | ✓ | Unique identifier |
name | string | ✓ | Display name |
command | string | ✓ | Command to run |
args | string[] | ✓ | Command arguments |
cwd | string | ✓ | Working directory |
mode | string | ✓ | managed, external, or auto |
healthCheck | object | ✓ | Health check config |
autoStart | boolean | Start on launch | |
env | object | Environment variables |
Health Check Configuration
The healthCheck field is required for all processes:
| Option | Type | Required | Description |
|---|---|---|---|
url | string | ✓ | URL to check health |
interval | number | ✓ | Check interval in ms |
timeout | number | Timeout per check (default: 5000) |
Next Steps
- Configuration Guide - All options
- Dashboards - Dashboard features
- Process Management - Managing services
- Bruno Integration - API testing
- Keyboard Shortcuts - All shortcuts