Skip to main content

Documentation 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 init launches a full-screen terminal UI form that walks you through every configuration option and writes a ready-to-use burnguard.yaml to your current working directory. Run it once after installation, and the proxy is ready to start.

Usage

burnguard init
No flags or arguments are accepted. The entire setup is driven by the interactive TUI.

What the wizard asks

The wizard is split into several sequential screens. Use Tab / arrow keys to navigate options and Enter to confirm each screen.
1

AI providers

A multi-select list of supported AI providers. Select every provider your application talks to.
OptionValue written to config
Anthropic (Claude) (pre-selected)anthropic
OpenAI (GPT)openai
Google Gemini support is present in the codebase but not yet exposed in the wizard. Add it manually to burnguard.yaml after generation if needed.
2

Monthly budget limit (USD)

Enter a number representing your monthly spending cap in US dollars. The field displays a placeholder of 50.00.
There is a known bug in the current wizard: the huh.NewInput() for this field captures input into a temporary local string pointer, not into the budgetLimit variable. As a result, budget.limit is always written as 0 in the generated burnguard.yaml regardless of what you type. After running burnguard init, open burnguard.yaml and manually set budget.limit to your intended value.
3

BurnGuard Cloud sync token

Confirm whether you have a BurnGuard Cloud sync token (obtainable at burnguard.run after signing up). Answering No skips the next screen and leaves sync.enabled: false in the generated config.
4

Paste your sync token

(Shown only if you answered Yes above.)Paste a token in the form bg_.... The value is written to sync.token and sync.enabled is set to true.
5

Slack alerts

Confirm whether you want Slack budget alerts. Answering No skips the next screen and leaves alerts.slack_webhook empty.
6

Paste your Slack webhook URL

(Shown only if you answered Yes above.)Paste a URL in the form https://hooks.slack.com/services/....
7

Discord alerts

Confirm whether you want Discord budget alerts. Answering No skips the next screen and leaves alerts.discord_webhook empty.
8

Paste your Discord webhook URL

(Shown only if you answered Yes above.)Paste a URL in the form https://discord.com/api/webhooks/....
9

Alert thresholds

A multi-select of the percentage thresholds at which alerts fire. All three are pre-selected by default.
OptionValue written to config
50% of budget (pre-selected)0.5
80% of budget (pre-selected)0.8
100% of budget (pre-selected)1.0
10

Proxy port

The port the reverse proxy will listen on. Defaults to 8080 if left blank. The value is prepended with : in the config (e.g. :8080).

Output

After the form completes, BurnGuard prints a summary and writes the file:
✅ Config written to burnguard.yaml

To start the proxy:
  burnguard start

Then point your app at:
  Anthropic: http://localhost:8080/anthropic/v1/messages
  OpenAI:    http://localhost:8080/openai/v1/chat/completions
The exact endpoint lines shown depend on which providers you selected. Only selected providers appear in the output and in the generated config.

Generated file

burnguard.yaml is created in the directory where you ran burnguard init. Below is a fully annotated example:
# burnguard.yaml

server:
  proxy_port: ":8080"   # HTTP port the proxy listens on
  db_path: burnguard.db # SQLite database file for request history

budget:
  limit: 0              # BUG: wizard always writes 0 — set this manually after init

providers:
  anthropic:
    base_url: https://api.anthropic.com
  openai:
    base_url: https://api.openai.com

alerts:
  slack_webhook: "https://hooks.slack.com/services/..."
  discord_webhook: "https://discord.com/api/webhooks/..."
  thresholds:
    - 0.5   # alert at 50%
    - 0.8   # alert at 80%
    - 1.0   # alert at 100%

sync:
  enabled: true
  token: "bg_..."
  url: "https://api.burnguard.run"
  interval: 60  # seconds between sync pushes

Re-running init

You can run burnguard init again at any time to regenerate the config from scratch.
Re-running burnguard init overwrites the existing burnguard.yaml completely. Any manual edits you have made — such as a custom db_path, extra providers, or tweaked thresholds — will be lost. Back up the file first if you have local customisations.

Manual configuration

If you prefer to skip the wizard and edit YAML directly, or if you need to tune fields the wizard does not expose, see the full burnguard.yaml reference. Every field in the Config, ServerConfig, BudgetConfig, ProviderConfig, AlertConfig, and SyncConfig structs is documented there.

Dependencies

The init wizard is built on Charmbracelet Huh v1. It requires a terminal that supports TUI rendering (colour, cursor movement, raw mode).
burnguard init is not suitable for CI/CD pipelines or non-interactive shells. In automated environments, write burnguard.yaml directly from a template and use burnguard start without running the wizard.

Build docs developers (and LLMs) love