A simple Streamlit app that turns text prompts into Mermaid.js diagrams using OpenAI, Anthropic, or Gemini.
git clone https://github.com/jgordley/MermaidGPT
cd MermaidGPT
pip install -r requirements.txtstreamlit run main.py- Enter your OpenAI API key in the sidebar
- Select a chart type and orientation
- Describe what you want to diagram
- Click Generate
- Your prompt is sent to OpenAI (gpt-4o) with instructions to return Mermaid.js markdown
- The markdown is encoded and sent to mermaid.ink to render an image
- The image is displayed in the app alongside the raw markdown
main.py # Streamlit app entry point
prompt.py # OpenAI API call
mermaid.py # Diagram rendering via mermaid.ink
components/
sidebar.py # API key input and app info
