gnodet opened a new pull request, #22227: URL: https://github.com/apache/camel/pull/22227
## Summary Add a lightweight `camel cmd route-diagram` command that renders Camel route diagrams directly in the terminal using JLine 4's graphics protocol support (Kitty/Sixel/iTerm2 inline images). This is a lighter-weight alternative to the Playwright/Hawtio approach in #21534. ### Features - **Terminal inline rendering** via JLine 4's `TerminalGraphicsManager` (auto-detects Kitty/iTerm2/Sixel) - **Hawtio-style layout**: branching EIPs (choice, multicast, doTry, loadBalance, recipientList) lay children horizontally; sequential nodes stack vertically - **Merge lines** showing branch convergence with a center dot - **Color-coded nodes** by type: from (green), to (blue), EIP (purple), choice (orange), default (gray) - **Customizable colors** via `--theme`/`--colors` option or `DIAGRAM_COLORS` env var, following JLine's `LS_COLORS`/`GREP_COLORS` convention - **Built-in presets**: `dark`, `light`, `transparent` - **PNG export** via `--output diagram.png` - **Text fallback** for terminals without graphics support ### Usage ```bash camel cmd route-diagram # inline terminal display camel cmd route-diagram --theme light # light theme camel cmd route-diagram --output diagram.png # save to PNG camel cmd route-diagram --colors "bg=:from=#ff5722" # custom colors ``` ### Depends on - #22221 (bug fix for JBang metadata generation) ## Preview _(see comment below for rendered diagram screenshots)_ ## Test plan - [x] Builds successfully - [x] Preview images rendered with complex routes (triple nested choice, split+choice, doTry/doCatch/doFinally, multicast inside choice) - [ ] Manual test with running Camel integration - [ ] CI passes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
