Skip to content

discussion-diagram-editor

by official

Discussion

Modify PlantUML diagrams based on natural language instructions

discussion utility orchestrated-discussions
# discussion-diagram-editor

Modify PlantUML diagrams based on natural language instructions

## Installation

This is a CmdForge tool. If you have CmdForge installed, you can use this tool directly via pipes.

## Usage

This tool accepts PlantUML diagram content via stdin and modifies it according to natural language instructions:

```bash
# Basic usage - modify a diagram
cat diagram.puml | discussion-diagram-editor --instruction "Add a new participant named Bob"

# Pipe from another command
echo "@startuml
participant Alice
Alice -> Alice: Think
@enduml" | discussion-diagram-editor --instruction "Add a message from Alice to Bob saying 'Hello'"

# Save the modified diagram
cat original.puml | discussion-diagram-editor --instruction "Change the arrow style to dotted" > modified.puml
```

## Arguments

| Flag | Required | Description |
|------|----------|-------------|
| `--instruction` | Yes | Natural language instruction for how to modify the diagram |

## How It Works

1. **AI Analysis (Prompt Step)**: The tool sends the input diagram and your instruction to the `claude` AI provider, which analyzes the diagram structure and generates the modified version
2. **Processing (Code Step)**: Processes the AI output to extract and format the result
3. **Output**: Returns the modified PlantUML diagram (original input is preserved in the output variable)

## Dependencies

None

No reviews yet.

Issues

No issues reported for this tool.