Generate Mermaid diagrams from your codebase. Use when you need architecture visualizations.
Architecture diagrams are always out of date because nobody maintains them. This tool reads your code and generates accurate Mermaid diagrams automatically.
One command. Zero config. Just works.
npx ai-diagram ./src/
# Generate flowchart
npx ai-diagram ./src/
# Class diagram
npx ai-diagram ./src/ --type class -o architecture.mmd
# Sequence diagram of function calls
npx ai-diagram ./src/ --type sequence
# Entity relationship diagram
npx ai-diagram ./src/ --type er
This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.
Find more:
No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable.
npx ai-diagram --help
Reads your source files to understand the structure, relationships, and data flow. Then generates Mermaid syntax that renders as diagrams in markdown editors, GitHub, and documentation tools.
MIT. Free forever. Use it however you want.