<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kVadrum</title>
    <description>The latest articles on DEV Community by kVadrum (@kvadrum).</description>
    <link>https://dev.to/kvadrum</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4054178%2Fc7a82bea-df70-491e-8cc5-b42eefc0d072.jpeg</url>
      <title>DEV Community: kVadrum</title>
      <link>https://dev.to/kvadrum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kvadrum"/>
    <language>en</language>
    <item>
      <title>CTXLENS - like du for tokens</title>
      <dc:creator>kVadrum</dc:creator>
      <pubDate>Fri, 31 Jul 2026 04:28:23 +0000</pubDate>
      <link>https://dev.to/kvadrum/ctxlens-like-du-for-tokens-28g3</link>
      <guid>https://dev.to/kvadrum/ctxlens-like-du-for-tokens-28g3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Does my codebase fit in context?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is one of the first dev tools I created - for me was in the "Openclaw days" - early February into March of this year, was using Codex and some local Ollama; where I kept hitting the wall: context limits were rigid and often insufficient.  Now with 1M token contexts, and more robust frontier models, etc - the need for the tool is less. I'm now largely using frontier models and honestly use it nearly never.  But it was helpful at a moment in time.  Might still have value for those running local LLMs with limited contexts.&lt;/p&gt;

&lt;p&gt;Also, for full transparency - I snafu'd on my first public project - came up with the name quite organically - "context lens" - searched out ctxlens on npm, found the space open - built the tool.  Published it, started getting downloads on day one.  Odd.  Turns out dabit3 (a real dev) had created a project with the same name on GH and pointed to an npm package he never published.  I reached out and offered the namespace to him, and created "tokendu" as a backup repo/package.  No response as the interest in the project had presumably faded, so I kept the name.  Maintained, for now.  ;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problems it hoped to solve:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Will my project fit in context?" — Instant answer across 23 models from 7 providers. Know you're safe on Claude, tight on GPT-4o, and blown past Grok — without switching tools.&lt;/li&gt;
&lt;li&gt;"Which files are eating my budget?" — Ranked breakdown by file and directory, with bar charts. Find the token hogs the same way du finds disk hogs.&lt;/li&gt;
&lt;li&gt;"How much would I save by stripping comments?" — The diff command shows exact token savings before you change anything. Budget simulation, not guesswork.&lt;/li&gt;
&lt;li&gt;"Can I gate PRs on context budget?" — --ci flag exits non-zero when a threshold is exceeded. Same pattern as bundle size checks.&lt;/li&gt;
&lt;li&gt;"Which tokenizer should I care about?" — Side-by-side comparison of cl100k_base vs o200k_base. Relevant when switching between Claude and GPT families.&lt;/li&gt;
&lt;li&gt;"Is my repo getting bloated for AI?" — Real-time monitoring with watch mode. See utilization change as you code.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://www.npmjs.com/package/ctxlens" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;npmjs.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kVadrum" rel="noopener noreferrer"&gt;
        kVadrum
      &lt;/a&gt; / &lt;a href="https://github.com/kVadrum/ctxlens" rel="noopener noreferrer"&gt;
        ctxlens
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Token budget analyzer for AI context windows — like du for tokens.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;ctxlens&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/kVadrum/ctxlens/actions/workflows/ci.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/kVadrum/ctxlens/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/ctxlens" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/d3379650278dcc4be422aee44b1a3f95e98427ac402fc8f246d1febff2677395/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f6374786c656e732e737667" alt="npm version"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/ctxlens" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/9fbb8273f1bb9bd45d625a63e7af540a7cb232a96a4ef35b63d0d7791e622a3e/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f6374786c656e732e737667" alt="npm downloads"&gt;&lt;/a&gt;
&lt;a href="https://github.com/kVadrum/ctxlens/blob/main/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f6b4e54c7c01adaae3a6dfe992a0aa6d7eddfc87ba0bfa74894accce915b0a9e/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f6374786c656e732e737667" alt="license"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/ctxlens" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8dcadc655eac467f0071618d36d4cd56df27de7ae6db76522f905f000f1f318c/68747470733a2f2f696d672e736869656c64732e696f2f6e6f64652f762f6374786c656e732e737667" alt="node"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Token budget analyzer for AI context windows — like &lt;code&gt;du&lt;/code&gt; for tokens.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Every developer using AI coding tools hits the same wall: &lt;em&gt;"Does my codebase fit in context?"&lt;/em&gt; You paste files until the model complains, guess at what to include, and hope for the best. ctxlens gives you the answer in one command.&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npx ctxlens scan&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why ctxlens&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;You can't optimize what you don't measure.&lt;/strong&gt; AI models have hard context limits — 128k, 200k, 1M tokens — and your codebase is competing for space with prompts, conversation history, and tool output. ctxlens tells you exactly where your token budget goes.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Problems it solves&lt;/h3&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Will my project fit in context?"&lt;/strong&gt; — Instant answer across 23 models from 7 providers. Know you're safe on Claude, tight on GPT-4o, and blown past Grok — without switching tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Which files are eating my budget?"&lt;/strong&gt; — Ranked breakdown by file and directory, with bar…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kVadrum/ctxlens" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Onward and upward.  &lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
