octorus: A Rust-built TUI tool where AI autonomously reviews & fixes code while you browse PR diffs

Published: (February 13, 2026 at 02:03 AM EST)
3 min read
Source: Dev.to

Source: Dev.to

Overview

octorus is a Rust‑built terminal UI (TUI) tool that lets you browse pull‑request diffs, leave inline comments, and run an autonomous AI review‑fix cycle called AI‑Rally. It was created as a replacement for octo.nvim after switching to the Helix editor.

Key features

  • Inline review comments with syntax‑highlighted diffs.
  • Separate sections for review comments and discussion comments.
  • AI‑Rally: two AI agents (reviewer & reviewee) take turns reviewing and fixing code until they converge or reach a configurable iteration limit.
  • Background execution of AI‑Rally so you can continue manual reviewing.
  • Automatic posting of AI‑generated comments and commits to the PR.
  • Customizable prompts and behavior.

Installation

cargo install octorus

Quick Start

Initialize a configuration

octorus init

This creates a config file and prompt markdown files under ~/.config/octorus/.

Run the diff viewer

octorus --repo <owner/repo> --pr <pr-number>

Replace <owner/repo> and <pr-number> with the appropriate values.

Usage

  • Browse diffs – navigate the PR diff view with your preferred keybindings.
  • Leave comments – press c for a comment, s for a suggestion, a to approve, or r to request changes (default bindings, see the configuration section).
  • View all comments – review and discussion comments are displayed in distinct sections for easy scanning.

AI‑Rally

  1. Press A to start AI‑Rally.
  2. Two AI agents (reviewer & reviewee) begin a back‑and‑forth review/fix loop, up to max_iterations.
  3. Press b to send the rally to the background, allowing you to continue manual reviewing.
  4. As the agents finish, they automatically post comments and push commits to the PR.

You can customize the AI behavior via prompts and config options.

Configuration

Running octorus init generates a default configuration file (~/.config/octorus/config.toml). Below is the default content:

editor = "vi"  # Editor launched for writing PR comments (e.g., nvim, hx)

[diff]
theme = "base16-ocean.dark"  # Syntax‑highlighting theme for the diff viewer

[keybindings]
approve = "a"
request_changes = "r"
comment = "c"
suggestion = "s"

[ai]
reviewer = "claude"   # Options: "claude" or "codex" (must be installed locally)
reviewee = "claude"
max_iterations = 10
timeout_secs = 600

# Custom prompt directory (default: ~/.config/octorus/prompts/)
# prompt_dir = "/custom/path/to/prompts"

Custom Prompts

Prompt files are stored in ~/.config/octorus/prompts/:

~/.config/octorus/prompts/
├── reviewer.md    # Prompt for the reviewer agent
├── reviewee.md   # Prompt for the reviewee agent
└── rereview.md   # Prompt for re‑review iterations

Both Claude and Codex are launched in headless mode, so the corresponding CLI tools must be installed on your machine. The author uses Codex as the reviewer and Claude Code as the reviewee.

Background & Inspiration

The idea originated from seeing AI agents converse on social platforms and wanting to apply that dynamic to code review. Building a TUI diff viewer provided the perfect environment to experiment with autonomous review cycles.

Further Reading

  • Detailed performance analysis of octorus diff rendering:

If you find octorus useful, consider starring the GitHub repository. Happy reviewing!

0 views
Back to Blog

Related posts

Read more »