Telaio
CLI

Development Server

Process orchestration, file watching, and multi-process dev mode via telaio dev.

Development Server

pnpx telaio dev

telaio dev starts the application in development mode. It orchestrates multiple processes, watches the filesystem for changes, and restarts processes when relevant files are modified.

Peer dependencies

telaio dev requires two peer dependencies:

pnpm add -D concurrently @parcel/watcher

concurrently manages multiple child processes with labeled output. @parcel/watcher provides native filesystem watching with low overhead.

Configuration

Configure dev in your telaio.config.ts:

import { defineConfig } from 'telaio';

export default defineConfig({
  dev: {
    processes: [
      { name: 'worker', command: 'node src/worker.ts', prefixColor: 'cyan' },
      { name: 'scheduler', command: 'node src/scheduler.ts', prefixColor: 'yellow' },
    ],
    watch: {
      include: ['config/**', '.env'],
      ignore: ['*.test.ts', 'dist/**'],
      debounceMs: 500,
    },
    output: 'dev.log',
  },
});

ProcessConfig

Each entry in processes describes an additional process to run alongside the main server.

OptionTypeDescription
namestringLabel shown in the combined output
commandstringShell command to run
prefixColorstringColor for the process label in terminal output

WatchConfig

OptionTypeDescription
includestring[]Additional glob patterns to watch beyond the defaults
ignorestring[]Glob patterns to exclude from watching
debounceMsnumberMilliseconds to wait after a change before restarting. Default: 300

output

When output is set to a file path, the combined log output from all processes is written to that file in addition to stdout. Useful for capturing dev session logs.

What gets watched

By default, telaio dev watches:

  • src/**
  • telaio.config.ts
  • .env and .env.*

Paths in watch.include are added to this set. Paths in watch.ignore are excluded.

Process lifecycle

On startup, all configured processes are launched in parallel. When a watched file changes:

  1. All child processes receive SIGTERM
  2. After a short drain period, they are killed if still running
  3. All processes restart with the same command

The main Telaio server is always included as one of the managed processes. Additional entries in processes are extra workers, queue consumers, or any other long-running Node process your app needs.

For the queue consumer specifically, prefer using telaio consumer in a separate terminal or Docker container rather than adding it to dev.processes. This keeps the consumer lifecycle independent and matches how you would run it in production.

On this page