diff --git a/docs.json b/docs.json index ca9cc4b..61dcaed 100644 --- a/docs.json +++ b/docs.json @@ -83,6 +83,7 @@ "group": "Quickstart", "pages": [ "quickstart/index", + "quickstart/cli", "quickstart/account-creation", "quickstart/api-key", "quickstart/integration" @@ -103,6 +104,7 @@ { "group": "Integrations", "pages": [ + "integrations/cli", "integrations/claude-code", "integrations/anthropic-sdk", "integrations/openai-sdk", diff --git a/integrations/cli.mdx b/integrations/cli.mdx new file mode 100644 index 0000000..7b74b12 --- /dev/null +++ b/integrations/cli.mdx @@ -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 + + + + Anthropic's official CLI for interactive coding with AI. + + + + OpenAI's CLI agent for software engineering tasks. + + + +## Installation + + + + ```bash + curl -fsSL https://install.edgee.ai | bash + ``` + + + + ```bash + brew tap edgee-ai/tap + brew install edgee + ``` + + + +Verify the installation: + +```bash +edgee --version +``` + +## Quick Start + +Get up and running in under a minute: + + + + ```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. + + + + ```bash + edgee launch claude + ``` + That's it. Claude Code is now running with Edgee compression and observability enabled. + + + +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" +``` + + + You don't need to edit this file manually. The CLI manages it through `edgee init`, `edgee auth login`, and `edgee reset`. + + +## 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 diff --git a/quickstart/cli.mdx b/quickstart/cli.mdx new file mode 100644 index 0000000..6a57eac --- /dev/null +++ b/quickstart/cli.mdx @@ -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. + + + + + + ```bash + curl -fsSL https://install.edgee.ai | bash + ``` + + + ```bash + brew tap edgee-ai/tap + brew install edgee + ``` + + + + + + ```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. + + + + ```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 + ``` + + + +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). + + + 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. + + +## What's Next + + + + Full documentation of all CLI commands, flags, and configuration options. + + + Learn how lossless compression extends your Claude Code sessions by up to 3x. + + + Track token usage, costs, and latency across all your sessions. + + + Set up spending alerts to stay in control of your AI costs. + + diff --git a/quickstart/index.mdx b/quickstart/index.mdx index e0782bb..09fd227 100644 --- a/quickstart/index.mdx +++ b/quickstart/index.mdx @@ -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 +``` + + + Install the CLI, authenticate, and launch Claude Code or Codex with Edgee in under a minute. + + +## 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 | | ---- |------- | ------------- | @@ -17,20 +31,9 @@ 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 - - - Go on with the quickstart guide, create your API key and start using multiple models in your application. - - Use one of our SDKs to start using Edgee services in your application. - + - - Route Claude Code traffic through Edgee for token compression and observability over every coding session. + + The fastest path: install, authenticate, and launch in two commands. Supports Claude Code and Codex. + + + Manual configuration for Claude Code via environment variables or settings file. + + + Launch Codex through Edgee using the CLI. Connect OpenCode's CLI agent to Edgee for cost savings and unified access to multiple models.