AC Bridge ac-bridge.com

Documentation

Before you start · Getting started · Hook events · States and effects · Lighting profiles · Troubleshooting · Last updated

In one paragraph AC Bridge watches the coding agents you already run — Claude Code and Codex — and turns what they are doing into light. A profile maps session states (working, needs permission, finished…) to what your devices should do. You bind a profile to a project folder; from then on, that project's sessions drive those devices. LAN devices are driven straight from your machine and their keys never leave it; your account, settings, device list, usage counts and session states sync through our servers. Your prompts, code and session transcripts are never collected. (privacy policy)

Before you start

Getting started

Five steps, roughly ten minutes, most of it waiting for an installer.

  1. Install the app. Sign in here, open your account and download the build for your operating system from the Download tab. Windows, macOS and Linux are all supported, and the headless CLI installs from npm.
  2. Sign in and finish first-run setup. The app checks that Claude Code or Codex is installed, installs the small plugin that reports session state (see hook events), and offers to open the firewall port device discovery needs. You can re-run any of it later.
  3. Add your devices. Scan finds what is on your network — lights, plugs and LED strips from the usual brands. Integrations is for anything that needs an account or a key: Home Assistant, Hue, SmartThings, Tuya, Meross, eWeLink, Govee, or an MQTT broker.
  4. Make a profile. Pick the states you care about and what each one should do. Start with three: working, needs permission, finished.
  5. Bind it to a project and press Start. Open Claude Code or Codex in that folder as you normally would. Your lights follow the session.

Terminal instead Everything above has a terminal equivalent. The acbridge command installs from npm with npm i -g acbridge (Node 22 or newer), and is also bundled inside the desktop app, so a machine with the app already has it. It drives sign-in, the bridge, devices and profiles on a machine with no screen:

Command What it does
acbridge setupWires the agent hooks that report session state (see hook events). Once per machine.
acbridge loginBrowser sign-in; this machine gets its own credential. --no-browser prints the URL for a headless box.
acbridge start / stopStart and stop the bridge. Stopping reverts every device it touched.
acbridge statusRelay, machine, hub and plan. Exits 0 when the bridge is running, so scripts can gate on it.
acbridge scanFinds devices on your LAN. Needs the bridge running.
acbridge connect <id>Claims a scanned device by MAC, IP or discovered id.
acbridge link <provider>Links an account-based provider: Home Assistant, Hue, SmartThings, Tuya, Meross, eWeLink, Govee or MQTT.
acbridge devicesList the device graph, or control one: on, off, set, set-main.
acbridge profilesCreate, edit and bind profiles. create --starter --bind wires a scene set to the current folder.
acbridge groupsDevice groups, shared with the app.
acbridge integrationsLinked provider accounts: list, pause, resume, remove.
acbridge reposThe folders your agent sessions launch from.
acbridge doctorChecks every requirement and prints the fix for each one.
acbridge uninstallUnwires this machine before npm uninstall -g acbridge. --purge deletes all local data.

Order for a fresh machine: setup and login in either order, then start, then scan and link, then profiles. Scan and connect talk to the running bridge, which is why it starts first. Add --json to almost any command to script it.

Hook events AC Bridge uses

AC Bridge reads each session's state through the agent's own hook system, exactly as the Claude Code hooks reference and the Codex hooks docs describe it; nothing is scraped from your terminal. acbridge setup, or the app's first-run setup, wires both agents.

Claude Code

Setup installs the AC Bridge plugin into Claude Code, and the plugin registers its own hooks. These are the events it listens to, and the state each one reports:

The plugin does not use Claude Code's PermissionRequest hook, which fires as the dialog appears; that is why the permission light waits for permission_prompt. Context low and critical, permission-mode and model changes have no hook of their own: the bridge works them out from the session. Setup's own edits to ~/.claude/settings.json are a statusLine entry (it chains any status line you already have, and feeds the context and usage readings behind the threshold states) and a narrow permissions allow-list, so Claude is not asked every time it uses the bridge's own device tools; the hooks live in the plugin, not in that file.

Codex

Setup adds AC Bridge's entries to ~/.codex/hooks.json and keeps any hooks of your own that are already there. It registers:

