JSON output
Pass --json to any command to get structured output. JSON output is always valid and printed to stdout. Errors go to stderr.
Diagram object
{
"id": "string",
"title": "string",
"content": "string",
"createdAt": "ISO 8601 string",
"updatedAt": "ISO 8601 string",
"url": "https://app.merfolk.io/d/<id>"
}Comment object
{
"id": "string",
"body": "string",
"author": "string",
"positionX": 0.0,
"positionY": 0.0,
"createdAt": "ISO 8601 string"
}positionX and positionY are float percentages (0–100) of the diagram container’s dimensions.
Error object
{
"error": "human-readable message",
"code": "ERROR_CODE"
}Table format
Without --json, commands print a human-readable table. Column widths adapt to terminal width. This format is not stable — do not parse it programmatically.
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
General error — details on stderr |
2 |
Authentication required — run merfolk login |
3 |
Not found — the requested resource does not exist |