Back to guides

Amp CLI Setup Guide

Configure Amp CLI to use your own AI subscriptions through KorProxy

Overview

Amp CLI is a powerful AI coding assistant from Sourcegraph that helps you write, understand, and modify code directly from your terminal.

KorProxy lets you use your own AI subscriptions (Gemini, Claude, OpenAI) with Amp, maximizing the value of subscriptions you already pay for.

This setup works with both Amp CLI and Amp IDE extensions.

Prerequisites

  • KorProxy app installed and running
  • Amp CLI installed (npm install -g @anthropic/amp or via Homebrew)
  • At least one provider authenticated in KorProxy (Gemini, Claude, or Codex)

Configuration Steps

Option A: Settings File (Recommended)

Edit ~/.config/amp/settings.json:

{
  "amp.url": "http://localhost:1337"
}

Option B: Environment Variable

Add to your shell profile (.bashrc, .zshrc, etc.):

export AMP_URL=http://localhost:1337

Login Through Proxy

After configuring the proxy URL, authenticate with Amp:

amp login

This authenticates with Amp's servers through KorProxy.

Usage

Start using Amp with your proxied AI providers:

amp "Write a hello world in Python"

How It Works

Requests for models you've authenticated (Gemini, Claude, Codex) use your OAuth subscriptions

Requests for other models fallback to Amp's servers (may use Amp credits)

Authenticate all providers you have subscriptions for to maximize value

Models Used by Amp

Amp uses different models for different modes and features. Authenticate these providers to maximize your subscription value:

Smart Mode

Claude Opus 4.5

Rush Mode

Claude Haiku 4.5

Oracle Subagent

GPT-5.1

Review Feature

Gemini 2.5 Flash-Lite

Troubleshooting

"401 Unauthorized"

Re-authenticate the provider in KorProxy

"Connection refused"

Make sure KorProxy is running on port 1337

Verify configuration

amp config get amp.url