1 comments

  • Jonverrier 7 hours ago

    A few months ago I shared C4-Agent, an MCP server that generates C4-style docs and Mermaid diagrams from your codebase while you work in the IDE. It’s flexible and interactive, but depends on MCP, and the Agents, even now, seem to drift off on large code bases.

    C4-Auto is the other half: a CLI-only tool that does the same kind of thing in a more boring, repeatable way. No MCP, no Agent integration-just a command you run (locally or in CI) that:

    - Walks your TypeScript/TSX tree (skips node_modules, dist, .git) - Uses an LLM to add or refresh a short module-level header comment in each file (with a date so you only regenerate when stale) - Builds C4 Component and Context diagrams in Mermaid from those headers and a Component and a Context diagram per directory

    You pick a time window (--one-week, --two-weeks, --one-month) so you’re not re-running the LLM on everything every time. Same “just enough” C4 idea: docs generated from the code so they don’t rot.

    Repo and more detail: https://github.com/jonverrier/C4-Auto MIT License

    So: C4-Agent = MCP, interactive, “fun”. C4-Auto = CLI, scriptable, more reliable. Happy to answer questions or take feedback.