Run claude -p, codex exec, or agy -p on your machine, over HTTPS, for someone else.
Starts a tiny local HTTP server in front of the CLI and punches a public URL to it through a Cloudflare quick tunnel. Anyone with the URL and a bearer token can send it a prompt and get back whatever the CLI printed — running on your machine, under your login/subscription.
No API key sharing, no cloud account, no server to rent. Just your laptop/VM and a tunnel.
- Whichever of
claude,codex, oragyyou want to serve — installed and logged in cloudflaredon yourPATHuv
uv tool install git+https://github.com/MT-GoCode/use-someone-elses-subscriptiongive-sub claude start # runs claude -p, default port 8787
give-sub codex start # runs codex exec, default port 8788
give-sub agy start # runs agy -p, default port 8789All three can run at once (separate ports/tunnels/state).
give-sub (claude) is live:
URL: https://some-random-words.trycloudflare.com
Token: 3f9a...
curl -X POST https://some-random-words.trycloudflare.com/v1/chat/completions \
-H 'Authorization: Bearer 3f9a...' \
-d '{"messages":[{"role":"user","content":"hi"}]}'
Base URL for the HTML client / OpenAI-compatible clients (token baked in): https://some-random-words.trycloudflare.com/t/3f9a.../v1
Send the URL + token to whoever you're giving access to. They can call it
with plain curl, or open use-someone-elses-subscription.html
in a browser and paste in that last "Base URL" line — nothing else to configure.
give-sub claude status # show the current URL/token, if running
give-sub claude stop # kill the server + tunnel(give-sub is the short alias; use-someone-elses-subscription also works, same subcommands.)
POST /v1/chat/completions — same shape as OpenAI's chat completions endpoint,
so existing OpenAI-client code can point base_url at your tunnel URL.
- Auth: either
Authorization: Bearer <token>header, orPOST /t/<token>/v1/chat/completionswith no header — for clients that only offer a single "Base URL" field, usehttps://host/t/<token>/v1as that URL. - Body:
{"messages": [{"role": "user", "content": "..."}]}— the last message's content becomes the prompt - Response: a minimal OpenAI-shaped completion, with
choices[0].message.contentset to whatever the backend CLI printed
There's no multi-turn memory, no streaming, and no filesystem access — every
call runs in a fresh empty temp directory and is capped at 2 concurrent
requests (see GIVE_CLAUDE_MAX_CONCURRENT / GIVE_CLAUDE_TIMEOUT env vars).
This does not work as the base URL for the real Claude Code / Claude Desktop app, the real Codex app, or the real agy app — those speak their provider's actual streaming API, not this stripped-down OpenAI shape.
- Whoever has the token can spend your usage/quota on that backend. Don't post the token+URL somewhere public.
- The quick tunnel URL is random and dies with the process — restart it and the URL changes. Fine for handing to one person for a while; not meant to be a stable, permanent service.