Use Glypho with AI tools

Copy the prompt below into any LLM to teach it Glypho. Then ask for diagrams and paste the output into the editor.

Core prompt

When I ask for a diagram, respond using Glypho (.g) notation.
Always reply with only a fenced ```glypho code block.
Do not include prose before or after the code block unless I explicitly ask for it.

Here's the syntax:

Nodes: id[:shape] [label] [#color]
  Shapes: r rect, d diamond, c circle, o oval, p pill, h hexagon
  Multi-word labels need quotes: auth:r "User Login"

Edges: id>id [label]
  > solid arrow, ~ dashed, = thick, -- undirected, <> bidirectional
  Chains: a>b>c>d (no labels on chains)

Direction: >LR (or >TB, >RL, >BT). Default is TB.

Groups: @name "Label" {member1 member2}

One statement per line. No commas, no semicolons. Comments: // (own line or end-of-line).

Styles (optional): $:shape{fill:#fff}, $.class{fill:#ff0}, $#id{stroke:#00f}
Class assignment: .classname{node1 node2}
Multiline labels: """Line 1\nLine 2""" or "Line 1\nLine 2"

Example:
>LR
login:r Login
mfa:d MFA?
dash:r Dashboard
err:r Error

login>mfa
mfa>dash yes
mfa>err no

@auth{login mfa}

This prompt teaches the core syntax and forces code-block output, which avoids Markdown rendering issues with lines like >TB. Paste it as a system message or at the start of a conversation.

ChatGPT

  1. 1. Paste the core prompt above as your first message, or add it to a custom GPT's instructions.
  2. 2. Ask for a diagram. Be specific about what you want. The response should come back as a fenced glypho block:
You

Draw a CI/CD pipeline: push to GitHub, run tests, build Docker image, deploy to staging, then production. Use left-to-right layout.

ChatGPT
>LR

push:p "Git Push"
test:r "Run Tests"
build:r "Build Image"
staging:r "Deploy Staging"
prod:r "Deploy Prod"
check:d "Tests Pass?"

push>test
test>check
check>build yes
check>push no
build>staging
staging>prod

@ci "CI" {test check build}
@cd "CD" {staging prod}
  1. 3. Copy the output and paste it into the Glypho editor to see the rendered diagram.

Claude

  1. 1. Paste the core prompt as a first message, or add it to a Project's custom instructions so it applies to every conversation in that project.
  2. 2. Ask for a diagram. The response should come back as a fenced glypho block:
You

Draw an auth flow: user submits credentials, server validates, if valid issue JWT and redirect to dashboard, if invalid show error with retry.

Claude
>TB

submit:p "Submit Credentials"
validate:r "Validate"
check:d Valid?
jwt:r "Issue JWT"
dash:p Dashboard
err:r "Show Error"

submit>validate
validate>check
check>jwt yes
check>err no
jwt>dash
err>submit retry

@server "Server" {validate check jwt}
  1. 3. Copy the output and paste it into the Glypho editor to render it.

Tip: Claude Code users can add the core prompt to their project's CLAUDE.md so diagram generation works across all conversations.

Tips for better results

  • - Be specific about structure. "Three stages with a decision point" works better than "draw a flowchart."
  • - Specify direction. Most pipelines read better as >LR. Hierarchies work better as >TB.
  • - Ask for groups if you want related nodes visually clustered.
  • - Iterate. "Add an error handling path" or "change the login node to a diamond" — LLMs handle incremental edits well.