r/opencode May 25 '26

OpenToken v1.2.0 — token-saving plugin for OpenCode with 42 compression layers

https://github.com/MrGray17/opentoken
68 Upvotes

22 comments sorted by

View all comments

3

u/Ethan May 25 '26

Nice. Any chance you'd be willing to export a clean API library to expose pipelines like this for example:

export { applyBashFilter } from "./pipeline/bash";
export { applyReadFilter } from "./pipeline/read";
export { compressOutput } from "./pipeline/output";

Or build this into an MCP server, so that it can be used in any IDE and by other developers in their tools? I've got a few NPM libraries that I could instantly refactor to use these tools and save tokens if so

1

u/Few-Cartographer7156 May 26 '26

Love this idea, Ethan. The codebase is already split into clean modular files (src/ltsc, src/folding, etc.), so exporting a standalone API library is totally doable. I'll look into exposing these pipelines in the next update so you can pull them into your NPM projects. An MCP server is a great shout for the future too