README.md

September 16, 2026 · View on GitHub

Edgee

Official Edgee CLI — route your coding agents through Edgee and take control of token spend.

License Edgee Docs Twitter


Coding agents are the fastest-growing line item in most engineering budgets — and the least visible one. Edgee is an Agent Gateway: it sits between your agents and the LLM providers, and intercepts, routes, compresses, meters, and secures every request. No code change in your projects, no change to how your agents work.

This repository ships the edgee command-line tool. Install it, sign in, and launch your coding agent — Claude Code, Codex, Cursor, VS Code + Copilot, and more. Setup takes about five minutes.

The production gateway (routing, compression, metering, billing, observability) is operated by Edgee and is not built from this repo. Self-hosting is not supported here.

illustration

Why Edgee

  • Smart routing and budgets. Send work to the right model for the job, with fallbacks when your primary model errors or rate-limits, and reroutes to cheaper open-weight models when it doesn't need to be expensive — mid-task, without losing quality.
  • Visibility your finance team will ask for. Token cost and usage tracked per developer, repo, PR, model, and environment — not per anonymous API key.
  • Token compression. Tool outputs (file listings, build logs, test results, …) are trimmed gateway-side before they reach the model. Same answers, leaner context, smaller bill.
  • Drop-in for coding agents. edgee launch claude (or edgee alias) points your agent at Edgee. Works with every provider plan, including consumer subscriptions — not just API credits.
  • Rust-native CLI. Fast install, small footprint, macOS, Linux, and Windows.

Together that's up to 70% off your token bill, with the control and reporting engineering leaders need to keep agent adoption growing without the spend growing with it.


Install

macOS / Linux (curl)

curl -fsSL https://edgee.ai/install.sh | bash

Homebrew (macOS)

brew install edgee-ai/tap/edgee

Windows (PowerShell)

irm https://edgee.ai/install.ps1 | iex

Installs to %LOCALAPPDATA%\Programs\edgee\. You can override the directory with $env:INSTALL_DIR before running.

Sign in after install:

edgee auth login

Quickstart

Launch a coding agent

# Claude Code
edgee launch claude

# Codex
edgee launch codex

# OpenCode
edgee launch opencode

# CodeBuddy
edgee launch codebuddy

# Crush
edgee launch crush

# Pi
edgee launch pi

# Oh My Pi
edgee launch omp

# Kimi Code
edgee launch kimi

# Kilo Code
edgee launch kilo

# Cursor (desktop app)
edgee launch cursor

# GitHub Copilot in VS Code
edgee launch copilot-vscode
edgee launch intellij       # GitHub Copilot in IntelliJ IDEA

# GitHub Copilot CLI
edgee launch copilot-cli
edgee launch copilot-desktop  # GitHub Copilot app (macOS)

# Claude Desktop (app)
edgee launch claude-desktop

# ChatGPT desktop app
edgee launch codex-desktop

ChatGPT desktop app. Quit any running instance first — the app only picks up the Edgee settings on a fresh start, and an already-running one keeps talking straight to OpenAI (the command tells you when this happens).

Edgee writes its provider into ~/.codex/config.toml, launches the app, and keeps the file patched until you quit the app, then restores it. The app re-reads that config every time you open a tab, so leave the terminal open — closing it (or Ctrl-C) restores the config, and tabs opened after that talk straight to OpenAI. While it runs, a bare codex on the CLI also routes through Edgee but is billed to your desktop key; use edgee launch codex to meter it as the CLI. Your auth.json is never read or modified.

GitHub Copilot CLI, one-time trust (macOS). Unlike the other CLI agents, this one relays rather than injects env vars: Copilot CLI's only BYOK lever (COPILOT_PROVIDER_BASE_URL) replaces GitHub's own model routing and skips GitHub auth entirely, so it can't meter your actual paid Copilot seat. edgee launch copilot-cli instead spawns copilot behind the same relay copilot-vscode uses, keeping your real GitHub OAuth session and rerouting its billed traffic through the gateway. Its native TLS client requires the dedicated Copilot CA in the macOS system keychain, so the first launch asks for your admin password once.

