### Install and run the checked-in example theme Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md Copies the example theme and its syntax theme into the local themes directory, then launches tuicr with `--theme tuicr-teal`. ```sh mkdir -p ~/.config/tuicr/themes cp examples/tuicr-teal.toml examples/tuicr-teal-syntax.tmTheme ~/.config/tuicr/themes/ tuicr --theme tuicr-teal ``` -------------------------------- ### Install and authenticate bkt CLI Source: https://github.com/agavra/tuicr/blob/main/docs/BITBUCKET.md Installs the bkt CLI via Homebrew and authenticates against Bitbucket Cloud. The --web-token flag opens Atlassian's token page and prompts for the token locally; create an API token with scopes, not a general API token. ```bash brew install avivsinai/tap/bitbucket-cli bkt auth login https://bitbucket.org --kind cloud --web-token ``` -------------------------------- ### Install prerequisites on macOS Source: https://github.com/agavra/tuicr/blob/main/docs/DEMO.md Install asciinema, agg, and pexpect on macOS. Requires cargo, git, pbcopy, and pbpaste. ```bash brew install asciinema agg python3 -m pip install pexpect ``` -------------------------------- ### Error Handling Actions Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Actions for various error situations: ask which session slug to use when multiple plausible active sessions exist; start a new tuicr pane with the matching wrapper when no active session but a multiplexer is available; tell the user you are waiting when no active session and no multiplexer; run `cmux list-panes` or ask the user to start tuicr when cmux wrapper printed no surface ref; tell the user to install tuicr when not installed; ask for the correct repo directory when not a repository; treat as completed review when comments are empty but `reviewed_count` == `file_count`; confirm the selected session or ask the user to save/add comments when comments are empty and `reviewed_count` < `file_count`. ```text cmux list-panes ``` -------------------------------- ### .tuicrignore example Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md Example of a .tuicrignore file using gitignore-style patterns, including negation with '!'. This file is read from the repository root and excludes matching files from review diffs. ```gitignore target/ dist/ *.lock !Cargo.lock ``` -------------------------------- ### Install tuicr via curl, Homebrew, or pacman Source: https://github.com/agavra/tuicr/blob/main/README.md Install tuicr using the install script, Homebrew, or pacman. The install script is fetched from tuicr.dev. ```bash curl -fsSL tuicr.dev/install.sh | sh # or brew install tuicr # or sudo pacman -S tuicr ``` -------------------------------- ### tuicr config.toml example Source: https://github.com/agavra/tuicr/blob/main/README.md Example configuration file for tuicr. Path: ~/.config/tuicr/config.toml on Linux/macOS, %APPDATA%\tuicr\config.toml on Windows. Includes theme, diff view, ignore whitespace, appearance, mouse, leader, editor, comment_vim, relative_line_numbers, and a comment_types definition. ```toml theme = "catppuccin-mocha" diff_view = "side-by-side" # or "unified" ignore_whitespace = false # ignore all whitespace in local VCS diffs appearance = "system" # or "dark" / "light" mouse = true leader = ";" # configurable prefix for leader shortcuts editor = "nvim" # editor for `e` / `:edit`; overrides $EDITOR comment_vim = false # vim modal editing in the review comment box relative_line_numbers = false # show rendered-row distances in the diff gutter [[comment_types]] id = "issue" color = "red" definition = "must fix before merge" ``` -------------------------------- ### Run live Bitbucket read-path test Source: https://github.com/agavra/tuicr/blob/main/docs/BITBUCKET.md Verifies the read path end to end against one of your own pull requests. The test is read-only and never posts a comment or approves anything. ```bash TUICR_BB_WORKSPACE=myteam TUICR_BB_REPO=my-service TUICR_BB_PR=830 \ cargo test bitbucket_live -- --ignored --nocapture ``` -------------------------------- ### Starting at a line with --file and --line Source: https://github.com/agavra/tuicr/blob/main/docs/CLI.md Use `--line N` to place the cursor on line N of the first file, on the new side, and center it. Requires `--file` or `--path`; cannot be combined with `tuicr pr`. ```bash tuicr --file README.md --line 42 # annotate a file, starting at line 42 ``` ```bash tuicr -p src/cli.rs --line 120 # uncommitted changes, starting at line 120 ``` -------------------------------- ### Install tuicr via Cargo, Mise, or Nix Source: https://github.com/agavra/tuicr/blob/main/README.md Alternative installation methods using Cargo, Mise, or Nix. These are shown in a collapsible section. ```bash # Cargo cargo install tuicr # Mise mise use github:agavra/tuicr # Nix nix run github:agavra/tuicr ``` -------------------------------- ### Tune demo size Source: https://github.com/agavra/tuicr/blob/main/docs/DEMO.md Set wrapper defaults for README-friendly size. DEMO_SPEED is forwarded to agg. Set DEMO_PYTHON when pexpect is installed for a non-default Python. ```bash DEMO_COLS=144 DEMO_ROWS=38 DEMO_FONT_SIZE=12 DEMO_LINE_HEIGHT=1.35 scripts/demo/record-demo.sh ``` ```bash DEMO_PYTHON=python3.11 scripts/demo/record-demo.sh ``` -------------------------------- ### Create bkt context for Bitbucket Source: https://github.com/agavra/tuicr/blob/main/docs/BITBUCKET.md Creates a bkt context for Bitbucket Cloud and sets it active. This is optional for tuicr, which always passes workspace and repository explicitly, but convenient for using bkt directly. ```bash bkt context create work --host bitbucket.org --workspace myteam --set-active ``` -------------------------------- ### Build tuicr from source Source: https://github.com/agavra/tuicr/blob/main/README.md Clone the repository and install tuicr from source using Cargo. ```bash git clone https://github.com/agavra/tuicr.git cd tuicr cargo install --path . ``` -------------------------------- ### Full TOML configuration example Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md Complete tuicr configuration file with all available options. Read from $XDG_CONFIG_HOME/tuicr/config.toml (Linux/macOS) or %APPDATA%\tuicr\config.toml (Windows). Unknown keys are ignored with a startup warning. The ignore_whitespace_overrides table is only used when ignore_whitespace = "auto". ```toml theme = "catppuccin-mocha" appearance = "system" theme_dark = "gruvbox-dark" theme_light = "gruvbox-light" diff_view = "side-by-side" ignore_whitespace = "auto" # or true / false; omitted defaults to false commit_order = "descending" initial_commit_selection = "all" show_file_list = true compact_folders = false show_pr_checks = false show_pr_comments = true pr_comments_visibility = "unresolved" show_commits = true show_reviewed = true mouse = true mouse_scroll_lines = 3 leader = "," editor = "nvim" comment_vim = false q_quits = false comment_tab_width = 4 wrap = false wrap_style = "flow" relative_line_numbers = false cursor_line = true search_highlight = true transparent_background = true scroll_offset = 5 no_update_check = false review_watch_interval_ms = 1000 single_file_view = false username = "user" diff_watch_interval_ms = 0 backend = "libgit2" comment_types = [ { id = "note", label = "question", definition = "ask for clarification", color = "yellow" }, { id = "suggestion", definition = "possible improvements" }, { id = "issue", definition = "problems to fix" }, { id = "praise", definition = "positive feedback" }, { id = "nit", label = "nitpick", definition = "small optional tweaks", color = "#d19a66" }, ] [ignore_whitespace_overrides] # only used with ignore_whitespace = "auto" rs = false # keep Rust whitespace changes custom = true # ignore whitespace in *.custom files [forge] comment_type_prefix = true [export] intro = "I reviewed your code and have the following comments. Please address them." scope_line = true pr_metadata = true comments_header = "## Local tuicr Comments" remote_comments_header = "## Existing GitHub Comments" legend = true session_header = true ``` -------------------------------- ### Rust Line Comment Example Source: https://github.com/agavra/tuicr/blob/main/PLAN.md Example of a line comment in the markdown output, showing the line number and code snippet. ```rust // Line 42 let expiry = now + 3600; ``` -------------------------------- ### Check bkt authentication status Source: https://github.com/agavra/tuicr/blob/main/docs/BITBUCKET.md Verifies that bkt is authenticated against Bitbucket Cloud. tuicr shells out to bkt for every Bitbucket operation and stores no tokens of its own. ```bash bkt auth status ``` -------------------------------- ### Open a Gerrit change by number, URL, or legacy URL Source: https://github.com/agavra/tuicr/blob/main/docs/GERRIT.md Run from inside a local clone of the project. Accepts a change number, a full Gerrit change URL, or the legacy URL form. ```bash tuicr pr 3965 # by change number ``` ```bash tuicr pr https://gerrit.example.com/c/platform/base/+/3965 # by URL ``` ```bash tuicr pr https://gerrit.example.com/#/c/3965/ # legacy URL form ``` -------------------------------- ### Example export output with custom [export] settings Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md This Markdown shows the resulting export when the [export] configuration above is applied. It opens directly on the comment list, omitting the intro and scope line, and uses the custom comments header. ```markdown ## Comments 1. **[ISSUE]** `src/auth.rs:42` - Magic number should be a named constant ``` -------------------------------- ### tuicr command examples Source: https://github.com/agavra/tuicr/blob/main/README.md Shows common tuicr invocations: commit selector, TUI subcommand, uncommitted changes, commit range, file annotation, PR/MR review, stdout piping, session listing, and update commands. ```bash tuicr # Pick from a commit selector tuicr tui # Same TUI, explicit subcommand tuicr -w # Uncommitted changes (skip selector) tuicr -r main..HEAD # Commit range tuicr --file f.md --line 42 # Annotate a file, starting at line 42 tuicr pr 125 # GitHub, Gitea, Bitbucket, or Azure DevOps PR, or Gerrit change tuicr pr 125 --remote up # Use a named Git remote's fetch URL tuicr mr 125 # GitLab MR tuicr tui pr 125 # GitHub PR via explicit TUI subcommand tuicr tui mr 125 # GitLab MR via explicit TUI subcommand tuicr --stdout # Pipe the review to stdout tuicr review list # List saved local review sessions tuicr update # Update the active installation tuicr update 0.18.0 # Install a known-good version ``` -------------------------------- ### Update tuicr Source: https://github.com/agavra/tuicr/blob/main/README.md Update the active installation with one command. Optionally specify a known-good version. ```bash tuicr update tuicr update 0.18.0 # Install a known-good version ``` -------------------------------- ### Open a Bitbucket pull request with tuicr Source: https://github.com/agavra/tuicr/blob/main/docs/BITBUCKET.md Opens a Bitbucket pull request by its ID. The target accepts a PR id, PR URL, or host/workspace/repo#id form; a bare workspace/repo#830 is not treated as Bitbucket and resolves to GitHub. ```bash tuicr pr 830 ``` -------------------------------- ### Output of `tuicr review list` Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Example JSON array returned by the `list` command. Shows a local session with `kind` `local`, a file path, timestamps, counts, and an anchor. ```json [ { "slug": "agavra/tuicr@main/worktree", "kind": "local", "path": "/Users/alice/Library/Application Support/tuicr/reviews/sessions/9f6c1b3e09a54e2a.json", "updated_at": "2026-05-22T17:20:00Z", "comment_count": 1, "reviewed_count": 0, "file_count": 3, "anchor": "main", "active": true } ] ``` -------------------------------- ### Add tea login for Gitea instance Source: https://github.com/agavra/tuicr/blob/main/docs/GITEA.md Install and configure the `tea` CLI with a login for your Gitea instance. The token requires `repository` and `issue` scopes to read pull requests and write access to submit reviews. ```bash tea logins add --name work --url https://gitea.example.com --token ``` -------------------------------- ### Authenticate with GitLab CLI Source: https://github.com/agavra/tuicr/blob/main/docs/GITLAB.md Install the GitLab CLI and authenticate to use tuicr with GitLab merge requests. tuicr shells out to glab for every GitLab operation and stores no tokens of its own. ```bash glab auth login ``` -------------------------------- ### Submitted comments with prefix disabled Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md Example output when `comment_type_prefix` is set to `false`. The same comments are submitted without the `[TYPE] ` prefix. ```text Consider adding unit tests Magic number should be a named constant This module could use a doc comment ``` -------------------------------- ### Minimal comment_types TOML example Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md Defines two comment types with optional definitions and a color. When comment_types is configured, the first type becomes the default and None is appended to the Tab cycle. Invalid entries are ignored with startup warnings. ```toml comment_types = [ { id = "question", definition = "ask for clarification" }, { id = "blocker", color = "red", definition = "must be fixed before merge" }, ] ``` -------------------------------- ### Fetch patch-set ref manually Source: https://github.com/agavra/tuicr/blob/main/docs/GERRIT.md Run this command when the patch-set fetch fails with "Could not find .. in the local checkout." The ref is named in the error message; running it by hand usually surfaces the real credential or network problem. ```bash git fetch origin refs/changes/… ``` -------------------------------- ### Submitted comments with prefix enabled (default) Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md Example output when `comment_type_prefix` is enabled (the default). Each comment body is prefixed with the uppercased type label, e.g., `[SUGGESTION]`, `[ISSUE]`, `[NOTE]`. ```text [SUGGESTION] Consider adding unit tests [ISSUE] Magic number should be a named constant [NOTE] File-level: This module could use a doc comment ``` -------------------------------- ### TUI flags cannot be mixed with review Source: https://github.com/agavra/tuicr/blob/main/docs/CLI.md TUI flags like `--stdout` cannot be used with `review` or `update` commands. This example shows the error message that results from mixing them. ```bash tuicr --stdout review list ``` ```bash # error: TUI options cannot be used with `tuicr review`; run `tuicr review --help` for command options ``` -------------------------------- ### Output of `tuicr review list --all` with PR session Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Example JSON array when `--all` is used, showing a PR session with `kind` `pr` and a PR slug. The `active` field is `false`. ```json [ { "slug": "gh:slatedb/slatedb/pr/1745", "kind": "pr", "path": "/Users/alice/Library/Application Support/tuicr/reviews/sessions/172e168db0d525e5.json", "updated_at": "2026-05-22T17:20:00Z", "comment_count": 0, "reviewed_count": 0, "file_count": 12, "anchor": "pr/1745", "active": false } ] ``` -------------------------------- ### Output of `tuicr review comments` Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Example JSON array returned by the `comments` command. Shows a comment with `id`, `location`, `path`, line numbers, `side`, `comment_type`, `author`, `lifecycle_state`, and `created_at`. ```json [ { "id": "79c9b3e1-0a7a-4efe-9d43-f7085d7c1a82", "location": "src/main.rs:42", "path": "src/main.rs", "start_line": 42, "end_line": 42, "side": "new", "comment_type": "issue", "author": "alice", "lifecycle_state": "local_draft", "created_at": "2026-05-22T17:20:00Z", "content": "Handle the empty case here." } ] ``` -------------------------------- ### Set Gerrit HTTP credentials (bash/zsh) Source: https://github.com/agavra/tuicr/blob/main/docs/GERRIT.md Export GERRIT_USERNAME and GERRIT_PASSWORD for the current shell session. Required for authenticated REST API calls; without them tuicr reads public changes anonymously but :submit fails. ```bash # bash/zsh export GERRIT_USERNAME=jdoe export GERRIT_PASSWORD=xxxxxxxx... ``` -------------------------------- ### Set Gerrit HTTP credentials (PowerShell) Source: https://github.com/agavra/tuicr/blob/main/docs/GERRIT.md Persist GERRIT_USERNAME and GERRIT_PASSWORD for the user via setx. Required for authenticated REST API calls; without them tuicr reads public changes anonymously but :submit fails. ```powershell # PowerShell (persist for your user) setx GERRIT_USERNAME "jdoe" setx GERRIT_PASSWORD "xxxxxxxx..." ``` -------------------------------- ### Set GERRIT_URL for neutral hostname Source: https://github.com/agavra/tuicr/blob/main/docs/GERRIT.md Point tuicr at the Gerrit server root when the hostname is neutral and you clone over HTTPS. Needed for remote recognition when the SSH port 29418 and 'gerrit' hostname heuristics don't apply. ```bash export GERRIT_URL=https://review.internal ``` -------------------------------- ### Run driver after building tuicr Source: https://github.com/agavra/tuicr/blob/main/docs/DEMO.md Build the tuicr binary and run the driver with the fixture. The main recording path is macOS-oriented because the final proof step reads from the real clipboard with pbpaste. ```bash cargo build --bin tuicr python3 scripts/demo/drive_demo.py --tuicr target/debug/tuicr --fixture "$fixture" ``` -------------------------------- ### Inspect fixture without recording Source: https://github.com/agavra/tuicr/blob/main/docs/DEMO.md Set up the fixture and inspect it with git log and cargo test. ```bash fixture="$(scripts/demo/setup-fixture.sh)" cd "$fixture" git log --oneline cargo test ``` -------------------------------- ### Re-record the demo Source: https://github.com/agavra/tuicr/blob/main/docs/DEMO.md Run the recording script from the repository root. Overwrites public/tuicr-demo.cast and public/tuicr-demo.gif. Builds target/debug/tuicr, generates a fresh temporary Rust fixture, records with --theme tokyo-night-storm, and renders with agg. Clears NO_COLOR for the child recording. ```bash scripts/demo/record-demo.sh ``` -------------------------------- ### List persisted sessions with tuicr review list Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Lists persisted sessions for a checkout path, a forge repo, or all repos. Use --repo with a checkout path to also surface PR sessions for that checkout's origin repo, or with a forge coordinate like owner/repo to match local and PR sessions. Use --all when the repo is unknown. An empty result with exit 0 may also mean the path is not a repo root, so pass the root or use --all before concluding nothing is open. ```bash tuicr review list --repo /path/to/repo # checkout + its repo's PR sessions ``` ```bash tuicr review list --repo owner/repo # all sessions for a forge repo ``` ```bash tuicr review list --all # every session across all repos ``` -------------------------------- ### Launch tuicr wrappers for different multiplexers Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Run the appropriate wrapper script based on the active multiplexer environment. The wrapper paths are relative to the skill directory. Always pass a scope explicitly after `--`, such as `-w` for working-tree changes or `-r ` for a commit range. The Herdr wrapper requires `jq`. ```bash /tuicr-wrapper-cmux.sh /path/to/repo -- -w ``` ```bash /tuicr-wrapper.sh /path/to/repo -- -w ``` ```bash /tuicr-wrapper-zellij.sh /path/to/repo -- -w ``` ```bash /tuicr-wrapper-herdr.sh /path/to/repo -- -w ``` -------------------------------- ### zellij Multiplexer Commands Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Switch panes with `Alt` + arrow keys. Close tuicr with `q`. Resize panes with `Ctrl-n`, then arrow keys. Toggle fullscreen with `Alt-f`. Cycle stacked panes with `Alt` + `[` / `]`. ```text Alt ``` ```text Ctrl-n ``` ```text Alt-f ``` ```text Alt ``` -------------------------------- ### Build, test, and format with Cargo Source: https://github.com/agavra/tuicr/blob/main/CONTRIBUTING.md Run these commands in order to build the project, run tests, and format the code. Use `cargo run` to review the diff with tuicr itself. ```bash cargo build cargo test cargo fmt ``` -------------------------------- ### cmux Multiplexer Commands Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Switch panes by clicking or using `cmux focus-pane --pane `. Close tuicr with `q` or force with `cmux close-surface --surface `. List panes with `cmux list-panes` and read a pane without focusing using `cmux read-screen --surface `. ```text cmux focus-pane --pane ``` ```text cmux close-surface --surface ``` ```text cmux list-panes ``` ```text cmux read-screen --surface ``` -------------------------------- ### List and comment on PR sessions with --repo selector Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Use --repo with a forge coordinate (owner/repo) to discover PR sessions from anywhere. The list command emits a slug for each session; pass a PR slug to --session to read or annotate it without needing --repo. ```bash tuicr review list --repo slatedb/slatedb # -> [ ..., { "slug": "gh:slatedb/slatedb/pr/1745", "kind": "pr", ... } ] tuicr review comments --session gh:slatedb/slatedb/pr/1745 ``` -------------------------------- ### tmux Multiplexer Commands Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Switch panes with `Ctrl-b` then arrow keys. Close tuicr with `q`. Resize panes with `Ctrl-b` then `Ctrl-arrow`. Zoom pane with `Ctrl-b` then `z`. ```text Ctrl-b ``` ```text Ctrl-b ``` ```text Ctrl-b ``` ```text Ctrl-b ``` -------------------------------- ### Legacy Export Output Format Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Older wrapper-driven flows may emit this text block. If present, process those instructions; otherwise prefer `tuicr review comments` as the primary source of review feedback. If the wrapper mentions clipboard export, ask the user to paste it only when CLI comments are unavailable. ```text === TUICR INSTRUCTIONS === ... === END TUICR INSTRUCTIONS === ``` -------------------------------- ### Herdr Multiplexer Commands Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Select a pane by clicking it in the Herdr UI. Close tuicr with `q`; the wrapper then closes the review pane. ```text q ``` -------------------------------- ### Local theme file format (my-theme.toml) Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md Flat TOML file with required palette keys matching tuicr's UI colors. `selection_marker` and `syntax_theme` are optional; relative `syntax_theme` paths resolve relative to this file. See `examples/tuicr-teal.toml` for the full list of required keys. ```toml # ~/.config/tuicr/themes/my-theme.toml # Local theme file names are selected by theme name. # `theme = "my-theme"` loads `my-theme.toml` from the local themes directory. panel_bg = "#011627" bg_highlight = "#1d3b53" fg_primary = "#c3ccdc" fg_secondary = "#a1aab8" # Optional: color selection markers independently of focused pane borders. selection_marker = "#242d38" # `syntax_theme` points to a local `.tmTheme` file, relative to this file. syntax_theme = "my-theme.tmTheme" # Remaining keys are required. See `examples/tuicr-teal.toml` for the full list. diff_add = "#21c7a8" diff_del = "#ff5874" status_bar_bg = "#252c3f" mode_bg = "#82aaff" ``` -------------------------------- ### List PR sessions for GitLab repos with URL --repo Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md GitLab groups nest, so a repo under group/subgroup has group/subgroup as its owner. Use a URL form (HTTPS or SSH) to select the repo. ```bash tuicr review list --repo https://gitlab.com/org/team/svc tuicr review list --repo git@gitlab.com:org/team/svc.git # -> [ ..., { "slug": "gl:org/team/svc/pr/123", "kind": "pr", ... } ] ``` -------------------------------- ### List PR sessions for Azure DevOps repos with URL --repo Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Azure DevOps repos have owner org/project, so a bare owner/repo selector cannot name them. Use a URL form recognized by host, such as the HTTPS or SSH URL shown. ```bash tuicr review list --repo dev.azure.com/myorg/myproject/_git/myrepo tuicr review list --repo git@ssh.dev.azure.com:v3/myorg/myproject/myrepo # -> [ ..., { "slug": "az:myorg/myproject/myrepo/pr/123", "kind": "pr", ... } ] ``` -------------------------------- ### tuicr stderr markers for scripts and agents Source: https://github.com/agavra/tuicr/blob/main/docs/CLI.md Printed to stderr so they survive on the user's scrollback and stay out of piped output. `tuicr-session:` is printed once at startup, before the alternate screen is entered, and names the session slug; pass it to `tuicr review comments --session `. `tuicr-summary:` is printed on exit, always, including with zero comments. ```plaintext tuicr-session: agavra/tuicr@main/worktree tuicr-summary: reviewed 3/3 files, 2 comments added ``` -------------------------------- ### Scope selection with --path and --revisions Source: https://github.com/agavra/tuicr/blob/main/docs/CLI.md `--path` on its own implies `--working-tree`; pair it with `-r` to filter a commit range. These two commands show uncommitted changes to one file and that file's changes across a range. ```bash tuicr -p src/cli.rs # uncommitted changes to one file ``` ```bash tuicr -r main..HEAD -p src/cli.rs # that file's changes across a range ``` -------------------------------- ### Manual Release Commands Source: https://github.com/agavra/tuicr/blob/main/RELEASE.md Commands to manually publish a new version to crates.io and create a git tag. Run after updating the version in Cargo.toml. Use `cargo publish --dry-run` to verify before publishing. ```bash # Update version in Cargo.toml manually, then: cargo publish --dry-run # verify cargo publish # publish to crates.io git tag v0.2.0 git push origin v0.2.0 ``` -------------------------------- ### Selection marker and highlight colors in local theme Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md Sets `selection_marker` and related background colors in a local theme file for matching marker and highlight colors. `selection_marker` is optional; invalid values reject the theme. ```toml selection_marker = "#242d38" # optional marker foreground cursor_line_bg = "#242d38" # existing diff cursor-row background bg_highlight = "#242d38" # existing list/visual-selection background ``` -------------------------------- ### tuicr review list and comments commands Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Commands to list persisted review sessions and fetch comments. `--repo` filters by local checkout or forge repo; `--all` lists every session across all repos. `--session` accepts a local slug or a PR slug like `gh:slatedb/slatedb/pr/1745`. All commands emit JSON by default with RFC3339 timestamps. ```bash tuicr review list --repo . # checkout + its repo's PR sessions tuicr review list --repo slatedb/slatedb # all sessions for a forge repo tuicr review list --all # every session across all repos tuicr review comments --session agavra/tuicr@main/worktree tuicr review comments --session gh:slatedb/slatedb/pr/1745 ``` -------------------------------- ### Read review comments with tuicr review comments Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Run this CLI command on demand to read user review comments for a session. The command emits JSON with fields such as id, location, path, start_line, end_line, side, comment_type, author, lifecycle_state, and content. Poll about every 30 seconds during an active review and compare comment IDs with the previous result. ```bash tuicr review comments --repo /path/to/repo --session ``` -------------------------------- ### ReviewSession struct definition Source: https://github.com/agavra/tuicr/blob/main/PLAN.md Defines the core data model for a review session, including repository path, base commit, timestamps, and per-file reviews. ```rust pub struct ReviewSession { pub id: String, pub repo_path: PathBuf, pub base_commit: String, pub created_at: DateTime, pub updated_at: DateTime, pub files: HashMap, pub session_notes: Option, } ``` -------------------------------- ### Add comment with structured JSON input via --input Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Uses --input with literal JSON for structured input. The file key is 'file', not 'path'. target.type is inferred from fields; one object per call, an array is a parse error. ```bash tuicr review add --session --username "Codex" --input \ '{"file":"src/main.rs","line":42,"side":"new","comment_type":"issue","content":"Handle the empty case."}' ``` -------------------------------- ### Use --remote with a named VCS remote Source: https://github.com/agavra/tuicr/blob/main/docs/CLI.md Use `--remote` to specify a named VCS remote for PR operations when the checkout's `origin` does not point to the forge repo. The remote must be configured and its fetch/pull URL is used; a missing remote is an error. ```bash tuicr pr 382 --remote staging-upstream ``` -------------------------------- ### Export review to stdout with --stdout Source: https://github.com/agavra/tuicr/blob/main/README.md Run tuicr with `--stdout` to pipe the markdown review to another process, such as redirecting to a file or copying to the clipboard. ```bash tuicr --stdout > review.md tuicr --stdout | pbcopy ``` -------------------------------- ### Open a pull request with tuicr Source: https://github.com/agavra/tuicr/blob/main/docs/GITEA.md Open a Gitea pull request by its index. The target can be a PR index, a PR URL, or a host-qualified `host/owner/repo#index` form. Note the plural `/pulls/` in Gitea URLs; the bare `owner/repo#index` form resolves to GitHub. ```bash tuicr pr 125 ``` -------------------------------- ### Add line comment with tuicr review add Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Adds a line-level issue comment to a specific file and line. Use --side new for added or unchanged lines, --side old for removed lines. Pass --username to distinguish agent comments. ```bash tuicr review add --repo /path/to/repo --session \ --target-file src/main.rs \ --line 42 \ --side new \ --type issue \ --username "Codex" \ "Handle the empty case here." ``` -------------------------------- ### tuicr review add Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Adds a review comment to a session. Accepts JSON input via --input, which can be literal JSON, a file path, or stdin. ```APIDOC ## [CLI] tuicr review add ### Description Adds a review comment to a session. Accepts JSON input via --input, which can be literal JSON, a file path, or stdin. ### Command `tuicr review add --session --input ` ### Parameters #### Command Flags - `--session` (string) - Required - Session identifier (e.g., `agavra/tuicr@main/worktree`) - `--input` (string) - Required - JSON payload; can be literal JSON, `@path/to/payload.json`, or `-` for stdin #### JSON Input Fields - `content` (string) - Required - Comment text - `type` or `comment_type` (string) - Optional - Comment classification, defaults to `none` - `file` (string) - Optional - File path; omit for a review-level comment - `line` (integer) - Optional - Line number for a line comment - `start_line` (integer) - Optional - Start line for a range - `end_line` (integer) - Optional - End line for a range - `side` (string) - Optional - `old` or `new`, defaults to `new` - `username` or `author` (string) - Optional - Comment author; uses same fallback as `--username` #### Nested Target Object - `comment_type` (string) - Optional - Comment classification - `content` (string) - Required - Comment text - `target` (object) - Optional - Target specification with fields: - `type` (string) - Required - Target type: `review`, `file`, `line`, `line_range`, or `range` - `file` (string) - Optional - File path - `start_line` (integer) - Optional - Start line for range - `end_line` (integer) - Optional - End line for range - `side` (string) - Optional - `old` or `new` ### Request Example ```bash tuicr review add --session agavra/tuicr@main/worktree --input - <<'JSON' { "type": "issue", "content": "Handle the empty case here.", "file": "src/main.rs", "line": 42, "side": "new" } JSON ``` ### Response #### Success Response Returns a JSON object representing the added comment. Example: ```json { "id": "79c9b3e1-0a7a-4efe-9d43-f7085d7c1a82", "location": "src/main.rs:42", "path": "src/main.rs", "start_line": 42, "end_line": 42, "side": "new", "comment_type": "issue", "author": "alice", "lifecycle_state": "local_draft", "created_at": "2026-05-22T17:20:00Z", "content": "Handle the empty case here." } ``` ``` -------------------------------- ### tuicr review list Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Lists review sessions. Returns a JSON array of session objects. Use --all to include PR sessions. ```APIDOC ## [CLI] tuicr review list ### Description Lists review sessions. Returns a JSON array of session objects. Use --all to include PR sessions. ### Command `tuicr review list [--all]` ### Parameters #### Command Flags - `--all` (boolean) - Optional - Include PR sessions alongside local ones ### Response #### Success Response Returns a JSON array of session objects. Example: ```json [ { "slug": "agavra/tuicr@main/worktree", "kind": "local", "path": "/Users/alice/Library/Application Support/tuicr/reviews/sessions/9f6c1b3e09a54e2a.json", "updated_at": "2026-05-22T17:20:00Z", "comment_count": 1, "reviewed_count": 0, "file_count": 3, "anchor": "main", "active": true } ] ``` With `--all`, PR sessions appear with `"kind": "pr"` and a PR slug. Example: ```json [ { "slug": "gh:slatedb/slatedb/pr/1745", "kind": "pr", "path": "/Users/alice/Library/Application Support/tuicr/reviews/sessions/172e168db0d525e5.json", "updated_at": "2026-05-22T17:20:00Z", "comment_count": 0, "reviewed_count": 0, "file_count": 12, "anchor": "pr/1745", "active": false } ] ``` ``` -------------------------------- ### UI layout ASCII diagram Source: https://github.com/agavra/tuicr/blob/main/PLAN.md ASCII diagram showing the terminal UI layout with file list, diff panel, and status bar. ```text +------------------------------------------------------------------+ | tuicr - Code Review [branch: main] | +------------------+-----------------------------------------------+ | FILES | ═══ src/main.rs [M] ══════════════════════ | | [x] src/main.rs | OLD (HEAD) │ NEW (working) | | [ ] src/lib.rs | 1 fn main() { │ 1 fn main() { | | ▶[ ] src/app.rs | 2 let x = 1; │ 2 let x = 42; | | | 3 } │ 3 } | | | ─────────────────────────────────────────────| | | 💬 Line 2: [ISSUE] Magic number... | | | ═══ src/lib.rs [M] ═══════════════════════ | | | OLD (HEAD) │ NEW (working) | | | 1 pub fn foo() {} │ 1 pub fn foo() { | | | │ 2 bar(); | | | │ 3 } | +------------------+-----------------------------------------------+ | [N]ormal j/k:scroll Enter:jump r:reviewed c:comment ?:help | +------------------------------------------------------------------+ ``` -------------------------------- ### Markdown review export format Source: https://github.com/agavra/tuicr/blob/main/README.md Structured markdown block copied to clipboard with `y` or `:clip`. Each comment includes a number and a file/line anchor, ready to paste into a coding agent. ```markdown I reviewed your code and have the following comments. Please address them. 1. `src/auth.rs` - Consider adding unit tests 2. `src/auth.rs:42` - Magic number should be a named constant 3. `src/auth.rs:50-55` - This block could be refactored ``` -------------------------------- ### Add file-level suggestion comment with tuicr review add Source: https://github.com/agavra/tuicr/blob/main/skills/tuicr/SKILL.md Adds a file-scoped suggestion comment. Omit --line for file-level feedback. Use --type suggestion when the intent is a suggestion rather than an issue. ```bash tuicr review add --repo /path/to/repo --session \ --target-file src/main.rs \ --type suggestion \ --username "Codex" \ "Consider splitting this file-level concern into a helper." ``` -------------------------------- ### FileReview struct definition Source: https://github.com/agavra/tuicr/blob/main/PLAN.md Defines the per-file review state, including review status, file comments, line comments, and file status. ```rust pub struct FileReview { pub path: PathBuf, pub reviewed: bool, pub file_comments: Vec, pub line_comments: HashMap>, pub status: FileStatus, // Added, Modified, Deleted, Renamed } ``` -------------------------------- ### Markdown Output Format Template Source: https://github.com/agavra/tuicr/blob/main/PLAN.md Template for the exported markdown review file. Includes placeholders for repository name, timestamp, base commit, review counts, session notes, and file/comment sections. ```markdown # Code Review: {repo_name} **Reviewed:** {timestamp} **Base Commit:** `{commit_sha}` **Files Reviewed:** {reviewed}/{total} ## Summary {session_notes} ## Files ### M `src/auth.rs` [REVIEWED] #### File Comments > **[SUGGESTION]** Consider adding unit tests #### Line Comments ```rust // Line 42 let expiry = now + 3600; ``` > **[ISSUE]** Magic number should be a named constant --- ``` -------------------------------- ### Add review comment with JSON input via stdin Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Pass a JSON payload to `tuicr review add` using `--input -` to read from stdin. The payload uses flat fields: `type`, `content`, `file`, `line`, and `side`. The `type` defaults to `none` if omitted, and `side` defaults to `new`. ```bash tuicr review add --session agavra/tuicr@main/worktree --input - <<'JSON' { "type": "issue", "content": "Handle the empty case here.", "file": "src/main.rs", "line": 42, "side": "new" } JSON ``` -------------------------------- ### Configure [export] section in tuicr config Source: https://github.com/agavra/tuicr/blob/main/docs/CONFIG.md Settings under the [export] section control the Markdown that `y` and `:clip` copy to the clipboard, and that `--stdout` prints. They do not affect reviews pushed to a forge with `:submit`. Every key defaults to what tuicr has always emitted, so exports stay byte-identical until a key is set. Setting a string key to `""` omits that line along with the blank line after it. ```toml [export] intro = "" scope_line = false comments_header = "## Comments" ``` -------------------------------- ### Rust: Add a line comment using ReviewStore Source: https://github.com/agavra/tuicr/blob/main/README.md Use the tuicr Rust library API to add a comment to a specific line in a file within a saved review session. Requires a session from `list_sessions_for_repo` and an `AddCommentRequest` with a `CommentTarget::Line`. ```rust use tuicr::{AddCommentRequest, CommentTarget, CommentType, LineSide, ReviewStore}; let store = ReviewStore::new(); let sessions = store.list_sessions_for_repo("/path/to/repo")?; let session = &sessions[0].session_ref; store.add_comment( session, AddCommentRequest { target: CommentTarget::Line { path: "src/main.rs".into(), line: 42, side: LineSide::New, }, content: "Handle the empty case here.".into(), comment_type: CommentType::from_id("issue"), }, )?; ``` -------------------------------- ### tuicr review comments Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Lists comments for a review session. Returns a JSON array of comment objects. ```APIDOC ## [CLI] tuicr review comments ### Description Lists comments for a review session. Returns a JSON array of comment objects. ### Command `tuicr review comments` ### Parameters No parameters documented. ### Response #### Success Response Returns a JSON array of comment objects. Example: ```json [ { "id": "79c9b3e1-0a7a-4efe-9d43-f7085d7c1a82", "location": "src/main.rs:42", "path": "src/main.rs", "start_line": 42, "end_line": 42, "side": "new", "comment_type": "issue", "author": "alice", "lifecycle_state": "local_draft", "created_at": "2026-05-22T17:20:00Z", "content": "Handle the empty case here." } ] ``` ``` -------------------------------- ### Add a comment with tuicr review add Source: https://github.com/agavra/tuicr/blob/main/docs/REVIEW_CLI.md Adds a comment to a review session. Use flags to target a file, line, range, side, type, and author. Omit --target-file for a review-level comment; add --line for a line comment, --end-line for a range comment, and --side old|new for inline comments. Use --username to set the author; otherwise tuicr uses the configured username or "user". ```bash tuicr review add --session agavra/tuicr@main/worktree \ --target-file src/main.rs \ --line 42 \ --side new \ --type issue \ "Handle the empty case here." ``` -------------------------------- ### Authenticate with self-hosted GitLab instance Source: https://github.com/agavra/tuicr/blob/main/docs/GITLAB.md Authenticate against a self-hosted GitLab instance. After this, tuicr recognizes remotes on that host as GitLab because the host is configured in glab. ```bash glab auth login --hostname git.example.com ```