CAMEL-21975: Add route-diagram command to display Camel route diagrams in terminal#22227
Draft
gnodet wants to merge 2 commits intofix-jbang-metadata-mojofrom
Draft
CAMEL-21975: Add route-diagram command to display Camel route diagrams in terminal#22227gnodet wants to merge 2 commits intofix-jbang-metadata-mojofrom
gnodet wants to merge 2 commits intofix-jbang-metadata-mojofrom
Conversation
…s in terminal 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). Features: - Tree-based layout with horizontal branching for EIPs (choice, multicast, doTry, etc.) - Merge lines showing branch convergence - Color-coded nodes by type (from, to, EIP, choice, default) - Customizable color themes via --theme/--colors option or DIAGRAM_COLORS env var - Built-in presets: dark, light, transparent - PNG file export via --output option - Fallback to text-based diagram for terminals without graphics support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Preview images for the route-diagram command showing dark and light themes. These images should be removed before merging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
Preview — Dark ThemePreview — Light ThemeRoutes rendered (top to bottom):
Claude Code on behalf of Guillaume Nodet |
c599fd5 to
c0f74cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Warning
Draft / POC — not ready for review. This is an early proof-of-concept exploring terminal-native route diagram rendering. The layout algorithm, text fallback, and terminal graphics integration still need work.
Summary
Add a lightweight
camel cmd route-diagramcommand 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
TerminalGraphicsManager(auto-detects Kitty/iTerm2/Sixel)--theme/--colorsoption orDIAGRAM_COLORSenv var, following JLine'sLS_COLORS/GREP_COLORSconventiondark,light,transparent--output diagram.pngUsage
Depends on
Preview
(see comment below for rendered diagram screenshots)
Test plan