Claude Desktop, one-time trust (macOS). Claude Desktop (Chromium) checks TLS against the macOS system keychain, so the first edgee launch claude-desktop asks for your admin password once to trust a dedicated Edgee CA. That CA is name-constrained to anthropic.com (SSL policy only), so it can vouch for nothing else — but it persists after uninstalling Edgee. Remove it anytime with:

edgee relay claude-desktop --untrust

Copilot surfaces, one-time trust (macOS). Copilot CLI's native TLS client, the desktop app's bundled CLI, and VS Code's Electron network stack check the Copilot inference host against the macOS system keychain. The first launch through any of these surfaces asks for your admin password once to trust a shared, name-constrained Edgee Copilot CA. Remove it anytime with any matching target:

edgee relay copilot-cli --untrust

Any extra flags after the subcommand are forwarded to the underlying agent:

edgee launch claude --resume abcd          # continue a Claude Code session
edgee launch codex resume                  # resume the last Codex session
edgee launch opencode -c                   # continue the last OpenCode session
edgee launch codebuddy --resume <id>       # resume a CodeBuddy session

Route plain claude / desktop apps through Edgee (edgee alias)

edgee alias                 # CLI shims + desktop wrappers (when the app is installed)
edgee alias claude          # one CLI agent
edgee alias cursor          # Cursor.app wrapper (skipped if Cursor is not installed)
edgee alias copilot-vscode  # VS Code wrapper (skipped if VS Code is not installed)
edgee alias intellij        # IntelliJ IDEA Copilot wrapper (requires the IDE installed)
edgee alias copilot-desktop # GitHub Copilot app wrapper (macOS)
edgee alias claude-desktop  # Claude Desktop wrapper (skipped if Claude Desktop is not installed)
edgee alias remove          # undo

