MrGray17

MrGray17 / opentoken

Public

Token-saving companion for OpenCode — 42 compression layers, zero risk, no caveman speak

34
0
100% credibility
Found May 26, 2026 at 34 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

OpenToken is a plugin that makes AI coding assistants work faster and cost less by intelligently compressing the text that goes back and forth. It automatically loads into your coding workflow, safely removes sensitive information like passwords from outputs, and replaces verbose command results with shorter summaries that still contain all the important details. The plugin learns as you work, saving tokens that translate to real money saved on AI API costs.

How It Works

1
🔧 Discover OpenToken

Someone learns about this plugin through word-of-mouth or a GitHub star, intrigued by the promise of saving money on their AI coding assistant.

2
Install with one command

They run a simple install command and the plugin automatically loads into their coding assistant the next time they start working.

3
🛡️ Secrets stay safe

Every time they run a command, the plugin scans the output and automatically removes any passwords or keys before the AI ever sees them.

4
📦 Outputs get smaller

Long file listings, git diffs, test results, and JSON data get compressed into shorter summaries while keeping all the important information.

5
The AI still understands everything
📊
Big projects benefit most

Long coding sessions with many file reads and command outputs save the most tokens

💰
Everyone sees savings

Even shorter sessions add up, and users can check their stats anytime

Faster responses, lower costs

The coding assistant responds more quickly and users save money on their AI subscription while working on their projects.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 34 to 34 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is opentoken?

OpenToken is a plugin for OpenCode that slashes the tokens you burn through during coding sessions. It intercepts tool output before it reaches the LLM and runs it through 35 layers of compression -- everything from stripping ANSI escape codes to replacing entire repeated code blocks with tiny markers. The model still sees the same semantic meaning but talks completely normally. It also compresses model responses on the way out. The plugin claims 74% overall compression in production, with 93% median on compressible calls.

Why is it gaining traction?

The hook is simple: AI coding costs money, and this openly saves tokens without making the model sound like a caveman. Most compression tools degrade output quality -- OpenToken's "zero-risk principle" means every stage only applies if it actually shrinks things. It handles seven tool families specifically (git, npm, cargo, docker, pip, make, and filesystem), plus generic text and JSON. The LSP-first enforcement is interesting: it blocks symbol searches through grep and suggests real LSP tools instead, cutting navigation costs by 80%. It runs on Bun with zero config upfront.

Who should use this?

OpenCode power users burning through API quotas who want to extend their budget. Teams working on large codebases where every grep or read call generates massive output. Developers in token-heavy languages (verbose TypeScript configs, sprawling JSON) who notice their context windows filling up fast. If you're just dabbling in OpenCode, the overhead of yet another plugin probably isn't worth it -- but if you're running it daily on production projects, the savings compound quickly.

Verdict

This is a clever, well-architected tool with proven real-world numbers behind it. At 34 stars with a 1.0% credibility score, it's early and unproven at scale -- the README metrics look real but aren't independently audited. The TypeScript codebase is substantial and the test coverage exists, but you're adopting a hobby project for something mission-adjacent to your workflow. Use it if you're already deep on OpenCode and want to experiment with token costs, but don't bet critical work on it staying stable as the author iterates.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.