The CLI is one way to work with the shared diagram workspace. Use it when diagram changes belong in a terminal workflow, a script, or a coding-agent task. Use the web app when people need to inspect the visual result, discuss it, or comment on the diagram itself.
Start here
- Install the CLI for terminal workflows.
- Follow the CLI quickstart to create, inspect, and update a diagram.
Command structure
All Merfolk commands follow the pattern:
merfolk <command> [subcommand] [arguments] [flags]Top-level commands:
| Command | Description |
|---|---|
login |
Authenticate with your Merfolk account |
logout |
Remove stored credentials |
diagrams |
Create and manage Mermaid diagrams |
skills |
Install agent skills |
The --json flag
Every command that produces output supports --json. When passed, the CLI prints structured JSON to stdout instead of human-readable text.
Use --json for scripting, piping into jq, or calling from coding agents.
merfolk diagrams list --jsonOutput is always a valid JSON object or array. Errors are printed to stderr as JSON with an error key.
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
General error (see stderr) |
2 |
Authentication required — run merfolk login |
3 |
Not found — the requested resource does not exist |