Replaces the plain-text output <div> with a real xterm.js terminal (@xterm/xterm + @xterm/addon-fit), so ANSI color/control codes from scripts render as actual colors instead of raw escape characters. stderr chunks are wrapped in ANSI red so failures stand out even from tools that don't colorize their own output. Also sets FORCE_COLOR=1/ CLICOLOR_FORCE=1 as env defaults (real/script env still wins) since scripts run without a real TTY and most tools auto-disable color without one of these overrides. Fixed a React Strict Mode bug found while testing: the initial log was written to the terminal via a "write once" ref flag in the parent, but Strict Mode's dev-only mount->cleanup->remount cycle creates a fresh Terminal on the real mount, so that flag silently skipped writing to the surviving instance - the terminal looked completely blank until live output arrived. Fixed by writing initialData inside the same effect that creates the Terminal, so it's correct by construction regardless of how many times the effect runs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
TriggerShell web app
This is the Next.js app that TriggerShell's Python CLI (triggershell dev / triggershell start)
launches — it's not meant to be run standalone with next dev/next start since it needs a
custom server (server.ts) for the WebSocket endpoint.
See the repo root README for how to run TriggerShell end-to-end, and
../docs/ARCHITECTURE.md for how this app is put together.
pnpm install
pnpm dev # tsx watch server.ts - reads TRIGGERSHELL_CONFIG_PATH from the environment
pnpm lint
pnpm typecheck
pnpm db:studio # browse the SQLite database