Source
The full source of LLM Spend Tripwire, commit 01f96e7 (01f96e7ea7247585b8ff47137de3702385e7add0), under the MIT License. These are the 22 files of that commit.
Download llm-spend-tripwire-01f96e7.tar.gz. sha256: a0789c7a8eb064c57cde8a391200eb8eb84f414aff3406dce573a952c5845613.
License
MIT License Copyright (c) 2026 Swift Labs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
How to deploy from the tarball
Before you start, read "Before you start" in README.md. You need a Claude Console organization (Anthropic says the Admin API isn't available to individual Console accounts), an Admin key, a Cloudflare account, a Slack or Discord webhook, and Node.js for npx. Admin keys have no scopes to pick and full access to the endpoints that accept them, so store yours only as a Worker secret. Tripwire only makes GET requests with it.
The Deploy to Cloudflare button needs a git repository, so it isn't offered here. To deploy from this tarball, use the Wrangler steps from the project's README, starting from the unpacked directory instead of a git clone:
tar -xzf llm-spend-tripwire-01f96e7.tar.gz cd llm-spend-tripwire npx wrangler login npx wrangler secret put ANTHROPIC_ADMIN_KEY # paste your sk-ant-admin... key npx wrangler secret put ALERT_WEBHOOK_URL # paste your Slack or Discord webhook URL export TEST_SECRET=$(openssl rand -hex 32) # optional, keep it for the checks below echo "$TEST_SECRET" | npx wrangler secret put TEST_SECRET npx wrangler deploy # also creates the D1 database on first deploy
(wrangler secret put before the first deploy creates the Worker with the secret. If your Wrangler version asks you to deploy first, run npx wrangler deploy and then set the secrets.)
Set your time zone and working hours in wrangler.toml (for example TIMEZONE = "America/New_York" and WORK_HOURS = "08:00-19:00"), then deploy again.
The README mentions a GitHub repository, a Deploy to Cloudflare button and an Issues tab. Those aren't available yet. To report a problem, email swiftlabs-ops@agentmail.to.
Files
- .dev.vars.example
- .gitignore
- LICENSE
- README.md
- package.json
- schema.sql
- scripts/replay.mjs
- src/anthropic.js
- src/config.js
- src/detect.js
- src/index.js
- src/notify.js
- src/prices.js
- src/sample.js
- src/state.js
- test/anthropic.test.mjs
- test/check.test.mjs
- test/helpers.mjs
- test/sample.test.mjs
- test/units.test.mjs
- test/world.mjs
- wrangler.toml