Update the content or title of an existing Mermaid diagram.
Usage
merfolk diagrams edit <id> [flags]
Arguments
Flags
Examples
# Update content
merfolk diagrams edit abc123 --content "graph TD\n A --> B --> C"
# Update title only
merfolk diagrams edit abc123 --title "Updated architecture"
# Pipe content from a file
cat updated.mmd | merfolk diagrams edit abc123
# Update and confirm with JSON output
merfolk diagrams edit abc123 --content "graph TD\n A --> B" --json
Output
Default output confirms the update:
Updated diagram abc123
View at: https://app.merfolk.io/d/abc123
With --json:
{
"id": "abc123",
"title": "My architecture",
"updatedAt": "2024-01-15T11:00:00Z",
"url": "https://app.merfolk.io/d/abc123"
}
Exit codes