Line9 for coding agents (CLI)
What it does
The Line9 CLI, line9, is a command-line tool for macOS, Linux and Windows. With it:
- Coding agents such as Claude Code and Codex draw diagrams with Line9. Each diagram opens in a browser tab, and the tab updates when the agent changes the diagram.
- You can open your own Mermaid files in Line9, or save them as SVG.
- With Line9 Pro, you can publish flowcharts from the terminal.
Install the CLI
On macOS or Linux:
curl -fsSL https://line9.ai/install.sh | sh With Homebrew:
brew install line9-ai/line9/line9 On Windows, in PowerShell:
irm https://line9.ai/install.ps1 | iex With Node.js, run it without installing:
npx line9@latest Put npx line9@latest in place of line9 to run any command this way.
To download it yourself, see the CLI page.
To check it’s installed, run line9 doctor.
Set up your coding agent
Run this once:
line9 bootstrap It tells Claude Code and Codex that Line9 is installed, and adds the Line9 flowchart skill, which shows them how to write diagrams that Line9 lays out well. It sets up whichever of the two you have. For another agent, ask it to run line9 robot.
To set up only the folder your terminal is in, run line9 bootstrap --project.
Ask your agent for a diagram
Ask in your own words:
- Draw a flowchart of how a support ticket is escalated.
- Draw a diagram of how the services in this repository call each other.
The agent writes the diagram as a Mermaid file and runs line9 render to open it in your browser. Ask for changes, and the same tab shows each new version.
Render your own Mermaid files
To open a Mermaid file in a browser tab:
line9 render diagrams/expense-approval.mmd Run it again after you change the file, and the tab updates.
To save a flowchart as an SVG file instead:
line9 render diagrams/expense-approval.mmd --out expense-approval.svg To choose the theme, add --theme linen or --theme blueprint.
Publish from the terminal
With Line9 Pro, sign in once, then publish a flowchart:
line9 login
line9 publish diagrams/expense-approval.mmd line9 publish prints the diagram’s address. Run it again on the same file to publish a new version at the same address. See Publish a diagram for who can see it.
Next
- CLI commands: every command, and what it does.
- Line9 in chat apps (MCP): use Line9 in ChatGPT and Claude.