dariusnv

Metaphor Local Gateway — Development skill for Claude Code

Development community

Use your Metaphor account from any local coding agent — OpenAI/Anthropic-compatible, loopback-only, zero dependencies.

How to install Metaphor Local Gateway

This entry records only its repository, not the path inside it, so there is no exact command to give. Open dariusnv/metaphor-local-gateway and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Metaphor Local Gateway does

Use your Metaphor account from any local coding agent — OpenAI/Anthropic-compatible, loopback-only, zero dependencies.

Alternatives in Development

  • Sanitize — Detect and redact PII from text files — 15 categories (SSNs, credit cards, API keys, etc.), zero dependencies 3.1k ★
  • Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★
  • Claude Code API — OpenAI-compatible API gateway for Claude Code CLI 300 ★

README

metaphor-local-gateway

**Use your Metaphor account from any local coding agent.** OpenAI- and Anthropic-compatible endpoints on `127.0.0.1`. Your tools run on your machine.

[![test](https://github.com/dariusnv/metaphor-local-gateway/actions/workflows/test.yml/badge.svg)](https://github.com/dariusnv/metaphor-local-gateway/actions/workflows/test.yml) ![node](https://img.shields.io/badge/node-%E2%89%A522-339933?logo=nodedotjs&logoColor=white) ![deps](https://img.shields.io/badge/runtime%20deps-0-blue) ![license](https://img.shields.io/badge/license-Unlicense-lightgrey)

[!NOTE] Unofficial. Not affiliated with or endorsed by Metaphor. It relies on an undocumented API that can change or disappear at any time.

 Pi · Claude Code · OpenAI SDK · Anthropic SDK
                  │  /v1/*  (HTTP + SSE)
                  ▼
     metaphor-local-gateway  ── 127.0.0.1:8080
                  │  Bearer 
                  ▼
        https://llms.withmetaphor.com

Why

Metaphor's agent normally runs inside a cloud VM. This gateway exposes only the stateless inference API, so your own harness keeps the files, shell and approvals local. Nothing calls `/api/v1/cloud/runs`.

  • Four native routes, passed through byte-for-byte. No model swaps, no schema rewriting, no fake success.
  • Zero-config on Windows. Reuses the Metaphor desktop sign-in from Credential Manager and refreshes tokens automatically.
  • Streaming done right. Unbuffered SSE with backpressure, and the upstream request is aborted the moment your client disconnects.
  • Plays fair. Upstream 401/403/429/5xx are returned as-is, and Retry-After is enforced locally.
  • Tiny. About 1,000 lines on the Node.js standard library, with no npm install required.

Quickstart

Requires **Node.js ≥ 22** and an active Metaphor account.

git clone https://github.com/dariusnv/metaphor-local-gateway.git
cd metaphor-local-gateway
npm star