Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"group": "Quickstart",
"pages": [
"quickstart/index",
"quickstart/cli",
"quickstart/account-creation",
"quickstart/api-key",
"quickstart/integration"
Expand All @@ -103,6 +104,7 @@
{
"group": "Integrations",
"pages": [
"integrations/cli",
"integrations/claude-code",
"integrations/anthropic-sdk",
"integrations/openai-sdk",
Expand Down
202 changes: 202 additions & 0 deletions integrations/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
---
title: Edgee CLI
description: The fastest way to use Claude Code and Codex with Edgee. One command to authenticate, launch, and compress.
icon: terminal
---

The Edgee CLI is the fastest way to route your AI coding assistant through Edgee. Instead of manually configuring environment variables
and API keys, the CLI handles authentication, session tracking, and launching your tool in a single command.

## Supported Tools

<CardGroup cols={2}>
<Card title="Claude Code" icon="/images/icons/claude.svg">
Anthropic's official CLI for interactive coding with AI.
</Card>

<Card title="Codex" icon="code">
OpenAI's CLI agent for software engineering tasks.
</Card>
</CardGroup>

## Installation

<Tabs>
<Tab title="macOS / Linux">
```bash
curl -fsSL https://install.edgee.ai | bash
```
</Tab>

<Tab title="Homebrew">
```bash
brew tap edgee-ai/tap
brew install edgee
```
</Tab>
</Tabs>

Verify the installation:

```bash
edgee --version
```

## Quick Start

Get up and running in under a minute:

<Steps>
<Step title="Initialize">
```bash
edgee init
```
This walks you through provider selection and authentication. A browser window opens for you to log in or create your Edgee account.
</Step>

<Step title="Launch your tool">
```bash
edgee launch claude
```
That's it. Claude Code is now running with Edgee compression and observability enabled.
</Step>
</Steps>

After your session ends, the CLI prints a link to view your session analytics in the Edgee Console.

## Commands

### `edgee init`

Interactive setup wizard. Prompts you to select a provider (Claude Code or Codex), opens a browser for authentication,
and saves your credentials locally.

```bash
edgee init
```

### `edgee auth login`

Authenticate with Edgee for a specific provider. Opens a browser window for OAuth-based login. Your API key and credentials
are saved to `~/.config/edgee/credentials.toml`.

```bash
edgee auth login
```

### `edgee auth status`

Display the current authentication status for all configured providers, including the logged-in email and connection mode.

```bash
edgee auth status
```

### `edgee launch claude`

Launch Claude Code with all Edgee configuration automatically injected. The CLI sets the required environment variables
(`ANTHROPIC_BASE_URL`, authentication headers, session ID) and starts Claude Code.

```bash
edgee launch claude
```

You can pass any Claude Code arguments after the command:

```bash
edgee launch claude "How do I implement a binary search?"
edgee launch claude --resume
```

If you haven't authenticated yet, the CLI will prompt you to log in first. It will also ask you to select a connection mode
on first launch:

- **Claude Pro/Max** — uses your Anthropic subscription, Edgee compresses traffic to extend session duration
- **API Billing** — uses Edgee API keys for direct billing, reducing token costs

### `edgee launch codex`

Launch Codex with Edgee routing automatically configured. The CLI passes the required provider configuration to Codex
and starts a new session.

```bash
edgee launch codex
```

You can pass any Codex arguments after the command:

```bash
edgee launch codex --model o4-mini
```

Connection modes for Codex:

- **ChatGPT Plus/Pro** — uses your OpenAI subscription with Edgee compression
- **API Billing** — uses Edgee API keys for direct billing

### `edgee reset`

Reset your credentials and connection mode for a provider. Useful if you need to switch accounts, change your connection mode,
or re-authenticate.

```bash
edgee reset
```

### `edgee update`

Check for updates and install the latest version of the Edgee CLI.

```bash
edgee update
```

## Configuration

The CLI stores credentials in `~/.config/edgee/credentials.toml` with restricted file permissions (`600`).

```toml
version = 2

[claude]
api_key = "ek_..."
email = "you@example.com"
connection = "plan" # or "api"

[codex]
api_key = "ek_..."
email = "you@example.com"
connection = "plan" # or "api"
```

<Note>
You don't need to edit this file manually. The CLI manages it through `edgee init`, `edgee auth login`, and `edgee reset`.
</Note>

## Session Tracking

Every `edgee launch` session is assigned a unique session ID. After your session ends, the CLI prints a link to view
detailed analytics for that session in the Edgee Console, including:

- Token usage and compression savings
- Request count and latency
- Cost breakdown

## How It Works

When you run `edgee launch claude` or `edgee launch codex`, the CLI:

1. Verifies your authentication (prompts login if needed)
2. Generates a unique session ID
3. Configures the appropriate environment variables and headers
4. Launches the AI tool as a child process with Edgee routing enabled
5. Prints a session analytics URL when the session ends

All requests from your coding session flow through Edgee's API, where token compression, cost tracking,
and observability are applied automatically.

## Next Steps

- Learn about [Claude Token Compression](/features/claude-compression) and how it extends your sessions
- Set up [alerts](/features/alerts) to monitor your AI spending
- Explore [observability](/features/observability) to track usage across all your sessions
69 changes: 69 additions & 0 deletions quickstart/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: Quickstart with the CLI
sidebarTitle: Using the CLI
description: The fastest way to get started with Edgee. Two commands to install, authenticate, and launch your coding assistant with compression.
icon: chevrons-right
---

The Edgee CLI is the fastest way to use Edgee with your AI coding assistant. It handles account creation, authentication,
and tool configuration automatically — no manual API key setup or environment variables needed.

<Steps>
<Step title="Install the CLI">
<Tabs>
<Tab title="macOS / Linux">
```bash
curl -fsSL https://install.edgee.ai | bash
```
</Tab>
<Tab title="Homebrew">
```bash
brew tap edgee-ai/tap
brew install edgee
```
</Tab>
</Tabs>
</Step>

<Step title="Initialize and authenticate">
```bash
edgee init
```
This opens your browser to create an account or log in. Select your provider (Claude Code or Codex) and choose your connection mode.
</Step>

<Step title="Launch your coding assistant">
```bash
edgee launch claude
```
That's it. Claude Code is now running with Edgee compression and full observability enabled.

For Codex users:
```bash
edgee launch codex
```
</Step>
</Steps>

After your session ends, the CLI prints a link to view your session analytics — token usage, compression savings, and cost breakdown — directly in the [Edgee Console](https://www.edgee.ai).

<Note>
The CLI requires [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) or [Codex](https://github.com/openai/codex) to be installed on your machine.
</Note>

## What's Next

<CardGroup cols={2}>
<Card title="CLI Reference" icon="terminal" href="/integrations/cli">
Full documentation of all CLI commands, flags, and configuration options.
</Card>
<Card title="Claude Token Compression" icon="/images/icons/claude.svg" href="/features/claude-compression">
Learn how lossless compression extends your Claude Code sessions by up to 3x.
</Card>
<Card title="Observability" icon="chart-line" href="/features/observability">
Track token usage, costs, and latency across all your sessions.
</Card>
<Card title="Alerts & Budgets" icon="bell" href="/features/alerts">
Set up spending alerts to stay in control of your AI costs.
</Card>
</CardGroup>
35 changes: 19 additions & 16 deletions quickstart/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,25 @@ description: Start using Edgee in minutes.
icon: square-minus
---

The following guide will help you get started with Edgee managed service in minutes.
Choose the path that fits your use case:

This guide will walk you through the basics of getting started with Edgee,
from setting up your account to using multiple models in your applications.
## Using a Coding Assistant?

The **Edgee CLI** is the fastest way to get started. Two commands and you're done — no manual API key setup needed.

```bash
curl -fsSL https://install.edgee.ai | bash
edgee init
edgee launch claude
```

<Card title="Quickstart with the CLI" icon="terminal" href="/quickstart/cli">
Install the CLI, authenticate, and launch Claude Code or Codex with Edgee in under a minute.
</Card>

## Building an Application?

Follow the step-by-step guide to create your account, generate an API key, and integrate Edgee into your stack.

| Step | Task | Time |
| ---- |------- | ------------- |
Expand All @@ -17,28 +31,17 @@ from setting up your account to using multiple models in your applications.
| 3 | [Integrate Edgee to your stack](/quickstart/integration) | 3 min |
| | **Total Time** | **~5 min** |


## Different ways to discover Edgee

After creating your account, you can start exploring Edgee in different ways:
## Other ways to get started

<CardGroup>

<Card
title="Continue with the Quickstart"
icon="step-forward"
href="/quickstart/account-creation">
Go on with the quickstart guide, create your API key and start using multiple models in your application.
</Card>

<Card
title="Use one of our SDKs"
icon="boxes"
href="/sdk"
>
Use one of our SDKs to start using Edgee services in your application.
</Card>

<Card
title="API Reference"
icon="terminal"
Expand Down
20 changes: 17 additions & 3 deletions quickstart/integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,25 @@ To learn more about the SDKs, see the [individual SDK pages](/sdk).

## Use Edgee in your Coding Assistant

You can use Edgee in your preferred Coding Assistant by using our official integrations.
The easiest way is to use the [Edgee CLI](/quickstart/cli) — it handles authentication and configuration automatically:

```bash
curl -fsSL https://install.edgee.ai | bash
edgee init
edgee launch claude
```

You can also configure your coding assistant manually:

<CardGroup>
<Card title="Claude Code" icon="/images/icons/claude.svg" href="/features/claude-compression">
Route Claude Code traffic through Edgee for token compression and observability over every coding session.
<Card title="Edgee CLI" icon="terminal" href="/integrations/cli">
The fastest path: install, authenticate, and launch in two commands. Supports Claude Code and Codex.
</Card>
<Card title="Claude Code" icon="/images/icons/claude.svg" href="/integrations/claude-code">
Manual configuration for Claude Code via environment variables or settings file.
</Card>
<Card title="Codex" icon="code" href="/integrations/cli#edgee-launch-codex">
Launch Codex through Edgee using the CLI.
</Card>
<Card title="OpenCode" icon="/images/icons/opencode.svg" href="/integrations/opencode">
Connect OpenCode's CLI agent to Edgee for cost savings and unified access to multiple models.
Expand Down
Loading