Skip to main content

Synopsis

profclaw serve [flags]

Description

serve starts the profClaw HTTP API server. It displays an ASCII banner, checks that the configured port is available, then spawns the server process. In production mode it monitors the child process and automatically restarts it on crash using exponential backoff (up to 5 restart attempts). The server exposes:
  • REST API at http://localhost:<port>/api
  • Health endpoint at http://localhost:<port>/health
  • Web UI at http://localhost:<port>/

Flags

-p, --port
string
default:"3000"
Port to listen on. Must be available. If already in use, the command exits with instructions to free the port or use an alternate.
--no-cron
boolean
Disable scheduled cron jobs. The server starts normally but no cron triggers will fire.
--dev
boolean
Run in development mode with file watching via tsx watch. Auto-restarts on source changes. Disables the crash-restart loop.
--no-restart
boolean
Disable automatic restart on crash. Used internally by the daemon subcommand - the OS service manager handles restarts.

Crash Recovery

In production mode (serve without --dev), the process manager applies exponential backoff:
AttemptWait
11s
22s
34s
48s
516s
After 5 consecutive crashes in quick succession the process exits. Fix the underlying issue and run profclaw serve again.

Examples

profclaw serve

Environment Variables

VariableDescription
PORTOverrides the --port flag
ENABLE_CRONSet to false to disable cron (same as --no-cron)
PROFCLAW_MODEDeployment mode (pico, mini, pro)