ContextOS tool claims 97% token reduction by sending only relevant files to AI models
A developer has released ContextOS, an open-source command-line tool designed to reduce the number of tokens sent to AI models like Claude and ChatGPT. Instead of pasting entire codebases, ContextOS scans a repository, ranks files by relevance to a specific task, and exports a trimmed context pack. When tested on the FastAPI repository containing 2,811 files, the tool reduced token usage from roughly 284,000 to about 8,000 for a single task. It uses keyword matching, import graph analysis, AST symbol extraction, and Git churn scoring to determine which files matter most. The tool runs fully locally with no cloud dependency, automatically redacts secrets, and can also function as an MCP server for direct integration with Claude Desktop.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in