feat(cli): add --stdout flag to output export to stdout#142
Merged
agavra merged 1 commit intoagavra:mainfrom Jan 24, 2026
Merged
feat(cli): add --stdout flag to output export to stdout#142agavra merged 1 commit intoagavra:mainfrom
agavra merged 1 commit intoagavra:mainfrom
Conversation
When --stdout is passed, the export command (E key or :clip/:export) prints the review markdown to stdout and exits, instead of copying to the clipboard. Useful for piping to other tools or redirecting to a file. - Add CliArgs struct and parse_cli_args() for CLI argument handling - Add output_to_stdout and pending_stdout_output fields to App - Extract generate_export_content() from export_to_clipboard() - Print pending output after TUI cleanup when --stdout is used Co-Authored-By: Claude Opus 4.5 <[email protected]>
1d34249 to
8226ed6
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.
Summary
When
--stdoutis passed, the export command (Ekey or:clip/:export) prints the review markdown to stdout and exits, instead of copying to the clipboard. This is useful for piping to other tools or redirecting to a file.Motivation
This enables running
tuicrprogrammatically from AI coding assistants like Claude Code, leveraging tmux to open a split pane for the interactive review while capturing the exported comments via stdout. I'll be raising a follow-up PR with a complementary Claude Code skill that uses this feature.First of all, kudos on this tool - it's incredibly handy for reviewing AI-generated diffs in a structured way. The GitHub PR-style interface makes it easy to leave contextual comments, and the vim-like keybindings feel natural. This
--stdoutflag is a small addition that opens up powerful automation possibilities.Changes
CliArgsstruct andparse_cli_args()for CLI argument handlingoutput_to_stdoutandpending_stdout_outputfields toAppgenerate_export_content()fromexport_to_clipboard()/dev/ttywhen--stdoutis used (keeps stdout clean for capture)--stdoutis setUsage
Test plan
tuicr --helpshows the new--stdoutoption--stdout, adding comments, and pressingEoutputs markdown to stdout/dev/tty) while stdout captures only the export--stdout, behavior unchanged (copies to clipboard)🤖 Generated with Claude Code