CLI Agent Integrations
Point any LLM CLI agent at Cosen so every command is priced, traced, and scanned.
How it works
Cosen exposes both the OpenAI-compatible /v1/chat/completions and the Anthropic /v1/messages endpoints. CLI agents that talk to either of those formats can use Cosen as a local gateway.
OpenAI Codex CLI
Anthropic Claude CLI
Claude CLI sends Anthropic Messages API requests. Cosen translates them internally, runs security scanners, checks budgets, and converts the response back seamlessly.
Simon Willison's llm
Use llm templates or aliases to make Cosen the default for daily use.
aider
What gets traced
- Input scan for secrets, PII, injection, and jailbreak phrasing.
- Daily budget check before the upstream call.
- Output scan for system-prompt leaks and secrets.
- Cost, latency, and feature tags stored in local SQLite.
View traces in the web app at http://127.0.0.1:8080 or run cosen report.
Cursor and other editors
For Cursor, use the MCP config to expose Cosen tools directly inside the editor. For other editors that support OpenAI-compatible endpoints, set their base URL to http://127.0.0.1:8080/v1.