|
3 | 3 | </p> |
4 | 4 |
|
5 | 5 | <p align="center"> |
6 | | - <a href="https://github.com/alexgreensh/token-optimizer/releases"><img src="https://img.shields.io/badge/version-5.6.13-green" alt="Version 5.6.13"></a> |
| 6 | + <a href="https://github.com/alexgreensh/token-optimizer/releases"><img src="https://img.shields.io/badge/version-5.7.0-green" alt="Version 5.6.13"></a> |
7 | 7 | <a href="https://github.com/alexgreensh/token-optimizer/releases"><img src="https://img.shields.io/github/release-date/alexgreensh/token-optimizer?label=last%20release&color=blue" alt="Last Release"></a> |
8 | 8 | <a href="https://github.com/alexgreensh/token-optimizer"><img src="https://img.shields.io/badge/Claude_Code-Plugin-blueviolet" alt="Claude Code Plugin"></a> |
9 | 9 | <a href="https://github.com/alexgreensh/token-optimizer/tree/main/openclaw"><img src="https://img.shields.io/badge/OpenClaw-v2.4.1-brightgreen" alt="OpenClaw v2.4.1"></a> |
| 10 | + <a href="https://github.com/alexgreensh/token-optimizer/tree/main/opencode"><img src="https://img.shields.io/badge/OpenCode-v1.0.0-58a6ff" alt="OpenCode v1.0.0"></a> |
10 | 11 | <a href="https://github.com/alexgreensh/token-optimizer/blob/main/docs/codex-beta.md"><img src="https://img.shields.io/badge/Codex-v0.1.0--beta-orange" alt="Codex v0.1.0-beta"></a> |
11 | 12 | </p> |
12 | 13 | <p align="center"> |
@@ -42,7 +43,7 @@ They compress command output, which covers 15-25% of your context on a good day. |
42 | 43 | Token Optimizer covers all of it, keeps your work alive across compactions, measures whether the optimization actually helped, and gives you a <strong>live dashboard</strong> that shows every token, every dollar, and every turn, auto-updated after every session. Runs fully local. Zero context tokens used. Zero runtime dependencies. |
43 | 44 | </p> |
44 | 45 | <p align="center"> |
45 | | -Works on <strong>Claude Code</strong>, <strong>OpenClaw</strong>, and <strong>Codex</strong> (beta) today. Windsurf, Cursor, and more on the way. |
| 46 | +Works on <strong>Claude Code</strong>, <strong>OpenCode</strong>, <strong>OpenClaw</strong>, and <strong>Codex</strong> (beta) today. Windsurf, Cursor, and more on the way. |
46 | 47 | </p> |
47 | 48 |
|
48 | 49 | <p align="center"> |
@@ -93,7 +94,7 @@ git clone https://github.com/alexgreensh/token-optimizer.git ~/.claude/token-opt |
93 | 94 | bash ~/.claude/token-optimizer/install.sh |
94 | 95 | ``` |
95 | 96 |
|
96 | | -Works on Claude Code and [OpenClaw](#openclaw-plugin). Each platform has its own native plugin (Python for Claude Code, TypeScript for OpenClaw). No bridging, no shared runtime, zero cross-platform dependencies. |
| 97 | +Works on Claude Code, [OpenCode](#opencode), and [OpenClaw](#openclaw). Each platform has its own native plugin (Python for Claude Code, TypeScript for OpenCode and OpenClaw). No bridging, no shared runtime, zero cross-platform dependencies. |
97 | 98 |
|
98 | 99 | </details> |
99 | 100 |
|
@@ -123,6 +124,33 @@ See [`docs/codex-beta.md`](docs/codex-beta.md) for the full feature parity table |
123 | 124 |
|
124 | 125 | </details> |
125 | 126 |
|
| 127 | +<details> |
| 128 | +<summary><h3>OpenCode</h3></summary> |
| 129 | + |
| 130 | +Native TypeScript plugin for [OpenCode](https://github.com/anomalyco/opencode) with full Claude Code feature parity. 7-signal dual-score quality engine, smart compaction with mode-aware context injection, session continuity, quality nudges, loop detection, and a built-in dashboard. |
| 131 | + |
| 132 | +```bash |
| 133 | +opencode plugin add token-optimizer-opencode |
| 134 | +``` |
| 135 | + |
| 136 | +Or add to `.opencode/opencode.jsonc`: |
| 137 | + |
| 138 | +```jsonc |
| 139 | +{ |
| 140 | + "plugin": ["token-optimizer-opencode"] |
| 141 | +} |
| 142 | +``` |
| 143 | + |
| 144 | +Two custom tools are available inside OpenCode: |
| 145 | +- `token_status` for on-demand quality reports |
| 146 | +- `token_dashboard` to generate and open the visual dashboard |
| 147 | + |
| 148 | +Works with every model OpenCode supports: Anthropic, OpenAI, Google, DeepSeek, Qwen, Mistral, xAI, and local models. MRCR quality curves are calibrated per model family. |
| 149 | + |
| 150 | +See [`opencode/README.md`](opencode/README.md) for full docs, configuration options, and environment variable overrides. |
| 151 | + |
| 152 | +</details> |
| 153 | + |
126 | 154 | <details> |
127 | 155 | <summary><h3>OpenClaw</h3></summary> |
128 | 156 |
|
@@ -192,7 +220,7 @@ Token Optimizer handles both. And because it also checkpoints your session befor |
192 | 220 |
|
193 | 221 | ### Fully local, zero dependencies, zero telemetry |
194 | 222 |
|
195 | | -Pure Python stdlib on Claude Code and Codex. Pure Node stdlib on OpenClaw. Nothing to `pip install`, nothing to `npm install` at runtime, no analytics endpoint, no phone-home. Every measurement is a local SQLite write to a file you own under your runtime home, such as `~/.claude/_backups/token-optimizer/trends.db` or `~/.codex/_backups/token-optimizer/trends.db`. You can inspect it, export it, or delete it. |
| 223 | +Pure Python stdlib on Claude Code and Codex. TypeScript with zero runtime deps on OpenCode and OpenClaw. Nothing to `pip install`, no analytics endpoint, no phone-home. Every measurement is a local SQLite write to a file you own under your runtime home. You can inspect it, export it, or delete it. |
196 | 224 |
|
197 | 225 | ### Zero context tokens consumed |
198 | 226 |
|
@@ -254,7 +282,7 @@ No. All hooks are non-blocking with fail-open design. If a Token Optimizer scrip |
254 | 282 | <details> |
255 | 283 | <summary>📦 <strong>Does it have any runtime dependencies?</strong></summary> |
256 | 284 |
|
257 | | -No. Pure Python stdlib on Claude Code and Codex. Pure Node stdlib on OpenClaw. Nothing to `pip install`, nothing to `npm install` at runtime. What you clone is everything it needs. |
| 285 | +No. Pure Python stdlib on Claude Code and Codex. TypeScript with zero runtime deps on OpenCode and OpenClaw. What you clone (or `opencode plugin add`) is everything it needs. |
258 | 286 | </details> |
259 | 287 |
|
260 | 288 | <details> |
|
0 commit comments