unigateway 0.9.3

Lightweight, local-first LLM gateway for developers. A stable, single-binary unified entry point for all your AI tools and models.
unigateway-0.9.3 is not a library.
Visit the last successful build: unigateway-0.1.3

UniGateway is a lightweight, high-performance LLM gateway designed for developers who use multiple AI tools (Cursor, Zed, Claude Code, etc.) and multiple providers (OpenAI, Anthropic, DeepSeek, Groq, etc.).

📦 Install

curl -fsSL https://raw.githubusercontent.com/EeroEternal/unigateway/main/install.sh | sh

Or via Homebrew / Cargo:

brew install EeroEternal/tap/ug          # macOS (Homebrew)
cargo install unigateway                 # Rust toolchain

🛠️ Usage

1. Quick Start

Run the interactive wizard to set up your first provider and generate a default configuration:

ug guide          # or 'ug quickstart'
ug serve          # Starts in background by default

2. Managing the Server

UniGateway runs in the background. Use these commands to manage it:

ug status         # Check if the gateway is running
ug stop           # Stop the background gateway
ug logs           # View or tail the logs
ug serve -f       # Run in the foreground (blocking)

3. Managing Modes

UniGateway organizes providers into Modes. Use the CLI to manage them:

ug mode list          # See all available modes
ug mode show fast     # Inspect providers/keys for a specific mode
ug mode use strong    # Set 'strong' as the default mode

3. Tool Integrations

Get ready-to-use configuration snippets for your favorite AI tools:

ug integrations --tool cursor
ug integrations --tool zed
ug integrations --tool claudecode

4. Diagnostics & Testing

Understand routing and verify connectivity:

ug route explain      # Explain how the current mode routes requests
ug test               # Send a smoke test request to the gateway
ug doctor             # Run a full diagnostic check on your setup

🔌 AI Integrations

UniGateway is designed for the modern AI ecosystem.

Popular Tool Configs

🦞 OpenClaw

Connect OpenClaw to UniGateway as a unified local OpenAI-compatible entry point. See OpenClaw Integration Example for full details.

Add to ~/.openclaw/openclaw.json:

{
  "agents": { "defaults": { "model": { "primary": "unigateway/deepseek-chat" } } },
  "models": {
    "providers": {
      "unigateway": {
        "baseUrl": "http://127.0.0.1:3210/v1",
        "apiKey": "${UNIGATEWAY_API_KEY}",
        "api": "openai-completions",
        "models": [{ "id": "deepseek-chat", "name": "UniGateway Chat" }]
      }
    }
  }
}

🛠️ Claude Code

Configure Claude Code to use UniGateway as its OpenAI endpoint:

export CLAUDE_BASE_URL="http://127.0.0.1:3210/v1"
export CLAUDE_API_KEY="ugk_your_key"

MCP (Model Context Protocol)

Manage your gateway through natural language in Cursor or Claude Desktop:

ug mcp

AI Agent Skills

Ships with a Skill file and OpenAPI spec to help AI agents automate your LLM infrastructure.

🚀 Key Features

  • Unified Interface: OpenAI-compatible API for all providers, including Anthropic and local models.
  • Mode-Based Routing: Group providers into semantic "modes" (e.g., fast, strong, backup) for easy switching.
  • Pre-configured Integrations: Get instant setup snippets for Cursor, Zed, Claude Code, and more.
  • Failover & Stability: Built-in fallback strategies to ensure your AI tools keep working even if a provider goes down.
  • Deep Visibility: Use ug route explain and ug doctor to understand exactly how requests are routed and debug connection issues.
  • MCP Server: Built-in Model Context Protocol server for AI assistants to manage the gateway.

📄 License

MIT. See LICENSE.