By the end of this guide you will have the BurnGuard proxy running locally, aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Verifieddanny/BurnGuard/llms.txt
Use this file to discover all available pages before exploring further.
burnguard.yaml config generated by the interactive wizard, and your first AI request flowing through the proxy with live token counting and budget enforcement active.
Prerequisites
BurnGuard ships as a single statically compiled binary with no external runtime, no Docker, and no system dependencies. All you need is a terminal.Installation
Install BurnGuard
Pick the method that matches your platform. All four options install the same binary.The curl and PowerShell scripts download the latest release from GitHub, place the binary in
/usr/local/bin (macOS/Linux) or %LOCALAPPDATA%\BurnGuard (Windows), and add it to your PATH automatically.Verify the install:Run the setup wizard
The interactive The wizard walks you through:
init command asks you a handful of questions and writes a burnguard.yaml in your current directory. No YAML editing required.- Provider selection — choose Anthropic, OpenAI, or both
- Monthly budget limit — a USD amount (default:
50.00) - Cloud sync token — optional; paste a
bg_...token from burnguard.run to enable the dashboard - Slack webhook — optional; paste an incoming webhook URL for Slack alerts
- Discord webhook — optional; paste a Discord webhook URL
- Alert thresholds — choose which percentages trigger a notification (50%, 80%, 100% are pre-selected)
- Proxy port — the local port to listen on (default:
8080)
burnguard.yaml
Start the proxy
- Loads
burnguard.yamlfrom the current directory - Opens (or creates) the SQLite database at the configured
db_path - Reads the sum of all previous request costs from the database and seeds the in-memory budget tracker — enforcement picks up exactly where it left off
- Starts the HTTP proxy on the configured port
- Launches the background sync goroutine if
sync.enabledistrue
Update your app to point at the proxy
Change one line in your application — the base URL. Your API key stays in your app exactly where it is and is forwarded transparently by BurnGuard.
Verify it's working
Fire a request from your app and watch the proxy logs. After each non-streaming response you will see a line like:For streaming responses, the log line appears when the stream closes:If your spend crosses an alert threshold, you will also see:Once you hit the budget limit, any further request will be blocked before it reaches the provider:
Next Steps
How It Works
Understand the request flow, SSE streaming, budget middleware, and sync internals.
Configuration
Full reference for every field in
burnguard.yaml.Cloud Dashboard
Connect a sync token and explore the burnguard.run analytics UI.
