Show HN: Codebase-md – Creates Claude.md, .cursorrules, AGENTS.md from any repo

github.com

1 points by anandsaurav668 a month ago

Hey HN, I built codebase-md because I was tired of manually writing and maintaining context files for every AI coding tool.

The problem: Claude Code wants CLAUDE.md, Cursor wants .cursorrules, Codex wants codex.md, Windsurf wants .windsurfrules — and each needs your project's architecture, conventions, dependencies, and structure. Writing these by hand is tedious, and they go stale fast.

codebase-md scans your project once and generates all of them from one source of truth:

    pip install codebase-md
    cd your-project/
    codebase scan .
    codebase generate .
What it detects: - Languages and frameworks (Python, JS/TS, Go, Rust — 50+ extensions) - Architecture pattern (monolith, monorepo, microservice, library, CLI) - Conventions (naming style, import patterns, design patterns) via tree-sitter AST - Dependencies with health scoring (queries PyPI/npm registries) - Git history, contributor analysis, file hotspots

It also has a smart context engine — you can query `codebase context "how does auth work"` and it returns the most relevant project context using TF-IDF scoring.

Built with Python 3.11+, Pydantic v2, tree-sitter, and Typer. 354 tests, MIT licensed.

First release (0.1.0) just went up on PyPI. Looking for feedback and contributions — especially around adding more language grammars (Go/Rust tree-sitter support) and new output formats. Issues tagged "good first issue" on the repo.

Happy to answer any questions!