Skip to main content

capit_500

Budget per-agent, per-provider, as little or as much as you want

Ever been sticker shocked with a high inference bill only to find that the agent got stuck in some unproductive loop?

You need to manage the spending independent of the broken tool and broken agent.

capit, part of the DAY50 suite of open-source tools for AI workflows, allows for managing application-based key management with cost capping.

GUI

$ uvx capit serve
capit-ss

TUI

$ uvx capit openrouter 5.00 --agent openclaw
$5.00 openrouter key installed into openclaw
Old configuration backed up to /tmp/capit-openclaw-no22x7b1

That's it. Openclaw now has a capped API key. If it goes rogue, it can only cost you $5.

Everything is stored local-only or, optionally, not at all.

There are no capit servers and nothing is sent to us.


Supported Agents

Agent Config File Command
Claude Code ~/.claude/.credentials.json capit openrouter 5.00 --agent claude
Cursor ~/.config/Cursor/User/settings.json capit openrouter 5.00 --agent cursor
Windsurf ~/.config/Windsurf/User/settings.json capit openrouter 5.00 --agent windsurf
Hermes ~/.hermes/.env capit openrouter 5.00 --agent hermes
OpenClaw ~/.openclaw/secrets.json + openclaw.json capit openrouter 5.00 --agent openclaw
Opencode ~/.local/share/opencode/auth.json capit openrouter 5.00 --agent opencode

Run capit --agents to list all agents, or see agents/README.md for adding custom agents.


Install

uv tool install capit

Usage

Give an agent a budget

# Claude Code - $5 cap
capit openrouter 5.00 --agent claude

# Cursor - $10 cap
capit openrouter 10.00 --agent cursor

# Windsurf - $5 cap
capit openrouter 5.00 --agent windsurf

# Hermes - $5 cap
capit openrouter 5.00 --agent hermes

# OpenClaw - $5 cap
capit openrouter 5.00 --agent openclaw

# Opencode - $5 cap
capit openrouter 5.00 --agent opencode

Each agent gets its own capped key. Sleep soundly.

More agents

capit --agents  # List all supported agents

See agents/README.md for the full list and adding custom agents. The supported agents table above has details on each.

Platforms

The included platforms are openrouter, aihubmix, and concentrate.

Platforms are easy to create with a claude skill located in skills/platform-creator.md.

See platforms/README.md for more details.


Administration

capit --keys list              # List all keys with spending info
capit --keys list openrouter   # List keys from specific provider
capit --keys delete <name>     # Delete a key (e.g., claude-71ad2519)
capit --keys delete 'capit-*'  # Delete keys matching pattern
capit --platforms              # List available platforms
capit --platforms add          # Add a master key
capit --platforms remove       # Remove a master key
capit --agents                 # List supported agents

How It Works

  1. You run capit openrouter 5.00 --agent claude
  2. capit calls OpenRouter's API
  3. capit creates a guardrail with $5 cap
  4. capit creates an API key with that guardrail
  5. capit writes the key to ~/.claude/.credentials.json
  6. Done

The cap is enforced by OpenRouter. The key literally cannot spend more than $5.


MIT License

Metadata

Release files for capit 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capit 0.9.0
File Size Uploaded
capit-0.9.0.tar.gz 56.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for capit 0.9.0
File Interpreter ABI Platform
capit-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 112.9 kB

Release files / capit-0.9.0.tar.gz

Download URL capit-0.9.0.tar.gz
Size 56.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1ca6b7552df4e71f075c9e1167ee23ebc1d05cb5188cbce5b7dcb8e09c67b6ef
BLAKE2b-256 checksum
How to use checksums
be294a7e671b3cc25a1d07d3869825fdd9a3f42316785bb589b71cfdba89f776
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / capit-0.9.0-py3-none-any.whl

Download URL capit-0.9.0-py3-none-any.whl
Size 56.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa74bb9768632c79307f0c8d7cd412ce8762f0b0fd6c576f6b9feafa7254b2af
BLAKE2b-256 checksum
How to use checksums
0d0a0a87dd6f23fdc89e1c14965090244c69eaa04a93ad2cb4b00c77cc6e675f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page