gitwtfhub

wtf is cursor-plan2api?

alfons-fhl/cursor-plan2api — explained in plain English

Analysis updated 2026-05-18

4TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

Cursor-Plan2API turns your Cursor.ai subscription into a local OpenAI-compatible API server so other AI tools can use it.

Mindmap

mindmap
  root((Cursor-Plan2API))
    What it does
      Local API bridge
      OpenAI compatible endpoints
      Uses your Cursor subscription
    Tech stack
      TypeScript
      Node.js
      Docker
    Use cases
      Run Hermes Agent
      Connect OpenCode
      Call from any client
    Audience
      Developers
      CLI agent users
    Setup
      Install Cursor CLI
      npm install
      Docker quick start

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

Why would anyone build with this?

REASON 1

Run Hermes Agent or OpenCode using your Cursor.ai subscription instead of a separate API key.

REASON 2

Point any OpenAI-compatible tool, like LangChain or n8n, at your own Cursor subscription.

REASON 3

Generate images, text embeddings, or streaming chat replies from Cursor models locally.

What's in the stack?

TypeScriptNode.jsDocker

How it stacks up

alfons-fhl/cursor-plan2api0labs-in/vision-linkarviahq/arvia
Stars444
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audiencedeveloperdeveloperdeveloper

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

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires an active Cursor.ai subscription and the Cursor CLI logged in via agent login.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

Cursor-Plan2API is a small local program that lets people use their existing Cursor.ai subscription as if it were a regular API service, similar to the ones offered by OpenAI. Normally, using Cursor means working inside its own editor or command line tool. This project runs a local server on your own computer that translates requests written in the common OpenAI format into calls Cursor's own agent can understand, and then sends the replies back in the same format other tools expect. Because it speaks the same language as OpenAI's API, other programs that already know how to talk to OpenAI, such as Hermes Agent, OpenCode, the OpenAI Python and JavaScript libraries, LangChain, and automation tools like n8n, can be pointed at this local server instead. It also understands the format Claude Code uses, and can generate images and text embeddings. The tool supports both streaming and one shot responses, so replies can appear word by word or all at once. It can hold onto conversation state so multi-turn conversations do not need to resend the whole history each time, and it can compress long conversations to keep them running smoothly. There is an optional pool of ready CLI connections to speed up repeated requests, and requests that fail because of rate limits are retried automatically. It ships with a Docker setup for people who prefer containers, a simple web dashboard to watch live usage statistics, and a small built in web page for trying it out without writing any code. Setup mainly involves installing the Cursor command line tool, logging in with an existing Cursor.ai account, then installing this project through npm or from source. The project is written in TypeScript, runs on Node.js version 20 or newer, and is released under the MIT license, so it can be freely used, changed, and shared as long as the copyright notice stays intact. It currently has 4 stars on GitHub.

Yoink these prompts

Prompt 1
Help me set up Cursor-Plan2API locally and connect it to Hermes Agent using composer-2.5.
Prompt 2
Show me how to configure OpenCode to use my Cursor subscription through Cursor-Plan2API.
Prompt 3
Write a docker-compose.yml that runs Cursor-Plan2API with my ~/.cursor auth mounted.
Prompt 4
Explain how to call Cursor-Plan2API's /v1/chat/completions endpoint from a Python script.

Frequently asked questions

wtf is cursor-plan2api?

Cursor-Plan2API turns your Cursor.ai subscription into a local OpenAI-compatible API server so other AI tools can use it.

What language is cursor-plan2api written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, Docker.

What license does cursor-plan2api use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is cursor-plan2api to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is cursor-plan2api for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.