git404hub

what is claude-code-proxy fr?

sdey09/claude-code-proxy — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · ops devopsComplexity · 3/5Setup · moderate

tl;dr

A local proxy that records Claude Code's API traffic to SQLite and a self-hosted Grafana dashboard.

vibe map

mindmap
  root((claude-code-proxy))
    What it does
      Intercepts Claude Code API calls
      Logs prompts and responses
      Emits metrics to Grafana
    Tech stack
      Python
      aiohttp
      SQLite
      Grafana
      Prometheus
    Use cases
      Track Claude Code costs
      Review past prompts
      Route to internal AI gateway
    Audience
      Developers
      DevOps teams
    Setup
      Configure upstreams.yaml
      make up
      Set ANTHROPIC_BASE_URL

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Track token usage and cost of Claude Code sessions on a local Grafana dashboard.

VIBE 2

Store every Claude Code prompt and response locally for later review.

VIBE 3

Route Claude Code traffic to an internal Databricks AI Gateway instead of Anthropic directly.

what's the stack?

PythonaiohttpSQLiteGrafanaPrometheus

how it stacks up fr

sdey09/claude-code-proxy0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultymoderatemoderatemoderate
Complexity3/52/54/5
Audienceops devopsgeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · moderate time til it works · 1h+

Requires Docker-style stack (make up) plus editing .env and upstreams.yaml before first use.

No license information is stated in the explanation.

in plain english

claude-code-local-observability is a local proxy tool that sits between Claude Code and Anthropic's API, letting a developer see and record every request and response Claude Code makes. It runs on your own machine, intercepting API calls, saving prompts and responses into a local SQLite database, and sending metrics into a local Grafana dashboard stack, without sending that data to any external observability service. To use it, a developer copies an example environment file and edits a routing configuration file called upstreams.yaml, which decides where each request should be sent based on the model name being called. Requests can be routed either straight to Anthropic's API or to a Databricks AI Gateway, useful for teams that have their own internal routing setup. The observability stack, which includes Grafana, Prometheus, and an OpenTelemetry collector, is started with a single make command, and the proxy itself is started separately with a Python command using the uv tool, or through a convenience script that starts both at once. Once running, Claude Code is pointed at the local proxy by setting a base URL in its settings file, and the proxy passes requests through with no added delay by writing the streamed response back to Claude Code while also logging it. Every request is recorded with details like the model used, token counts, and cost, which can be queried directly from the SQLite database with a simple query. Removing the base URL setting reverts Claude Code to talking to Anthropic directly. This tool is aimed at developers or teams who want visibility into their own Claude Code usage, such as tracking costs or reviewing past prompts and responses, without routing that data through a company's existing monitoring pipeline. It requires some comfort with editing YAML configuration and running local services.

prompts (copy fr)

prompt 1
Help me set up sdey09/claude-code-proxy locally and point Claude Code at it.
prompt 2
Show me how to configure upstreams.yaml to route one model to a Databricks gateway.
prompt 3
Explain how this proxy captures Claude Code requests to SQLite without adding latency.
prompt 4
Write a SQL query against claude-proxy.db to sum daily Claude Code cost by model.

Frequently asked questions

what is claude-code-proxy fr?

A local proxy that records Claude Code's API traffic to SQLite and a self-hosted Grafana dashboard.

What language is claude-code-proxy written in?

Mainly Python. The stack also includes Python, aiohttp, SQLite.

What license does claude-code-proxy use?

No license information is stated in the explanation.

How hard is claude-code-proxy to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is claude-code-proxy for?

Mainly ops devops.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.