Codex runs a new hook only after you trust it. After setup, start Codex, type /hooks and trust the AC Bridge hooks; do it again after an update that adds an event, or that event stays silent. acbridge doctor tells you which ones still need trusting. AC Bridge does not use Codex's notify setting, so a notify program you already have keeps working.

States and effects

A profile rule has two halves: the state that triggers it, and the effect your device runs. Both are listed below.

Session states

Thirty states exist in the catalog. Claude Code can emit twenty-nine of them and Codex twenty-four, so the app only offers you the ones the agent you bound can actually produce — the two report different things. The twelve most-used are shown first in the editor; the rest fold under Advanced states. For an example colour on each of the six most-used states, and the Claude Code or Codex hook that sets it off, see the Claude Code status light page.

State When it fires
started / resumedA session begins, or picks up an earlier one.
workingThe agent is actively doing something.
needs permissionIt is waiting for you to approve an action. The one most people light in red. On Claude Code it arrives about six seconds after the prompt opens; on Codex, as soon as Codex asks.
needs your inputIt asked a question and is waiting on the answer.
plan readyA plan has been produced and wants review.
idleNothing has happened for a while. On Claude Code, about a minute after it finished responding, if you have not typed since.
finished / task completedThe turn, or the task, is done.
endedThe session closed.
errorSomething failed.
permission deniedAn action was refused.
context low / context criticalThe session is running out of context window.
compacting / compaction doneThe context is being compacted, and has finished.
rate limitedThe agent's provider is throttling.
usage high / cost highYour configured usage or spend threshold was crossed.
long runA session has been going longer than your threshold.
subagent started / subagent finishedA sub-task was spawned, or completed.
plan mode / auto-accept mode / bypass permissions / normal modeThe permission mode changed.
model changedThe session switched model.
review changedA code review's state changed.
workflow startedA multi-agent workflow began.
sandbox escalationCodex asked to step outside its sandbox. Codex only — Claude Code never fires it.

Effects

Nine effects, plus plain colour, brightness and on/off. A device advertises which ones it can do; the editor only offers you those, and one-tap presets (Alert, Police, Party, Candle, Sunrise, Breathe) are filtered the same way. Breathe and Candle need no colour, so they work on a plain white bulb.

Effect What it does
FlashA set number of on/off blinks, with the on and off time you choose.
StrobeRapid blinking at a set rate, for a set duration.
PulseSmooth breathing between a low and a high brightness. Needs no colour.
FadeA glide from one colour to another over a duration — seconds, or a five-minute sunrise.
LoopCycles a list of colours, holding and cross-fading each one.
CandleA warm, irregular flicker at a colour temperature you pick. Needs no colour.
RainbowSweeps the full hue circle.
SirenAlternates two colours at a set rate.
MeterMaps a live value onto colour stops — context remaining, for instance, going green to amber to red as it runs down. It keeps tracking rather than playing once.

Lighting profiles

A profile is a named set of rules: state → what these devices do. Colour, brightness, on/off, or a scene you already have on the device.

The bridge will not start

In order, because each one rules out the next:

  1. Is your subscription active? Local device control needs an active plan or trial. Check your account; a lapsed subscription pauses automation rather than deleting anything.
  2. Is this machine signed in? Sign in from the app, or run acbridge login.
  3. Has the account finished first-run setup? It is a one-time, per-account step. Finish it in the app, or run acbridge login --if-needed on the machine to complete it from the terminal.
  4. Is something else on the port? The bridge serves a local control API on 127.0.0.1. If a previous copy is still running, stop it (acbridge stop) and start again.
  5. Run the doctor. acbridge doctor checks the agent install, the plugin, the local API, the firewall rule and your account, and prints the fix beside each failure.

Devices found but not controllable Most brands need either a local key or an account link before they will take commands. Open Integrations and link the provider; then re-run Scan and the device moves from "found" to "ready to connect".

Codex sessions do not change the lights Codex skips a hook until you trust it. Type /hooks inside Codex and trust the AC Bridge hooks, then start a new session; acbridge doctor lists any still waiting.

Still stuck? Email support@ac-bridge.com — a person reads it. Include what you tried and what acbridge doctor printed; that is usually enough to answer in one reply.

Guides