<?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: Saurav Anand</title>
    <description>The latest articles on DEV Community by Saurav Anand (@saurav_anand_75e32e8d0c76).</description>
    <link>https://dev.to/saurav_anand_75e32e8d0c76</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3809512%2F33539e4d-0442-40fa-9d5c-ed82196349e8.jpg</url>
      <title>DEV Community: Saurav Anand</title>
      <link>https://dev.to/saurav_anand_75e32e8d0c76</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saurav_anand_75e32e8d0c76"/>
    <language>en</language>
    <item>
      <title>I Built a Tool That Generates AI Coding Context for Every Tool — From One Scan</title>
      <dc:creator>Saurav Anand</dc:creator>
      <pubDate>Fri, 06 Mar 2026 09:19:45 +0000</pubDate>
      <link>https://dev.to/saurav_anand_75e32e8d0c76/i-built-a-tool-that-generates-ai-coding-context-for-every-tool-from-one-scan-ie0</link>
      <guid>https://dev.to/saurav_anand_75e32e8d0c76/i-built-a-tool-that-generates-ai-coding-context-for-every-tool-from-one-scan-ie0</guid>
      <description>&lt;p&gt;Every AI coding tool needs context about your project. But each wants it in a different format:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;CLAUDE.md&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cursor&lt;/td&gt;
&lt;td&gt;.cursorrules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex CLI&lt;/td&gt;
&lt;td&gt;codex.md&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windsurf&lt;/td&gt;
&lt;td&gt;.windsurfrules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-agent&lt;/td&gt;
&lt;td&gt;AGENTS.md&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I was maintaining 4 different context files across 3 projects. When I refactored a module,&lt;br&gt;
I had to update all of them. So I built &lt;strong&gt;codebase-md&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  One command, all formats
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;codebase-md
&lt;span class="nb"&gt;cd &lt;/span&gt;your-project/
codebase scan &lt;span class="nb"&gt;.&lt;/span&gt;
codebase generate &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That's it. You now have all 6 context files in your project root — auto-generated from a&lt;br&gt;
single scan of your codebase.&lt;/p&gt;
&lt;h2&gt;
  
  
  What does it actually detect?
&lt;/h2&gt;

&lt;p&gt;This isn't a template generator. It &lt;strong&gt;analyzes your code&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Language &amp;amp; Framework Detection&lt;/strong&gt;&lt;br&gt;
Recognizes 50+ file extensions. Detects frameworks like FastAPI, Django, Flask, React,&lt;br&gt;
Next.js, Express, Vue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture Pattern Recognition&lt;/strong&gt;&lt;br&gt;
Looks at your folder structure, entry points, and package layout to classify:&lt;br&gt;
monolith, monorepo, microservice, library, or CLI tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Convention Inference (via tree-sitter AST)&lt;/strong&gt;&lt;br&gt;
Parses your actual code to determine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Naming conventions (snake_case, camelCase, PascalCase)&lt;/li&gt;
&lt;li&gt;Import style (absolute vs relative)&lt;/li&gt;
&lt;li&gt;File organization (modular, layer-based, feature-based)&lt;/li&gt;
&lt;li&gt;Design patterns (MVC, service/repository, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Dependency Intelligence&lt;/strong&gt;&lt;br&gt;
Parses package.json, requirements.txt, pyproject.toml, go.mod, Cargo.toml, Gemfile.&lt;br&gt;
Then queries PyPI/npm registries for health scoring, version freshness, and breaking&lt;br&gt;
change detection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git Analysis&lt;/strong&gt;&lt;br&gt;
Contributor analysis, commit frequency, file change hotspots — all included in the&lt;br&gt;
generated context.&lt;/p&gt;
&lt;h2&gt;
  
  
  Smart Context Routing
&lt;/h2&gt;

&lt;p&gt;My favorite feature: query your project context like a search engine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codebase context &lt;span class="s2"&gt;"how does authentication work"&lt;/span&gt;
codebase context &lt;span class="s2"&gt;"database models"&lt;/span&gt; &lt;span class="nt"&gt;--max&lt;/span&gt; 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It chunks your project into 12 topic areas and uses TF-IDF with 6 scoring signals&lt;br&gt;
to return the most relevant context. Feed this directly to any LLM.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Architecture
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Scanner Engine
  → Language Detector (50+ extensions)
  → Structure Analyzer (architecture patterns)
  → Dependency Parser (6 package formats)
  → Convention Inferrer (tree-sitter AST)
  → Git Analyzer (history, contributors)
       ↓
  ProjectModel (Pydantic v2, frozen, validated)
       ↓
  Generators (plugin-style, one per format)
       ↓
  CLAUDE.md, .cursorrules, AGENTS.md, codex.md, .windsurfrules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Each generator transforms the same &lt;code&gt;ProjectModel&lt;/code&gt; into its output format.&lt;br&gt;
Adding a new format means writing one class — the architecture is designed for extensibility.&lt;/p&gt;
&lt;h2&gt;
  
  
  What's tested
&lt;/h2&gt;

&lt;p&gt;354 tests covering 8 project archetypes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python CLI, FastAPI app, Next.js app, Go CLI, Rust CLI&lt;/li&gt;
&lt;li&gt;Mixed-language, monorepo, empty repo edge case&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plus integration tests against real-world repositories.&lt;/p&gt;
&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;codebase-md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or with tree-sitter AST support (recommended):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"codebase-md[ast]"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Contribute
&lt;/h2&gt;

&lt;p&gt;This is v0.1.0 — the first public release. I'd love contributions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Good first issues&lt;/strong&gt;: Go/Rust tree-sitter support, PHP dependency parser, README demo GIF&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bigger features&lt;/strong&gt;: Watch mode, Java/Kotlin support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/sauravanand542/codebase-md" rel="noopener noreferrer"&gt;sauravanand542/codebase-md&lt;/a&gt;&lt;br&gt;
PyPI: &lt;a href="https://pypi.org/project/codebase-md/" rel="noopener noreferrer"&gt;codebase-md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Star ⭐ if this is useful to you — it helps others find it!&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
