@facta-ai/ai-gateway
v0.4.0
Published
Seamless multi-model session continuity for AI coding workflows.
Maintainers
Readme
AI Gateway
Your AI coding session, uninterrupted. Hand off a live Claude Code or Codex session to the other provider — mid-task, with its context, decisions, and momentum intact — and hand it back whenever you want. One sentence to your AI, and a new terminal window opens with the other one already up to speed.
Built for the moment every AI power user knows: "You have less than 10% of your usage limit left."
How it feels
# You're deep in a Claude Code session. Limits closing in. You say:
> hand off to codex using the ai_gateway_handoff tool
# A Terminal window opens by itself. Codex greets you:
"Handoff from Claude complete — picking up where we left off.
Want me to go ahead and run those migration tests?"Works identically in the other direction from Codex. No copy-pasting context, no re-explaining your task, no lost thread.
Install (2 minutes)
Requires Node 20+, and Claude Code and/or Codex.
npm install -g @facta-ai/ai-gateway
ai-gateway doctor # checks your environment
ai-gateway install-claude-mcp # if you use Claude Code
ai-gateway install-codex-mcp # if you use CodexThat's the whole setup. Keep working exactly like you always do.
What it does under the hood
- Reads your live session (Claude Code transcripts / Codex rollouts) locally and stages a compressed, provider-attributed handoff payload — with a preview you approve before anything moves.
- Opens the landing terminal for you (macOS): the destination AI launches with private continuation context and picks up your last open thread — no recaps, no menus.
- Carries work back: the return trip includes what the other AI actually said and did, correctly attributed.
- Meters locally:
ai-gateway usageshows your handoffs and context volume.ai-gateway licenseshows your plan.
Pricing
- Free: 5 handoffs per month. No account, no signup.
- More: USD 1 per handoff — packs of 10 or 50, or the Essentials subscription (30 handoffs/month), at facta-ai.lemonsqueezy.com. Keys activate offline:
ai-gateway activate <key>.
Privacy
Local-first, absolutely: your transcripts, API keys, usage metering, and license checks never leave your machine. There is no telemetry and no phone-home. AI Gateway orchestrates your provider access — it never resells API tokens or impersonates subscriptions.
Requirements & notes
- macOS gets the auto-opening terminal windows; Linux prints the one command to run instead.
- The Gemini leg (via API key) is experimental.
- Only sessions can be handed off — the tool never touches your provider accounts.
License
Elastic License 2.0 — free to use; don't resell it as a service; don't remove the license checks.
Developed by Facta — AI systems, built to work. ai-gateway help for all commands.
Related
- [[../README|Dev Workspace Guide]]
