If you're using Cline, Kilo Code, OpenCode, or Zoo Code with your own API key — in the editor, the CLI, or via SDK — your provider key is sitting in plaintext in a local config file right now. There's no spend limit stopping a runaway session from blowing past what you meant to spend, and no record of what any single call actually cost.
Prune addresses those three problems with one OpenAI-compatible base URL
change (base URL + prune_… key + model id), on whichever surface you use.
- Provider keys stay out of the agent config. Vault your real OpenAI /
Anthropic / OpenRouter key once in Prune. The agent only needs a
prune_…key — treat that like any other secret (don’t commit it), but the upstreamsk-…/sk-ant-…never has to live in local config, CLI history, or shared dotfiles. - Spend caps on traffic through Prune. Set a daily or per-run budget.
When the ceiling is reached, Prune rejects further requests with
429(X-Prune-Shield-Code: spend_caporrun_budget) instead of letting the session run unbounded. Near-limit behavior can depend on completed spend vs. pending estimates — see product docs for the exact rules. - Lower bills on routed traffic. Prune applies caching and compression on compatible traffic by default (exact and near-duplicate reuse where the pipeline allows). Results vary by workload; repeats and long agent threads benefit most.
- A receipt on every response. Each proxied call returns
prune_metadata(cost, model, cache fields, etc.). When receipt signing is enabled on the server, that metadata is Ed25519-signed and verifiable at withprune.com/verify.
Agents make a lot of calls, fast, often unattended while they plan, edit, and retry — in the editor or from a terminal session. That pattern is exactly what turns a small mistake (a loop, a bad prompt, a leaked key) into a bill you didn't see coming. Prune is built to sit in front of that, across whichever surface you actually use.
| Tool | Surfaces | Setup time |
|---|---|---|
| Cline | VS Code, JetBrains, standalone CLI, SDK | ~5–10 min |
| Kilo Code | VS Code, CLI (@kilocode/cli) |
~5–10 min |
| OpenCode | Desktop app + terminal CLI | ~10–15 min |
| Zoo Code | VS Code | ~5–10 min |
Every surface for every tool takes the same base URL + key — configure it once per tool, works the same whether you're in the editor or the terminal.
Subscription IDE backends (Cursor Ultra, Claude Pro, …) do not route through Prune. Use those as-is.
Base URL: https://api.withprune.com/v1
API Key: prune_••••
Model: <any vaulted model id>
This repo is client setup only — it does not include Prune's backend, vault, or Shield implementation. That code stays closed; this repo just gets you connected.
Every tool below uses the same Prune values. Change only the model id to use another vaulted provider (OpenAI, Anthropic, OpenRouter).
- Install Cline
- Settings → API Provider → OpenAI Compatible
- Paste:
| Field | Value |
|---|---|
| Base URL | https://api.withprune.com/v1 |
| API Key | prune_… |
| Model ID | vaulted id (e.g. gpt-4o-mini) |
- Short prompt → reply → Prune dashboard shows a receipt
Full walkthrough: configs/cline.md
- Install Kilo Code or
npm i -g @kilocode/cli - Provider settings → OpenAI Compatible (BYOK — not Kilo Gateway)
- Same three fields as Cline (table above)
- Short prompt → reply → Prune dashboard shows a receipt
Full walkthrough: configs/kilo-code.md
OpenCode uses opencode.json + auth — not a VS Code “OpenAI Compatible” picker.
Same setup for the Desktop app and the terminal CLI.
- Install OpenCode
- Copy configs/opencode/opencode.json.example
→
~/.config/opencode/opencode.json(Windows:%USERPROFILE%\.config\opencode\opencode.json) - Keep
@ai-sdk/openai-compatibleandbaseURL— noapiKeyin JSON - Authenticate:
opencode auth login
# Other → provider id: prune → paste prune_…- Select
prune/<model>→ short prompt → Prune dashboard receipt
Full walkthrough: configs/opencode/README.md
- Install Zoo Code
- API Provider → OpenAI Compatible
- Same three fields as Cline (table above)
- If you imported Roo settings, delete leftover
sk-…keys - Short prompt → reply → Prune dashboard receipt
Full walkthrough: configs/zoo-code.md
# macOS / Linux / Git Bash
./examples/curl-smoke.sh prune_your_key
# PowerShell (Windows) — same two requests without bash:
# curl.exe https://api.withprune.com/v1/models -H "Authorization: Bearer prune_…"
# curl.exe https://api.withprune.com/v1/chat/completions `
# -H "Authorization: Bearer prune_…" -H "Content-Type: application/json" `
# -d '{\"model\":\"gpt-4o-mini\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":16}'Look for prune_metadata in the response (cost, model, cache fields). If
signing is enabled, you should also see receipt_signature.
Dashboard → Optimize → Shield → set a daily cap on your key. Over budget,
requests return 429 with X-Prune-Shield-Code: spend_cap.
See TEST_PLAN.md for a step-by-step checklist (fresh install, key out of plaintext, spend cap, signed receipt, tool quirks).
Prune is in private beta and free to join right now:
withprune.com — sign up, vault a
provider key, and you'll have a prune_… key in about 5 minutes.
Full docs: withprune.com/coding-agents
- Not the Prune API server
- Not the vault or encryption internals
- Not a fork of Cline / Kilo / OpenCode
Apache License 2.0 — see LICENSE.