ContextOS CLI Trims AI Coding Context to Only Relevant Files, Saving Tokens
A developer has released ContextOS, an open-source local CLI tool designed to solve the problem of oversized codebases overwhelming AI coding assistants like Claude and Copilot. The tool scans a project repository and generates a compact context pack containing only the files most relevant to a given task, using five signals including keyword matching, import graph centrality, AST symbol overlap, git churn, and secret detection. In one example, it reduced context from roughly 54,000 tokens to under 7,000 — an 87% reduction — while automatically redacting credentials. ContextOS also supports Model Context Protocol (MCP), allowing AI agents to query the repo directly as a tool without using the CLI. The project is available on GitHub under the Apache-2.0 license, runs fully offline with no telemetry, and supports Python 3.11–3.13 on Linux and macOS.
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