Open source · Local-first · Your data stays home

All your AI,one local gateway.

Astra Gate is an AI gateway that runs on your own machine: aggregate every provider, take over Codex, Claude Code and Gemini CLI in one click, translate protocols, track tokens and cost, and guard your privacy before a request ever leaves.

$npm install -g @aidotnet/astra-gate
Astra Gate

Works with the tools you already use

CodexClaude CodeGemini CLIOpenCodeClaude DesktopGrok BuildPiHermes AgentMiniMax CodeCopilot CLI

plus 20+ provider templates

OpenAIAnthropicGoogle GeminixAIDeepSeekMoonshot KimiZhipu GLMAlibaba QwenMiniMaxVolcengine ArkOpenRouterSiliconFlowOllamaLM Studio

Features

One gateway for every AI call

No code changes, no new tools — just a quiet, reliable local hop between your clients and your providers.

Automatic protocol translation

OpenAI Chat, OpenAI Responses, Anthropic Messages and Gemini all decode into one intermediate representation and re-encode from it — clients and providers no longer need to match.

OpenAI ChatOpenAI ResponsesAnthropic MessagesGemini
IR
OpenAI ChatOpenAI ResponsesAnthropic MessagesGemini

One-click client takeover

No more hand-editing ~/.codex or ~/.claude. Enable writes the config with a backup; Disable & restore puts it back exactly as it was.

Codex
Claude Code
Gemini CLI

See usage and cost

Input, output, cache and reasoning tokens plus cost are recorded per request and rolled up by time, client and model.

Privacy guardrails

Keys, emails and internal addresses are detected locally before a request is sent — warn, block or redact; originals never leave your machine.

key=sk-ant-api03-9fK2…
key=«SECRET_1»

Multiple accounts & subscriptions

Attach several keys and subscriptions (Claude Pro/Max, ChatGPT, Kimi…) to one provider and switch clients between them instantly.

Claude Pro/MaxChatGPTKimiGLMGrok

How it works

Clients → Astra Gate → any provider

Every request goes through one entry point on 127.0.0.1, where it is translated, metered and checked before being forwarded upstream.

Your clients

CodexClaude CodeGemini CLIOpenCode

Astra Gate

Local gateway

127.0.0.1:17321

1Protocol translation
2Usage metering
3Privacy guardrails

Upstream providers

AnthropicOpenAIDeepSeekOpenRouter

Admin console

Everything in one native-feeling console

Open it in a browser or the desktop app — same liquid-glass UI, same local data.

Overview

Quick start

Your first request in three steps

  1. 1

    Install

    Requires Node.js ≥ 18; the server binary for your platform is pulled in automatically.

    $ npm install -g @aidotnet/astra-gate
  2. 2

    Start and open the console

    Runs in the background on 127.0.0.1:17321 by default.

    $ astra start --open
  3. 3

    Take over a client

    Or enable it with one click on the console’s Clients page.

    $ astra client enable codex

Bring your AI traffic back to your own machine

MIT licensed and free. Runs on macOS, Linux and Windows.