Skip to content

CLI Quickstart

Create, inspect, and update a diagram from the command line.

This guide covers the CLI workflow. If you are new to Merfolk, start with the product quickstart to understand how the web app, CLI, and coding agents work together.

1. Connect your account

Run:

merfolk login

Use your account to authenticate the CLI before running commands that access private diagrams or team resources.

2. Create a diagram

merfolk diagrams create --title "My first diagram"

The CLI returns the new diagram’s ID and a link to view it at app.merfolk.io.

You can also provide Mermaid source when you create the diagram:

merfolk diagrams create \
  --title "My first diagram" \
  --content "graph TD\n  Browser --> API\n  API --> Database"

3. List your diagrams

merfolk diagrams list

Or get structured output for scripting:

merfolk diagrams list --json

4. Get a diagram

merfolk diagrams get <id>

This prints the diagram’s Mermaid source to stdout.

5. Edit a diagram

merfolk diagrams edit <id> --content "graph TD\n  Browser --> API\n  API --> Queue"

Or pipe content from a file:

cat diagram.mmd | merfolk diagrams edit <id>

Open the diagram in the web app to review the rendered result, share it, or collect comments from collaborators.

What’s next?

Navigation

Type to search…

↑↓ navigate↵ selectEsc close