gitwtfhub

wtf is compress?

tokz-dev/compress — explained in plain English

Analysis updated 2026-05-18

1TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TL;DR

A local MCP server that shows AI coding agents a byte-exact compressed slice of a file, relevant to their query, instead of the whole file.

Mindmap

mindmap
  root((repo))
    What it does
      Compresses files for agents
      Byte exact code spans
      Retrieves elided code on demand
    Tech stack
      TypeScript
      MCP
      Node.js
    Use cases
      Reduce agent token usage
      Auto configure coding tools
      Verify code before editing
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Cut down how many tokens a coding agent spends reading large files.

REASON 2

Automatically configure Claude Code, Cursor, or Codex to use compressed file reads.

REASON 3

Retrieve a specific elided code range from a compressed file when needed.

REASON 4

Verify that code shown to an agent exactly matches what is on disk before editing.

What's in the stack?

TypeScriptNode.jsMCP

How it stacks up

tokz-dev/compress0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyhardeasy
Complexity2/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Codex CLI currently hides stdio MCP tools from the model, so Codex may not use it automatically yet.

MIT license: use it, modify it, and share it freely, including commercially.

Wtf does this do

@tokz/compress is a local tool that helps AI coding agents avoid wasting effort reading entire files when they only need a few specific functions from them. It runs as an MCP server, a kind of local plugin that AI coding tools like Claude Code, Cursor, or Codex can call, and instead of handing the agent a whole file, it shows a compressed version containing just the parts relevant to what the agent is actually looking for. Everything else in the file is reduced down to a short signature showing that more code exists there, and it can be pulled back in full almost instantly if it turns out to matter after all. The key guarantee is that any code shown to the agent is an exact, byte-for-byte copy of what is really in the file on disk, including correct line numbers, never a summary or a paraphrased version. This is checked automatically every time, and any piece of code that fails that check is simply dropped rather than shown incorrectly. This matters because if an agent tries to edit code based on a paraphrased version that does not exactly match the real file, the edit will fail or, worse, the agent may reason about code that was never actually there. Setup is done through a single command line tool that automatically detects which AI coding tools are installed, such as Claude Code, Cursor, Antigravity, Windsurf, and Codex, and configures each one correctly for its own operating system and expected file paths. It handles some tricky details on its own, like using the correct command form on Windows so it does not fail to launch, and giving Claude Code a special plugin installation that also adds automatic hooks so compression happens without the agent needing to choose to use it. Every configuration change it makes backs up the original file first, and it will not touch a file that is not valid JSON. The project runs entirely on the user's own machine, requires no account, no API key, and no network connection, and is released under the MIT license.

Yoink these prompts

Prompt 1
Help me install tokz-dev/compress and set it up for Claude Code.
Prompt 2
Explain how tokz_retrieve brings back elided lines from a compressed file.
Prompt 3
Walk me through what happens when I run compress on a specific file with a query.
Prompt 4
Explain why byte-exact code spans matter for an agent making file edits.

Frequently asked questions

wtf is compress?

A local MCP server that shows AI coding agents a byte-exact compressed slice of a file, relevant to their query, instead of the whole file.

What language is compress written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, MCP.

What license does compress use?

MIT license: use it, modify it, and share it freely, including commercially.

How hard is compress to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is compress for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.