terseai
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 29 GitHub stars
Code Uyari
- process.env — Environment variable access in examples/agent.js
- process.env — Environment variable access in examples/basic.js
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Claude Code & Cursor token usage monitor and cost tracker for macOS & Windows. Live token/cost/burn monitoring across 8 AI coding agents, a budget circuit breaker that stops runaway agents before the next API call, an MCP manager, and 40-70% on-device prompt compression.
Terse — the AI agent butler
Cut AI coding agent costs 40–70%. Live-monitor Claude Code, Cursor, Codex and Copilot, stop runaway agents before the next API call, and compress every prompt on-device. macOS & Windows.
🌐 terseai.org · ⬇️ Download · 📖 Docs · 💸 Token calculator · ⚖️ vs ccusage & others
What is it? · Quickstart · See it · Capabilities · Agents · vs alternatives · FAQ · SDK
What is Terse?
Terse (the tool at terseai.org) is an on-device AI agent butler for macOS and Windows, with Chrome and VS Code extensions. It watches the AI coding agents you already run — Claude Code, Cursor, OpenAI Codex, GitHub Copilot CLI, Cline, Windsurf, OpenClaw and Aider — and handles the parts that quietly cost you money:
- Compresses every prompt 40–70% before it hits the API, meaning preserved. 35+ techniques, sub-5ms, code always protected.
- Monitors each agent live — tokens, cost, cache read/write efficiency, burn rate, context fill.
- Stops runaway agents with a budget circuit breaker that pauses (
SIGSTOP) or kills (SIGTERM) the process before the next API call. - Manages your MCP servers — discover, risk-score and toggle without editing JSON.
- Diagnoses waste with ~25 one-click Terse Doctor scans.
Everything runs locally. Your prompts and sessions never leave your machine.
This repository also holds the Terse SDK (MIT) — the token-optimization framework the app is built on — and the benchmark harness behind the 40–70% figure.
How it works
flowchart LR
U([You prompt an agent]) --> T{{Terse runs on-device}}
T -->|compress 40-70 percent| S([Smaller prompt])
T -->|monitor| M([Live tokens, cost, cache, burn])
T -->|guard| B([Budget breaker stops<br/>runaway agents])
S --> API([AI API])
M --> API
B -.->|before next call| API
API --> W([Lower bill, same result])
classDef terse fill:#c6d82c,stroke:#c6d82c,color:#0a0a0a,font-weight:bold;
classDef node fill:#12140d,stroke:#3a3f26,color:#e8ece0;
class T terse;
class U,S,M,B,API,W node;
⭐ If Terse saves you tokens, drop a star — it's the fastest way to help other developers find it.
Quickstart
The app (monitoring, budget breaker, MCP manager, Doctor):
# macOS — download the signed .dmg
open https://github.com/lucaszengool/Terse/releases/latest
Windows build and extensions: see Download.
The SDK (build cost-aware LLM apps yourself — MIT licensed):
git clone https://github.com/Terse-AI/terseai.git
cd terseai
npm run benchmark # reproduce the 40-70% numbers on your own machine
npm test # 9 behavioural tests over the public API
import { TerseContext } from './src/index.js';
const ctx = new TerseContext({
model: 'claude-sonnet-4-6',
budget: 8000, // hard token ceiling for the context window
compression: 'balanced', // 'soft' | 'balanced' | 'aggressive'
});
const result = await ctx.chat([{ role: 'user', content: 'Explain recursion.' }]);
The
@terse-ai/sdknpm package isn't published yet — install from source by cloning this repo.
See it
![]() |
![]() |
| Overview dashboard Agent health, spend, burn rate & context at a glance. |
Token receipts & charts See exactly where your tokens and dollars go. |
![]() |
![]() |
| Doctor — ~25 waste scans Context overflow, duplicate MCP servers, one-click fixes. |
Team collaboration Share live agent sessions and hand off work. |
Capabilities
| Pillar | What it does | Learn more | |
|---|---|---|---|
| ⚡ | Optimize | Compress every prompt 40–70% — 35+ on-device techniques, code always protected. | Token optimization → |
| 📡 | Monitor | Live tokens, cost, cache efficiency, burn rate & context fill across 8 agents. | For Claude Code → |
| 🛑 | Budget breaker | Spend ceilings that pause or kill a runaway agent before its next API call. | Budget circuit breaker → |
| 🔌 | MCP manager | Discover every MCP server, risk-score each, toggle without editing JSON. | MCP manager → |
| 🩺 | Doctor | ~25 waste scans — cache thrash, duplicate calls, redundant reads, context burn. | Reduce AI API costs → |
| 👥 | Team | Share live agent sessions and team analytics by developer, project, and tool. | For teams → |
Which AI coding agents does Terse monitor?
Eight, auto-detected with no setup:
Claude Code · Cursor · OpenAI Codex · GitHub Copilot CLI · Cline · Windsurf · OpenClaw · Aider
Claude Code goes deepest: exact token counts, cache read/write efficiency, live JSONL streaming, and 30 days of historical backfill. The prompt optimizer works with any AI chat or agent, including ones not on this list.
How is Terse different from ccusage and usage dashboards?
Most tools in this space report what you spent. Terse is built to change it — compression before the call, and a circuit breaker that stops the process before the next one.
| Terse | ccusage | Claude-Code-Usage-Monitor | Provider dashboards | |
|---|---|---|---|---|
| Reports past spend | ✅ | ✅ | ✅ | ✅ |
| Live burn rate & context fill | ✅ | ⚠️ | ✅ | ❌ |
| Stops a runaway agent | ✅ pause/kill | ❌ | ⚠️ warns | ❌ |
| Compresses prompts | ✅ 40–70% | ❌ | ❌ | ❌ |
| MCP manager + risk score | ✅ | ❌ | ❌ | ❌ |
| Waste diagnosis | ✅ ~25 scans | ❌ | ❌ | ❌ |
→ Full comparison, including when to use something else — ccusage is free, excellent and one command away if all you need is a number.
Download
| Platform | |
|---|---|
| 🍎 macOS | Download the latest .dmg |
| 🪟 Windows | Terse for Windows |
| 🧩 Chrome | Chrome Web Store — compress prompts in any AI chat |
| 💻 VS Code | VS Code Marketplace — monitor agents + optimize in-editor |
| 📦 SDK | git clone https://github.com/Terse-AI/terseai.git — MIT, Node 18+ |
App: free 30-day trial · $4.99/mo · pricing. SDK: free, MIT.
Why it matters
| Without Terse | With Terse |
|---|---|
| Prompts sent full-length, every token billed | 40–70% smaller prompts, meaning intact |
| No idea what an agent is spending until the bill | Live per-turn cost, burn rate, context fill |
| A looping agent can burn $100s overnight | Hard ceiling pauses/kills before the next call |
| MCP tool bloat silently taxes every call | Discover, risk-score & disable unused MCP servers |
| Duplicate tool calls & re-reads go unnoticed | Doctor flags them with one-click fixes |
| Your prompts leave your machine | 100% on-device — nothing leaves your Mac/PC |
Three optimization modes
Code blocks, file paths, and technical terms are always protected.
- Soft — typo correction + whitespace only. 100% meaning-safe.
- Normal — removes filler, hedging, politeness padding, meta-language.
- Aggressive — maximum compression: abbreviations, article removal, telegraph style.
Grounded in real research — LLMLingua, Norvig spelling, and selective-context pruning.
Learn more
Guides: What is token optimization · Reduce AI API costs · Claude Code pricing 2026 · AI token pricing comparison · Blog
Compare: Cursor vs Claude Code · Claude Code vs Copilot · Windsurf vs Claude Code · AI coding agent costs
Per-tool: Claude Code · Cursor · ChatGPT · Copilot · Aider · Cline · Windsurf · Codex
In this repo: FAQ · Comparison · SDK reference · Examples · Benchmark · llms.txt
FAQ
How do I reduce Claude Code costs?Four levers, roughly in order of impact: send fewer tokens (Terse compresses every prompt 40–70% on-device); stop paying for cache misses (Doctor flags cache thrash — reordering a session so the stable prefix stays stable often beats compression); cut MCP tool bloat (unused servers re-send their catalogs on every call); and cap the downside with a hard ceiling, because most large bills are one unwatched loop. More →
Which AI coding agents does it work with?Terse auto-detects and monitors 8 agents: Claude Code, Cursor, OpenAI Codex, GitHub Copilot CLI, Cline, Windsurf, OpenClaw, and Aider. Claude Code has the deepest integration (exact token counts, cache efficiency, live JSONL streaming, 30-day history). The prompt optimizer works with any AI chat or agent.
What is a budget circuit breaker?A hard spending limit enforced at the process level rather than reported after the fact. Set a burn-rate, token, or dollar ceiling and Terse escalates from an alert to pausing (SIGSTOP) or killing (SIGTERM) the agent process before the next API call — so a looping agent can't burn hundreds of dollars overnight. Dashboards tell you the money is gone; a circuit breaker keeps it.
No. All compression and analysis run locally in a Rust/JavaScript engine. Your prompts and conversations are never sent to Terse's servers. Optional sign-in only enables subscription and team-sync features.
Will compression change the meaning of my prompts?In Soft and Normal modes, meaning is fully preserved — code blocks, file paths, and technical terms are always protected. Aggressive mode maximizes savings (abbreviations, article removal, telegraph style) for when you want the smallest possible prompt.
How much does Terse actually save — and can I verify it?40–70% on verbose prompts, less on prompts that were already terse. You can reproduce the numbers yourself: git clone https://github.com/Terse-AI/terseai.git && cd terseai && npm run benchmark. It reports each module separately (text compression, working memory, tool optimization, model routing) rather than one headline number.
The app has a free 30-day trial, then $4.99/month. The Chrome extension has a free tier. The Terse SDK in this repository is MIT licensed and free, benchmark harness included.
What is an MCP manager and why do I need one?Model Context Protocol (MCP) servers add tools to your agent — but bloated or unused tool catalogs quietly add hundreds of tokens to every call, and some servers carry security risk (remote transport, embedded credentials, code execution, unpinned supply chain). Terse discovers every MCP server across your Claude Code / Cursor / Windsurf configs, risk-scores each, and lets you enable or disable them without editing JSON.
Does Terse work on Linux?The desktop apps ship for macOS and Windows today. The Terse SDK in this repository is plain Node.js and runs anywhere Node 18+ runs, Linux included.
→ Full FAQ
The Terse SDK (MIT)
This repo contains the Terse SDK, a token-optimization framework for building cost-aware LLM apps: context compression, selective/verbatim compressors, working & episodic memory, model routing, and MCP/tool-catalog optimization.
import { linguisticCompress, optimizeTools, ModelRouter } from './src/index.js';
📖 Full SDK reference → SDK.md · examples/ · benchmark/ · Contributing · License
Privacy
All compression and analysis happen on your device (Rust/JS engine). Your prompts and conversations are never sent to Terse's servers. Optional sign-in enables subscription and team-sync only.
If Terse cuts your bill, ⭐ star the repo and tell a teammate.
terseai.org · Built with Tauri · Rust · Swift
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi



