dev-code-proxy

Workflows

Use with AI agents

Coding agents start dev servers, call them and hand you links. With dcp they use names instead of ports, find what runs with one command, and give you a link you can open from anywhere.

Give an agent the prompt

Paste this at the start of a session, before asking an agent to run, test or share an app.

Prompt for a coding agent

Paste it into Claude Code, Codex, Cursor or any agent before asking it to run or share an app.

You are working in a project whose dev servers run through dev-code-proxy (dcp). Use it instead of raw ports.

Check the machine first, and fix what is missing:
- `dcp --version` (missing: `brew install meabed/tap/dcp` or `npm i -g dev-code-proxy`)
- `dcp doctor` checks both halves and each sharing provider; each ✗ is followed by the command that fixes it, and it exits 1 when one fails.
- `dcp service install` fixes local HTTPS; it may ask the user for their password once, so tell them.
- Tailscale sign-in and Funnel are the user's to do in a browser; give them the link doctor prints.

Run an app at a local HTTPS name:
- Start the dev server the usual way (npm run dev, uvicorn, rails s, go run .): dcp finds it and serves it at https://<project folder>.localhost. Never hard-code a port.
- To pick the name, put it in the project: .dcp.json { "name": "<app>.<project>" }, or the "dcp" key of package.json / deno.json, [tool.dcp] in pyproject.toml, [package.metadata.dcp] in Cargo.toml, "extra"."dcp" in composer.json.
- `dcp ls --json` lists every app and link, one entry each (name, port, pid, source "found" or "run", dir, provider local/tailscale/cloudflare, url, state up/online/not shared/exited, public); https://dcp.localhost/api/status has them with requests and latency.
- A port is taken by a dev server left running: `dcp stop <port>` or `dcp stop <name>`, with --yes (there is no terminal to ask in) and --force when it ignores SIGTERM. Stop only servers you started, unless the user says so.
- To run a command through dcp instead (it picks a free port and sets $PORT and $HOST): `dcp run <name> -- '<command using $PORT and $HOST>'`, e.g. `dcp run api.acme -- 'uvicorn main:app --port $PORT --host $HOST'`.

Share an app online (webhooks, OAuth callbacks, a phone, a teammate):
- Sharing is on by default: the local HTTPS proxy keeps every dev server online through Tailscale (Funnel), after reboots too. `dcp url <app> --tailscale` (or `--cloudflare`) prints just that URL, e.g. `curl $(dcp url api --cloudflare)/health`; it exits 1 when the link is not online yet.
- `dcp status --json` says per provider whether it is on and online, and otherwise the problem, the fix and a docs link; `dcp check` opens every link from the outside (DNS, certificate, HTTP status). Run the fix it names, or hand it to the user when it is theirs (a sign-in, an admin page).
- Cloudflare (a public link under the user's own domain) is off until set up once: `dcp cloudflare on --zone <domain> --env-file <file with CLOUDFLARE_API_TOKEN>`. The token needs Account › Cloudflare Tunnel › Edit and Zone › DNS › Edit; ask the user for it, never invent one.
- `dcp tailscale on --tailnet` limits Tailscale to the tailnet (Serve); `dcp tailscale off` and `dcp cloudflare off` turn them off. Change these only when the user asks.
- The URL is the same every time on this machine, so register it once with Stripe, GitHub, Slack or an OAuth provider.
- Apps see Host: localhost by default; use `dcp --forward-host` when the app builds absolute URLs (OAuth redirects).

Report the URLs you used. Docs for agents: https://dev-code-proxy.com/llms-full.txt

Keep it in the repo

Add this section to the project's AGENTS.md (or CLAUDE.md), so every session knows it without being told.

Section for AGENTS.md

Keep it in the repo so every agent session starts knowing the project's URLs.

## Local URLs (dev-code-proxy)

- Start apps as usual: dcp finds every dev server and serves it at https://<name>.localhost, named by the project's .dcp.json or "dcp" config (default: its folder). Never hard-code ports. https://dcp.localhost shows what runs.
- First run on a machine: `dcp service install` (local HTTPS proxy from boot + trusted CA). `dcp service status` checks it.
- Running apps and every link: `dcp ls --json`; stop one: `dcp stop <name|port> --yes`. One URL for a webhook or callback (shared by default): `dcp url <app> --tailscale` or `--cloudflare`.
- Sharing online: `dcp status --json` (each provider, or the problem and its fix), `dcp check` (each link from the outside). Cloudflare setup, once: `dcp cloudflare on --zone <domain> --env-file .env`.
- Docs: https://dev-code-proxy.com/llms-full.txt

Docs an agent can read

URLWhat
/llms.txtWhat dcp is and a link to each page, in the llms.txt format
/llms-full.txtEvery page of these docs as one Markdown file

Commands agents rely on

CommandGives the agent
dcp service statusthree ✓/✗ lines and exit 1 when local HTTPS isn't ready
dcp ls --jsonone entry per app and link: name, port, pid, source (run or found), dir, provider (local, tailscale, cloudflare), url, state (up, online, not shared, exited), public
dcp url <app> --cloudflarejust that URL (or --tailscale, --local), for curl $(dcp url api --cloudflare); exit 1 when it is not online yet
dcp stop <name|port> --yesthe app behind a name or port stopped (SIGTERM, waits 5s; --force at once); exit 1 when it still runs
dcp run <name> -- <cmd...>an app at https://<name>.localhost, with PORT and HOST set for it
dcp status --jsoneach provider: on, online, base, and when it is not online the problem, fix and docs; exit 1 when one that is on is not online
dcp check --jsonevery online link opened from the outside: DNS, certificate (issuer, expiry), HTTP status, and the step that failed
dcp doctorwhat either half is missing, each ✗ with the command that fixes it; exit 1 when one fails

Every command prints what to do next when something is off, so an agent can recover without guessing. Commands that need the user (a password for dcp service install, a Tailscale sign-in, a Cloudflare token) say so.