A CLI orchestrator for running Claude Code, Codex, and Antigravity together
Purpose
triflux is a Claude Code plugin plus an npm CLI. It does three things.
Task routing: for each role (implementation, review, design, and so on) it picks Codex CLI, Antigravity CLI (agy), or Claude Code, plus a model and effort, and runs the work.
Session control: it starts, queries, compacts, and stops Claude, Codex, and agy sessions running in tmux, and lets those sessions message each other.
Lead workflow: one session acts as a lead that registers other sessions as workers and manages briefs, cross review, and merges.
Architecture
/tfx-auto runs tfx-route.sh through Bash inside Claude Code.
tfx-route.sh gets a per-role candidate order from the routing policy module and runs the first candidate CLI as a non-interactive worker.
The routing policy reads the usage cache written by the HUD and drops vendors that hit their limits.
tfx multi creates worker panes in a tmux room. In headless runs each pane runs tfx-route.sh, and Claude workers run claude --print. Interactive runs start each CLI's TUI in its pane and type the prompt.
tfx-live and tfx-peer control interactive sessions. Message paths are under "Sessions and peer messages" below.
Requirements
Node.js 22 or later
tmux on macOS and Linux; psmux and Windows Terminal on Windows
The CLIs you want to use: Codex CLI, Antigravity CLI (agy), Claude Code. Setup records which ones this machine uses in a machine profile.
postinstall runs scripts/setup.mjs, which installs scripts, the HUD, skills, Codex profiles, and the machine profile, and registers Codex hooks.
postinstall and CI skip every prompt and only print hints. mods, the agy plugin, lead launch commands, the peer adapter approval, Codex hook trust, tmr, and psmux on Windows are offered only by an interactive tfx setup.
tfx setup --mods installs mods and the agy plugin without asking.
The Claude Code marketplace works too:
claude plugin marketplace add tellang/triflux
claude plugin install triflux@triflux
claude plugin install triflux-mods@triflux
tfx update detects how triflux was installed (plugin, npm, git), updates it, and runs the new version's setup.
First run
/tfx-auto "fix the failing auth tests"
/tfx-auto "review this change for trust-boundary issues" --mode consensus
/tfx-auto "finish the migration and verify it" --mode deep --retry ralph --max-iterations 10