A web, desktop and MCP tool that draws and edits draw.io diagrams from natural-language chat with an AI model.
ahmedkhaleel2004/gitdiagram
Turns any GitHub repository into an interactive architecture diagram or a one-minute narrated explainer video, with an MCP server for AI agents.
- Stars
- 18,334
- Forks
- 1,516
- Open issues
- 52
- Last commit
- 11 hours ago
What is it?
GitDiagram generates an AI-written architecture diagram for a GitHub repository. You can open any repo by replacing 'hub' with 'diagram' in its URL, and the diagram links components to the files and directories they correspond to. Private repositories are supported with a GitHub token, and diagrams can be exported as PNG or copied as Mermaid source.
The project also produces narrated explainer videos of about a minute, which describe what a project is for and how its main parts fit together. Videos can be downloaded as MP4 in landscape or vertical format. Making new videos is in early access, while existing ones can be watched by anyone.
AI agents can connect to a remote MCP server at gitdiagram.com/mcp without a key, to read a public repository's architecture, components, connections and Mermaid source. The app is built with Next.js, React, TypeScript and Mermaid, and can be run locally with Bun.
Key features
- 01Generates interactive architecture diagrams for public and private GitHub repositories
- 02Links diagram components to their source files and directories
- 03Produces one-minute narrated explainer videos with captions
- 04Exports diagrams as PNG or copies Mermaid source
- 05Provides a remote MCP server for AI agents without authentication
Use cases
- Getting oriented quickly in an unfamiliar codebase
- Sharing a high-level overview of a project with teammates
- Letting an AI coding agent look up how a repository is structured
- Explaining a project's design in a short video
Quick start
- 1
Clone the repository
git clone https://github.com/ahmedkhaleel2004/gitdiagram.git - 2
Install dependencies with Bun
bun install - 3
Copy the example env file and fill in the required keys from the configuration guide
- 4
Start the dev server and open localhost:3000
bun run dev
Things to know
- Running it locally requires Cloudflare R2, Upstash Redis, and an OpenAI or OpenRouter API key.
- Making new explainer videos is in early access, and video features are off by default.
Topics
FAQ
- What is gitdiagram?
- Turns any GitHub repository into an interactive architecture diagram or a one-minute narrated explainer video, with an MCP server for AI agents. GitDiagram generates an AI-written architecture diagram for a GitHub repository. You can open any repo by replacing 'hub' with 'diagram' in its URL, and the diagram links components to the files and directories they correspond to. Private repositories are supported with a GitHub token, and diagrams can be exported as PNG or copied as Mermaid source.
- Is gitdiagram free to use? What license does it have?
- gitdiagram is open source under the MIT license. Check the license terms before using it in commercial products.
- Is gitdiagram still maintained?
- Actively maintained. The last commit to gitdiagram was on Oct 20, 2026.
- What can I use gitdiagram for?
- Getting oriented quickly in an unfamiliar codebase Sharing a high-level overview of a project with teammates Letting an AI coding agent look up how a repository is structured Explaining a project's design in a short video
- How do I install gitdiagram?
- Clone the repository: git clone https://github.com/ahmedkhaleel2004/gitdiagram.git Install dependencies with Bun: bun install Copy the example env file and fill in the required keys from the configuration guide Start the dev server and open localhost:3000: bun run dev
- Where can I get gitdiagram?
- The source code and installation instructions are on GitHub: https://github.com/ahmedkhaleel2004/gitdiagram
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A CLI and web tool that packs an entire code repository into one AI-friendly file for feeding to LLMs like Claude or ChatGPT.
A CLI that scans your codebase and generates compact AI context files (CLAUDE.md, .cursorrules, AGENTS.md) so coding assistants spend fewer tokens exploring the project.
An agent workspace for knowledge work and software development, offering a choice of models and open-source agent harnesses, runnable locally or hosted.
Agent-native memory infrastructure that turns LLM agent conversations and execution into persistent, structured memory for Python and TypeScript apps.
An agent framework that connects digital humans (2.5D, 3D, mobile, PC, web) and LLMs (OpenAI-compatible, DeepSeek) to business systems.