Metadata-Version: 2.4
Name: llmcap
Version: 0.1.0
Summary: Real-time LLM spend enforcement — CLI and tray app
Project-URL: Homepage, https://llmcap.io
Project-URL: Repository, https://github.com/celikkanat/llmcap
License: MIT
Keywords: anthropic,budget,llm,openai,proxy,spending
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: click>=8.1.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: httpx>=0.27.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest>=8.3.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Provides-Extra: server
Requires-Dist: anthropic>=0.40.0; extra == 'server'
Requires-Dist: asyncpg>=0.29.0; extra == 'server'
Requires-Dist: bcrypt>=4.2.0; extra == 'server'
Requires-Dist: fastapi>=0.115.0; extra == 'server'
Requires-Dist: pydantic-settings>=2.4.0; extra == 'server'
Requires-Dist: pydantic>=2.8.0; extra == 'server'
Requires-Dist: python-jose[cryptography]>=3.3.0; extra == 'server'
Requires-Dist: pyyaml>=6.0.2; extra == 'server'
Requires-Dist: redis[asyncio]>=5.0.0; extra == 'server'
Requires-Dist: uvicorn[standard]>=0.30.0; extra == 'server'
Provides-Extra: tray
Requires-Dist: pillow>=10.0.0; extra == 'tray'
Requires-Dist: pystray>=0.19.0; extra == 'tray'
Description-Content-Type: text/markdown

# LLMCap

> Hard dollar caps on AI API calls. When you hit $50, it stops. Not an alert — it stops.

## Install

```bash
pip install llmcap
```

## Configure

```bash
llmcap configure
# Enter your LLMCap API URL and workspace ID
```

## Commands

```bash
llmcap status      # Today's spend, burn rate, blocked requests
llmcap logs -n 20  # Last 20 requests
llmcap keys        # List API keys
llmcap budgets     # List budget rules
```

## How it works

Change one line in your code:

```python
# Before
client = Anthropic(api_key="sk-ant-...")

# After
client = Anthropic(
    api_key="sk-ant-...",
    base_url="https://proxy.llmcap.io/anthropic"
)
```

When you hit your dollar cap, the next request returns `429` instead of forwarding to Anthropic. The token is never consumed. The money is never spent.

## Links

- Website: [llmcap.io](https://llmcap.io)
- Dashboard: [app.llmcap.io](https://app.llmcap.io)
- GitHub: [github.com/celikkanat/llmcap](https://github.com/celikkanat/llmcap)