This covers two kinds of targets:

  1. CLI agents (claude, codebuddy, codex, opencode, crush, pi, omp, kimi, kilo) — shell aliases plus ~/.edgee/bin PATH shims (Unix), so interactive and non-interactive shells route through Edgee. Reopen your terminal (or exec $SHELL -l) once after install.
  2. Apps (cursor, copilot-vscode, copilot-desktop, claude-desktop) — desktop launchers only when the host app is already installed: ~/Applications/* (Edgee).app on macOS, .desktop files on Linux, Start Menu shortcuts on Windows. They run edgee launch … under the hood.

Check savings

edgee stats

Features

Routing: fallbacks and reroutes

Point a coding-agent key at another model — as a fallback (only when the usual model errors or is rate-limited) or a reroute (every request, instead of the usual model):

edgee settings           # pick an agent, then configure routing and compression
edgee settings claude    # go straight to one agent's key

Routing runs on the gateway, so it applies to every request from that key regardless of which machine or agent surface it came from.

Token compression

Edgee's compression engine analyses tool outputs and removes noise before they enter the LLM context. Compression runs on the gateway, the CLI routes your agent there. From the model's perspective the workflow is unchanged, the prompts are just leaner.

Usage tracking

Real-time visibility into token consumption and compression savings per session, via edgee stats and the Claude Code statusline. Team-wide cost and usage reporting lives in the Edgee console.


Roadmap

What's coming next, in the order it matters to us:

  • Strategies — budget-driven routing policies scoped to a person, a squad, or the whole organisation. Set a weekly budget and the rules that kick in as it's consumed: at 75%, reroute expensive models to a cheaper open-weight one; at 100%, route everything to your cost floor.
  • Desktop app — a single Edgee app to launch and monitor your whole local AI stack, CLI agents and desktop apps alike, without going through the terminal.
  • Skills and MCP management — deploy and govern skills and MCP servers across every agent in an organisation, from one place.

Together these extend what a gateway can do for an engineering organisation: more of your agents routed through Edgee, more of your spend under policy, more of your usage visible.


Statusline

When you run edgee launch claude, Claude Code shows a live statusline with the current session's five token categories (input, cache read, cache write, output, and reasoning), cost, request count, and active fallback warning. No setup required: the first launch auto-installs the integration into ~/.claude/settings.json, and subsequent launches reuse it.

Manage it

edgee statusline claude install   # run the install manually (idempotent)
edgee statusline claude disable   # turn it off
edgee statusline claude enable    # turn it back on
edgee statusline claude doctor    # diagnose project-level conflicts
edgee statusline claude fix       # overlay Edgee on a conflicting project

The install writes two things to ~/.claude/settings.json:

  • statusLine.command = "edgee statusline render": only if you don't already have a statusLine; we never overwrite yours. (Older Edgee versions wrote edgee statusline without the explicit subcommand; that form now prints help, and is auto-migrated to edgee statusline render on next launch.)
  • A SessionStart hook running edgee statusline claude doctor --warn-only, which prints a one-line warning when you open a project that shadows Edgee.

State is tracked with two empty marker files in ~/.config/edgee/:

  • statusline-claude.installed: set after the first auto-install; gates repeats.
  • statusline-claude.disabled: set by disable; tells the launch flow to skip auto-install too.

Coexistence with project-level statuslines

Claude Code only renders one statusLine, picked by strict precedence: enterprise > project .claude/settings.local.json > project .claude/settings.json > user ~/.claude/settings.json. Any project that defines its own statusLine (via project hooks, in-house scripts, or third-party statusline tools) will completely shadow Edgee's user-level statusline.

Edgee ships a generic merge wrapper so the two can coexist:

# In any project where Edgee is shadowed by a project-level statusLine:
edgee statusline claude doctor   # report: NONE / WRAPPED / SHADOWED
edgee statusline claude fix      # write .claude/settings.local.json with an Edgee overlay

edgee statusline claude fix writes a statusLine.command of the form edgee statusline wrap '<original>' into .claude/settings.local.json (per-user, gitignored). The shared .claude/settings.json is never touched. Each Claude Code refresh then runs Edgee's renderer and the wrapped command in parallel and merges their outputs into a single line.

Precedence guarantee: Edgee's segment is always emitted and is never the one that gets truncated. The wrapped command's output is truncated with to fit the remaining COLUMNS budget, ANSI- and Unicode-aware (CJK and emoji are correctly counted as wide). If the wrapped command times out, errors, or returns nothing, only Edgee's segment renders.

The SessionStart hook installed by edgee statusline claude install (or by the auto-install on first launch) prints a single warning line whenever the current project's statusLine shadows Edgee, and stays silent otherwise.

Environment variables

VariableDefaultPurpose
EDGEE_STATUSLINE_TIMEOUT_MS2000Total timeout for the wrap merge (Edgee + wrapped command).
EDGEE_STATUSLINE_SEPARATOR" │ "String inserted between Edgee's segment and the wrapped output.
EDGEE_STATUSLINE_POSITIONleftEither left (Edgee on the left, wrapped truncated on the right; recommended) or right.
EDGEE_STATUSLINE_PASS_STDERRunsetSet to 1 to forward the wrapped command's stderr to the terminal (off by default).
EDGEE_STATUSLINE_MIN_WRAPPED_WIDTH10When the wrapped budget falls below this many cells, drop the wrapped output rather than show a stub.
EDGEE_NO_AUTO_OVERLAYunsetSet to 1 to make edgee statusline claude fix print the suggested overlay instead of writing it (for users who manage .claude via dotfiles).
EDGEE_SILENCE_CONFLICT_WARNINGunsetSet to 1 to silence the SessionStart warning. Per-user via shell env, or per-project via .claude/settings.local.json's env block.
EDGEE_NO_UPDATE_CHECKunsetSet to 1 to skip the background check for a newer CLI release.

Supported agents

ToolSetup commandStatus
Claude Code (CLI)edgee launch claude✅ Supported
Codex (CLI)edgee launch codex✅ Supported
OpenCode (CLI)edgee launch opencode✅ Supported
CodeBuddy (CLI)edgee launch codebuddy✅ Supported
Crush (CLI)edgee launch crush✅ Supported
Pi (CLI)edgee launch pi✅ Supported
Oh My Pi (CLI)edgee launch omp✅ Supported
Kimi Code (CLI)edgee launch kimi✅ Supported
Kilo Code (CLI)edgee launch kilo✅ Supported
Cursor (app)edgee launch cursor✅ Supported
GitHub Copilot in VS Codeedgee launch copilot-vscode✅ Supported
GitHub Copilot in IntelliJ IDEAedgee launch intellijExperimental; live validation pending
GitHub Copilot app (macOS, local sessions)edgee launch copilot-desktop✅ Supported
GitHub Copilot CLIedgee launch copilot-cli✅ Supported
Claude Desktop (Claude Code)edgee launch claude-desktop✅ Supported
ChatGPT desktop app (Codex tab)edgee launch codex-desktop✅ Supported

The two desktop chat apps route their coding surface, not their chat surface. Each ships a coding agent that speaks the vendor's public API — which Edgee routes — and a chat client that speaks the vendor's consumer web backend, which it does not:

  • edgee launch claude-desktop routes Claude Code. The app's own chat talks to claude.ai directly.
  • edgee launch codex-desktop routes the Codex tab. The ChatGPT tab is the ChatGPT web client in the app's bundled Chromium and never reaches the embedded Codex backend Edgee configures.

In both cases those chat conversations bill your Claude or ChatGPT plan directly and do not appear in your Edgee stats.

Launch target naming rules (CLI vs apps, suffixes, provider keys) are documented in src/commands/launch/README.md.


Repository layout

This repo is a single Rust binary crate (edgee-cli, binary name edgee).

PathPurpose
src/main.rsclap entry point: argument parsing, profile resolution, subcommand dispatch
src/api.rsEdgee console API client (auth, keys, settings, stats)
src/config.rscredentials.toml handling and named profiles
src/crypto.rsX25519 + Argon2 key derivation for E2EE debug logs
src/git.rsRepo/branch detection used to attribute sessions
src/version_check.rsBackground check for a newer CLI release
src/commands/launch/One module per launch target, plus naming rules
src/commands/auth/login, status, list, switch
src/commands/settings/Per-key agent settings
src/commands/statusline/Statusline renderer, wrap/merge logic, Claude integration
src/commands/alias/Shell aliases, PATH shims, desktop app wrappers
src/commands/relay/Local MITM relay powering the app launch targets

The gateway itself — routing, compression, metering, billing, observability — is a separate, Edgee-operated service and is not part of this repository.


Acknowledgments

The token trimming engine in the Edgee gateway is derived from RTK, created by Patrick Szymkowiak and contributors at rtk-ai Labs. RTK pioneered local tool-output compression for AI coding assistants; we extended that work for gateway-side compression at scale.

RTK is licensed under the Apache License 2.0. All derived files retain the original copyright notice and are individually marked with a modification history, in the repository where they live.

If you're looking for a local-first compression tool, check out RTK directly — it's excellent for individual developer workflows.


Contributing

This CLI is Apache 2.0 licensed and open source, and we genuinely want your contributions.

git clone https://github.com/edgee-ai/edgee
cd edgee
cargo build

See CONTRIBUTING.md for the full guide and LICENSE for the license text. For bigger changes, open an issue first so we can align before you build.


Community


Edgee is built by Edgee Cloud SAS (Paris) and Edgee Corporation (Delaware). Edgee is SOC 2 and GDPR compliant, supports BYOK, and is available on-premise. Talk to us at edgee.ai.

GitHub Copilot app

Quit GitHub Copilot completely, then run edgee launch copilot-desktop on macOS. Edgee launches the installed app with its connection configured and keeps that connection alive until the app quits. Ctrl-C closes the launched app before stopping the connection. edgee alias copilot-desktop installs a GitHub Copilot (Edgee) desktop wrapper.

Local sessions retain your GitHub Copilot subscription and are metered under Copilot, sharing edgee settings copilot with the CLI and VS Code. Remote/cloud sessions are not covered. Edgee plugin delivery and Windows/Linux desktop launch are not yet supported. Install the app from https://github.com/features/ai/github-app into /Applications or ~/Applications. Verified with app 1.1.20, including a tool call and follow-up response.