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 loginUse 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 listOr get structured output for scripting:
merfolk diagrams list --json4. 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?
- Browse the full CLI reference for all flags and options.
- Read about comments and collaboration to review feedback on the diagram.
- Read the Agents guide to use Merfolk from coding agents.