Skip to content

Use Claude Code with your ChatGPT, Kimi, Cursor or Grok subscription via a local Anthropic-compatible proxy

Rust

improve docs homepage and media

Raine Virtaa31cbf52265c
diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs
index 135de15..58b08be 100644
--- a/docs/astro.config.mjs
+++ b/docs/astro.config.mjs
@@ -11,6 +11,15 @@ export default defineConfig({
description: 'Run Claude Code with Codex, Kimi, Grok, or Cursor Agent.',
plugins: [starlightLlmsTxt()],
favicon: '/favicon.svg',
+ head: [
+ {
+ tag: 'script',
+ attrs: {
+ src: '/image-zoom.js',
+ defer: true,
+ },
+ },
+ ],
social: [
{
icon: 'github',
diff --git a/docs/public/image-zoom.js b/docs/public/image-zoom.js
new file mode 100644
index 0000000..fdf469b
--- /dev/null
+++ b/docs/public/image-zoom.js
@@ -0,0 +1,72 @@
+(() => {
+ const selector = 'main .sl-markdown-content img, main .content-panel img';
+
+ function imageLabel(img) {
+ const alt = img.getAttribute('alt')?.trim();
+ return alt ? `Zoom image: ${alt}` : 'Zoom image';
+ }
+
+ function closeOnBackdrop(event) {
+ if (event.target === event.currentTarget) {
+ event.currentTarget.close();
+ }
+ }
+
+ function createDialog() {
+ const dialog = document.createElement('dialog');
+ dialog.className = 'image-zoom-dialog';
+ dialog.setAttribute('aria-label', 'Image preview');
+
+ const frame = document.createElement('div');
+ frame.className = 'image-zoom-frame';
+
+ const closeButton = document.createElement('button');
+ closeButton.type = 'button';
+ closeButton.className = 'image-zoom-close';
+ closeButton.setAttribute('aria-label', 'Close image preview');
+ closeButton.textContent = '×';
+ closeButton.addEventListener('click', () => dialog.close());
+
+ const image = document.createElement('img');
+ image.className = 'image-zoom-full';
+ image.alt = '';
+
+ frame.append(closeButton, image);
+ dialog.append(frame);
+ dialog.addEventListener('click', closeOnBackdrop);
+ document.body.append(dialog);
+
+ return { dialog, image };
+ }
+
+ function initImageZoom() {
+ const images = Array.from(document.querySelectorAll(selector));
+ if (images.length === 0) return;
+
+ const preview = createDialog();
+
+ for (const img of images) {
+ if (img.closest('a, button, .image-zoom-trigger')) continue;
+
+ const trigger = document.createElement('button');
+ trigger.type = 'button';
+ trigger.className = 'image-zoom-trigger';
+ trigger.setAttribute('aria-label', imageLabel(img));
+
+ img.parentNode?.insertBefore(trigger, img);
+ trigger.append(img);
+
+ trigger.addEventListener('click', () => {
+ preview.image.src = img.currentSrc || img.src;
+ preview.image.alt = img.alt;
+ preview.dialog.showModal();
+ });
+ }
+ }
+
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', initImageZoom, { once: true });
+ } else {
+ initImageZoom();
+ }
+})();
diff --git a/docs/public/monitor-tui.webp b/docs/public/monitor-tui.webp
new file mode 100644
index 0000000..3bbcef7
Binary files /dev/null and b/docs/public/monitor-tui.webp differ
diff --git a/docs/src/content/docs/index.md b/docs/src/content/docs/index.md
index 478f693..dfe5f39 100644
--- a/docs/src/content/docs/index.md
+++ b/docs/src/content/docs/index.md
@@ -4,15 +4,25 @@ description: Run Claude Code with Codex, Kimi, Grok, or Cursor Agent through one
---
<div class="hero-copy">
-claude-code-proxy keeps the Claude Code harness and routes its requests to Codex, Kimi, Grok, or Cursor Agent. One local process handles authentication, provider selection, protocol translation, streaming, and diagnostics.
+claude-code-proxy lets you use Claude Code with Codex, Kimi, Grok, or Cursor Agent. Start one local app, choose a model, and keep working in the Claude Code interface you already know.
</div>
-<div class="route-rail" aria-label="Request route from Claude Code through the proxy to upstream providers">
- <div class="route-node"><strong>Claude Code</strong><span>Anthropic messages and tools</span></div>
- <div class="route-arrow" aria-hidden="true">→</div>
- <div class="route-node"><strong>claude-code-proxy</strong><span>routing, translation, auth</span></div>
- <div class="route-arrow" aria-hidden="true">→</div>
- <div class="route-node provider-stack"><code>Codex</code><code>Kimi</code><code>Grok</code><code>Cursor Agent</code></div>
+<div class="route-rail" aria-label="Claude Code connects through the proxy to a supported provider">
+ <div class="route-node route-client">
+ <span class="route-kicker">Your coding interface</span>
+ <strong>Claude Code</strong>
+ </div>
+ <div class="route-connector" aria-hidden="true"><span>→</span></div>
+ <div class="route-node route-proxy">
+ <span class="route-kicker">Local bridge</span>
+ <strong>claude-code-proxy</strong>
+ <span>Chooses the provider from your model</span>
+ </div>
+ <div class="route-connector" aria-hidden="true"><span>→</span></div>
+ <div class="route-node route-providers">
+ <span class="route-kicker">Supported providers</span>
+ <div class="provider-stack"><span>Codex</span><span>Kimi</span><span>Grok</span><span>Cursor Agent</span></div>
+ </div>
</div>
## Why use it?
@@ -20,19 +30,11 @@ claude-code-proxy keeps the Claude Code harness and routes its requests to Codex
- **Keep the Claude Code experience.** Skills, tools, hooks, subagents, IDE integrations, and the terminal interface stay on the client side.
- **Use subscription-backed providers.** Authenticate with supported consumer accounts instead of putting provider API keys into Claude Code.
- **Switch providers by model.** A single proxy process routes every request from its model ID.
-- **Preserve streaming and tools.** The proxy translates provider-specific streams, reasoning, tool calls, results, images, and usage into Anthropic-shaped responses.
+- **Use Claude Code normally.** Tools, images, streaming responses, and reasoning work across supported providers.
- **See what is happening.** The monitor TUI shows sessions, requests, errors, models, token use, and throughput. Structured logs and optional traffic captures support deeper diagnosis.
![Claude Code running through claude-code-proxy](/claude-code-screenshot.webp)
-## The operating boundary
-
-claude-code-proxy is a local compatibility layer. It does not replace Claude Code, manage Claude Code profiles, or authenticate incoming clients. Claude Code connects through `ANTHROPIC_BASE_URL`, while `CCP_*` settings configure the proxy itself.
-
-<div class="security-callout">
-<strong>Protect the listener and your account.</strong> The proxy binds to loopback by default and accepts requests without client authentication. Keep it on loopback unless a firewall or authenticating reverse proxy protects it. Provider policies and account enforcement can change, and unofficial clients may carry account risk.
-</div>
-
## Next steps
Start with the [short Codex setup](/getting-started/), compare the [supported providers](/providers/choosing-a-provider/), or read [how requests flow](/how-it-works/).
diff --git a/docs/src/content/docs/using/monitor-tui.md b/docs/src/content/docs/using/monitor-tui.md
index d4b9d65..ad70c79 100644
--- a/docs/src/content/docs/using/monitor-tui.md
+++ b/docs/src/content/docs/using/monitor-tui.md
@@ -5,7 +5,7 @@ description: Use the claude-code-proxy monitor to inspect sessions, active and r
`claude-code-proxy serve` opens the monitor when stdout is an interactive terminal. The same process runs the HTTP listener.
-![claude-code-proxy monitor and Claude Code session](/claude-code-screenshot.webp)
+![claude-code-proxy monitor showing sessions, active requests, recent requests, and events](/monitor-tui.webp)
## What the monitor shows
diff --git a/docs/src/styles/site.css b/docs/src/styles/site.css
index a4a8a48..553c0a2 100644
--- a/docs/src/styles/site.css
+++ b/docs/src/styles/site.css
@@ -34,8 +34,11 @@
letter-spacing: -0.045em;
}
-.sidebar [aria-current='page'] {
+.sidebar [aria-current='page'],
+.sidebar [aria-current='page']:hover,
+.sidebar [aria-current='page']:focus {
border-inline-start: 2px solid var(--ccp-cyan);
+ color: var(--sl-color-text);
background: color-mix(in srgb, var(--sl-color-accent-low) 72%, transparent);
}
@@ -48,52 +51,70 @@
.route-rail {
display: grid;
- grid-template-columns: minmax(9rem, 1fr) auto minmax(9rem, 1fr) auto minmax(12rem, 1.3fr);
- gap: 0.65rem;
+ grid-template-columns: minmax(9rem, 0.8fr) 2rem minmax(14rem, 1.2fr) 2rem minmax(13rem, 1fr);
+ gap: 0.8rem;
align-items: stretch;
- margin-block: 2rem;
+ margin-block: 2rem 2.5rem;
}
.route-node {
display: grid;
- min-height: 7rem;
- padding: 1rem;
+ min-height: 9rem;
+ gap: 0.45rem;
+ padding: 1.1rem 1.2rem;
border: 1px solid var(--sl-color-hairline-light);
- border-radius: 0.7rem;
+ border-radius: 0.8rem;
align-content: center;
- background: color-mix(in srgb, var(--ccp-panel) 88%, transparent);
+ background: linear-gradient(145deg, color-mix(in srgb, var(--ccp-panel) 94%, transparent), color-mix(in srgb, var(--sl-color-accent-low) 28%, var(--ccp-panel)));
+ box-shadow: 0 0.75rem 2rem color-mix(in srgb, var(--sl-color-black) 10%, transparent);
}
.route-node strong {
font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
- font-size: 0.95rem;
+ font-size: clamp(1rem, 2vw, 1.18rem);
+ letter-spacing: -0.03em;
}
-.route-node span {
- margin-top: 0.35rem;
+.route-node > span:not(.route-kicker) {
color: var(--sl-color-gray-3);
font-size: 0.82rem;
}
-.route-arrow {
+.route-kicker {
+ color: var(--sl-color-text-accent);
+ font-size: 0.7rem;
+ font-weight: 700;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+}
+
+.route-proxy {
+ border-color: color-mix(in srgb, var(--ccp-cyan) 55%, var(--sl-color-hairline-light));
+}
+
+.route-connector {
display: grid;
- color: var(--ccp-cyan);
- font: 700 1.35rem ui-monospace, monospace;
place-items: center;
}
+.route-connector span {
+ color: var(--ccp-cyan);
+ font: 700 1.4rem ui-monospace, monospace;
+}
+
.provider-stack {
display: grid;
- gap: 0.28rem;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 0.35rem;
}
-.provider-stack code {
- display: block;
- padding: 0.23rem 0.45rem;
- border-radius: 0.25rem;
+.provider-stack span {
+ padding: 0.35rem 0.5rem;
+ border-radius: 0.35rem;
color: var(--sl-color-text);
background: color-mix(in srgb, var(--sl-color-accent-low) 62%, transparent);
- font-size: 0.74rem;
+ font: 0.78rem ui-monospace, 'SFMono-Regular', Consolas, monospace;
+ text-align: center;
}
.security-callout {
@@ -130,12 +151,114 @@
border-radius: 0.75rem;
}
+.image-zoom-trigger {
+ display: block;
+ padding: 0;
+ margin-block: 1.5rem;
+ border: 0;
+ border-radius: 0.8rem;
+ background: transparent;
+ color: inherit;
+ cursor: zoom-in;
+}
+
+.image-zoom-trigger img {
+ display: block;
+ margin: 0;
+ border-radius: inherit;
+ transition:
+ transform 150ms ease,
+ box-shadow 150ms ease;
+}
+
+.image-zoom-trigger:hover img,
+.image-zoom-trigger:focus-visible img {
+ transform: translateY(-1px);
+ box-shadow: 0 1rem 2.5rem color-mix(in srgb, var(--sl-color-black) 24%, transparent);
+}
+
+.image-zoom-trigger:focus-visible {
+ outline: 2px solid var(--sl-color-accent-high);
+ outline-offset: 4px;
+}
+
+.image-zoom-dialog {
+ box-sizing: border-box;
+ width: 100dvw;
+ max-width: none;
+ height: 100dvh;
+ max-height: none;
+ padding: 1rem;
+ border: 0;
+ background: transparent;
+ overflow: hidden;
+}
+
+.image-zoom-dialog[open] {
+ display: grid;
+ place-items: center;
+}
+
+.image-zoom-frame {
+ box-sizing: border-box;
+ display: grid;
+ max-width: calc(100dvw - 2rem);
+ max-height: calc(100dvh - 2rem);
+ place-items: center;
+}
+
+.image-zoom-dialog::backdrop {
+ background: color-mix(in srgb, var(--sl-color-black) 78%, transparent);
+ backdrop-filter: blur(6px);
+}
+
+.image-zoom-full {
+ display: block;
+ max-width: min(calc(100dvw - 2rem), 1600px);
+ max-height: calc(100dvh - 2rem);
+ width: auto;
+ height: auto;
+ margin: auto;
+ border-radius: 0.9rem;
+ object-fit: contain;
+ box-shadow: 0 2rem 5rem color-mix(in srgb, var(--sl-color-black) 48%, transparent);
+}
+
+.image-zoom-close {
+ position: fixed;
+ inset-block-start: 1rem;
+ inset-inline-end: 1rem;
+ display: grid;
+ width: 2.25rem;
+ height: 2.25rem;
+ padding: 0;
+ place-items: center;
+ border: 1px solid var(--sl-color-hairline-light);
+ border-radius: 999px;
+ background: var(--sl-color-bg-nav);
+ color: var(--sl-color-text);
+ font: inherit;
+ font-size: 1.5rem;
+ line-height: 1;
+ cursor: pointer;
+}
+
+.image-zoom-close:hover,
+.image-zoom-close:focus-visible {
+ color: var(--sl-color-text-invert);
+ background: var(--sl-color-accent);
+}
+
@media (max-width: 52rem) {
.route-rail {
grid-template-columns: 1fr;
}
- .route-arrow {
+ .route-connector {
+ min-height: 2rem;
+ }
+
+ .route-connector span {
transform: rotate(90deg);
}
}