Skip to content

IPC mode

IPC mode starts your app with the appwire agent injected via --require, then opens a REPL connected over IPC.

Terminal window
appwire
appwire --entry src/main.ts # override entry point
appwire --entry apps/backend/ # point to a directory

Add a .appwirerc file to your project root to persist the entry point:

{ "entry": "src/main.ts" }

Appwire reads it automatically so you don’t need --entry every run.

When --entry is omitted and no .appwirerc exists, Appwire reads package.json in this order:

  1. main field
  2. scripts.start — parses the command for the entry file
  3. scripts.dev — same
  4. Falls back to src/main.ts and dist/main.js

If the entry is a .ts file, Appwire detects your TypeScript runtime from devDependencies and wraps accordingly. Supported: tsx, ts-node, ts-node-esm.

appwire: detected entry src/main.ts (from scripts.start)
appwire: using tsx for TypeScript
appwire: starting src/main.ts ...
appwire(ipc:main.ts) > appwire: app ready (42 services)
appwire(ipc:main.ts) > $env.NODE_ENV
'development' (0ms)

If the app crashes, Appwire restarts it and reconnects:

appwire: disconnected
appwire: reconnecting...
appwire: restarting src/main.ts ...
appwire: reconnected

Use .reload from the REPL to manually restart:

appwire(ipc:main.ts) > .reload
reloaded