mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[GH-ISSUE #328] Feature Request: add support for highlighting ANSI text as colored text #853
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#853
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @remorses on GitHub (Nov 19, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/328
Currently opencode has no way to show colors for commands outputs because we do not have ANSI highlighting support
My idea for implementing this would be to
TextChunklike we do now for tree sitter highlightingI guess ANSI parsing would need to be fast so implemented in the Zig side
What do you think @kommander?
@kommander commented on GitHub (Nov 19, 2025):
I think opencode would solve that with something like #166, but probably using libghostty-vt.
@remorses commented on GitHub (Nov 19, 2025):
I also found this project which would be a good start: https://github.com/coder/ghostty-web
It uses libghostty to render a terminal in the browser
@kommander commented on GitHub (Nov 20, 2025):
Yeah that's basically what #166 does for opentui, but also providing it as a TerminalRenderable. So that but libghostty would be the way to go imo.
@remorses commented on GitHub (Nov 25, 2025):
I found another example https://github.com/kcosr/pty-to-html/blob/main/src/main.zig
I can open a PR to add support for this, but without any stdin handling, just rendering the ansi into styled text without keeping any state
It would depend on some ghostty code. what do you think?
@remorses commented on GitHub (Nov 27, 2025):
I created a package to use ghostty-vt to turn ANSI into opentui renderables here
https://github.com/remorses/opentui-ansi-vt.git