ushironoko/octorus

Review GitHub PRs and local diff in your terminal, with AI-powered automated review & fix cycles

C

225

497 commits

updated Oct 18, 2026

See the code

README

octorus

octorus banner

Crates.io License: MIT

High-performance code review in your terminal for GitHub PRs, issues, local diffs, CI status, and Git operations. Includes an integrated AI-powered review cycle.

Key Features

  • Fast and smooth: Handles 1,000,000+ diff lines and 6,000+ files
  • Multifunctional: Repository browsing, PR review, issue view, local diff view, CI status, and Git operations are integrated into one system with search, filters, comments, suggestions, and more.
  • Code intelligence without an LSP: tree-sitter symbol index powers file outlines, repository-wide symbol search, and Go to Definition — no language server to install, nothing to configure
  • Automatic Review and Code Fix: Automated review and fix workflows for Claude and Codex, while keeping the process under your control
  • Customization: Customize all settings, including keybindings, themes, and agent prompts

Requirements

  • GitHub CLI (gh) - Must be installed and authenticated
  • Rust 1.95+ (for building from source)
  • For AI Rally feature (optional, choose one or both):

Installation

cargo install octorus

Or install via mise:

mise use -g github:ushironoko/octorus

Usage

# 1. Initialize config
or init

# 2. Open the Cockpit dashboard (default when no flags are given)
or

# 3. Open a specific PR directly
or --pr 123

# 4. Preview local changes
or --local

# 5. Browse the repository (read any file, jump by symbol)
or --browse

Options

OptionDescription
-r, --repo <REPO>Repository name (e.g., owner/repo). Auto-detected from current directory if omitted
-p, --pr [<PR>]Open PR list (flag only), or open a specific PR directly if number is provided
-i, --issue [<ISSUE>]Open issue list (flag only), or open a specific issue directly if number is provided
--localShow local git diff against current HEAD (no GitHub PR fetch)
--ai-rallyStart AI Rally mode directly. Runs in headless mode when combined with --pr <number> or --local
--review-only[=BOOL]Force AI Rally proposal-iteration mode. Use with --ai-rally, for example --review-only=true
--git-opsOpen Git Ops view directly on startup
--browseOpen the Repository Browser directly on startup
--auto-focusAuto-focus changed file when local diff updates (local mode only)
--working-dir <DIR>Working directory for AI agents (default: current directory)
--accept-local-overridesAccept local .octorus/ overrides for AI settings in headless mode
--output <FILE>Write JSON result to a file in addition to stdout (headless mode)

Subcommands

SubcommandDescription
or initInitialize global configuration files, prompt templates, and agent SKILL.md
or init --localInitialize project-local .octorus/ config and prompts
or init --forceOverwrite existing configuration files
or cleanRemove AI Rally session data
or local-commentsShow saved local comments for the current worktree
or update-local-commentResolve or reopen local comments by ID

or init creates global config:

  • ~/.config/octorus/config.toml - Main configuration file
  • ~/.config/octorus/prompts/ - Prompt template directory
  • ~/.claude/skills/octorus/SKILL.md - Agent skill documentation (if ~/.claude/ exists)

or init --local creates project-local config:

  • .octorus/config.toml - Project-local configuration (overrides global)
  • .octorus/prompts/ - Project-local prompt templates

Reviewing Code in your Terminal

octorus is an all-in-one review tool for the terminal UI. It shows GitHub PRs, issues, CI status, local diffs, Git Ops, and AI-Rally.

Cockpit

Running or with no flags opens the Cockpit — a dashboard that serves as the main entry point.

  • Live counts: issues mentioning you and PRs requesting your review
  • Navigation menu to PR List, Issue List, Local Diff, Git Ops, and Repo Browse
  • Press Enter to navigate, q to quit, ? for help, r to refresh counts
  • When no GitHub repo is detected, remote features (PR List, Issue List) are disabled; Local Diff, Git Ops, and Repo Browse remain available

Repository Browser

octorus is not only a review tool — or --browse (or b from the file list, or Repo Browse in the Cockpit) opens the whole repository read-only.

  • Browse every file, not just the ones a PR touched — tracked and untracked files included, ignored files excluded, uncommitted files visible immediately
  • Same tree-sitter syntax highlighting as the diff view (24 languages, your configured theme, Vue/Svelte/Markdown injections)
  • Long lines wrap at the pane edge onto gutter-aligned continuation rows, breaking on character boundaries so CJK prose wraps cleanly
  • Markdown rich display (M) — the same rich rendering as the diff view, applied to the open markdown file
  • Background loading — listing the repository, reading a file, and highlighting never block the UI
  • Blame gutter (gb) with jump to the blamed commit's diff (gc) or the PR that introduced it (gp)
  • Review discussion anchoring (gr) — marks the lines a PR review discussed and opens the thread at the cursor line; threads are placed by blame origin, so lines edited or moved since the review may not be matched
  • Read-only — gf opens the file in your editor (editor config → $VISUAL → $EDITOR → vi) at the cursor line
  • Keyword filter for the file tree (Space /)
  • Render limits with explicit notices: over 8 MiB, over 100,000 lines, or a single line over 10,000 bytes; binary and empty files are labelled instead of rendered
  • Works without a GitHub remote — only the PR- and issue-backed screens need one
or --browse

Symbol Intelligence

octorus indexes the repository in the background using tree-sitter tags.scm queries — no language server to install and nothing to configure; the grammars are compiled into the binary. The header shows the index state (symbols: indexing / ready / unavailable), and browsing never waits for it.

FeatureKeyDescription
File outlineoSymbols of the open file, indented by nesting depth, with the cursor's enclosing symbol pre-selected
Symbol searchsFuzzy search across every symbol in the repository, best 200 matches listed; Enter opens the file at the definition
UML module graphiRight-side graph pane showing the current module and its direct imports/importers; Enter opens a listed local module
Go to definitiongdJump to the definition of the first indexed identifier on the cursor line
Jump backCtrl-oReturn to the position before the last jump

Symbol extraction covers Rust, TypeScript, TSX, JavaScript, JSX, Go, Python, Ruby, C, C++, Java, C#, Lua, PHP, Swift, Bash, Zig, Haskell, MoonBit, and Markdown (headings become the outline of a README).

The module graph supports Rust, TypeScript, TSX, JavaScript, and JSX. JavaScript/TypeScript imports resolve relative paths, packages, and a root tsconfig.json or jsconfig.json; Rust resolution is best-effort. Each direction shows up to 200 nodes, every answer is labelled exact or approximate, and the pane follows file navigation.

Pull Requests

PR list

  • Infinite scroll PR list with state filter (open / closed / all)

File list

  • Split view: file list (35%) + diff preview (65%), focused pane highlighted
  • Syntax highlighting powered by tree-sitter
  • Inline comments and code suggestions on specific lines
  • Readline-style editing keys (Ctrl-A/E/B/F/P/N/D/H/K/U/W) inside the comment / reply / suggestion text input
  • Multiline selection mode (Shift+Enter) for range comments and suggestions
  • Show Comment List for Review Comments and Discussions
  • Review submission (Approve / Request Changes / Comment)
  • Mark files and directories as viewed
  • File tree view toggle
  • Go to Definition (gd) with symbol popup and jump stack (up to 100 positions)
  • Go to File (gf) open file at cursor line in external editor (editor config → $VISUAL → $EDITOR → vi)
  • Keyword filter for PR list and file list
  • Show PR Description with Markdown renderer
  • Open PR in browser

Issues

Issue list

  • Infinite scroll issue list with state filter (open / closed / all)

Issue detail

  • Issue detail view with Markdown renderer
  • Linked PR navigation — jump directly to a linked PR
  • Issue comment list and comment detail view
  • Keyword filter
  • Open issue in browser

CI Status

  • CI checks list with workflow name and duration
  • Status icons: ✓ (pass), ✕ (fail), ○ (pending), - (skipped/cancelled)
  • Open check run in browser

Local Diff

Local Diff

  • Preview uncommitted changes (git diff HEAD) without creating a PR
  • Real-time file watching — diff refreshes automatically on save (ignoring .git/ internals)
  • Auto-focus mode (--auto-focus or F key) — automatically selects the most recently changed file
  • Local comments — leave review comments on your own diff, persisted to disk across sessions
  • Header shows [LOCAL] or [LOCAL AF] when auto-focus is active
or --local
or --local --auto-focus

Local Comments

In local mode, you can leave review comments on diff lines just like on a GitHub PR. Comments are saved to ~/.cache/octorus/local-comments/ and persist across sessions, scoped by repo and working directory.

  • Press c on a diff line to add a comment, s for a suggestion, r to reply
  • Press C to view all local comments in the comment list
  • Comments can be resolved and reopened

Local comments can also seed AI Rally — when you start a rally in local mode, any open local comments are passed to the reviewer as a starting point, skipping the initial review step.

CLI subcommands for managing local comments outside the TUI:

# Show open local comments (auto-detects repo)
or local-comments

# Show all comments including resolved
or local-comments --all

# Show as JSON
or local-comments --json

# Resolve a comment
or update-local-comment --resolve 3

# Reopen a comment
or update-local-comment --reopen 3

Git Ops

Git Ops

  • Show staging, committing, and commit history
  • Tree pane (70%) + commit history pane (30%) + diff preview
  • Stage/unstage individual files or directories
  • Discard, undo, soft-reset with Y/n confirmation showing the exact git command
  • Push to origin
  • Infinite scroll commit history
  • Starts without a GitHub remote — or --git-ops reads status and commit history from the local repository alone

Zen mode

Zen mode displays the interface in fullscreen. Toggle it with the Z key.

This is especially effective on small screens.

Shell Command

Press ! to enter shell command mode and execute any shell command.

  • Runs asynchronously in the working directory
  • Not available during text input, filter input, or modal dialogs
  • Output is truncated at 1 MB
  • Timeout: configurable via [shell].timeout_secs (default: 10 seconds)

AI Rally

AI Rally

  • Automated PR review and fix cycle using two AI agents
  • Reviewer: analyzes the PR diff and provides review feedback
  • Reviewee: fixes issues based on the review feedback and commits changes
  • Permission and clarification prompts during the cycle
  • Pause / resume / retry / run in background

Review Only Mode

Use --ai-rally --review-only=true to run AI Rally in proposal-iteration mode. The reviewee never modifies code — instead it produces a written fix proposal which the reviewer re-reviews. Useful when you want a vetted plan rather than direct commits, or when the working tree must stay untouched.

You can also set ai.review_only = true in config, but the CLI flag is the explicit per-run override.

Flow:

  1. Reviewer reviews the PR diff (same as normal mode).
  2. If the reviewer approves → rally ends.
  3. Otherwise the reviewee produces a RevieweeProposal using read-only tools only (no Bash, Edit, Write, NotebookEdit).
  4. The reviewer re-reviews the proposal.
  5. Loop continues until reviewer approves or max_iterations is hit.

The TUI header shows a [Review Only] badge while the mode is active.

Tool boundary: The proposal step runs under a hard read-only boundary (base allowlist Read,Glob,Grep; mutating tools are denied at the agent layer). Extra read-only tools can be added via ai.reviewee_proposal_additional_tools — any entry that would re-introduce a mutating tool is rejected at startup.

Posting proposals: ai.post_reviewee_proposals controls when proposals are posted to the PR — "final" (default) posts only the last proposal, "each" posts every iteration, "none" keeps them in session history only.

[ai]
review_only = true
post_reviewee_proposals = "final"
reviewee_proposal_additional_tools = ["WebSearch"]  # optional, read-only only

Headless Mode (CI/CD)

When --ai-rally is combined with --pr or --local, AI Rally runs in headless mode — no TUI is launched, all output goes to stderr.

# Headless rally on a specific PR
or --repo owner/repo --pr 123 --ai-rally

# Headless review-only rally on a specific PR
or --repo owner/repo --pr 123 --ai-rally --review-only=true

# Headless rally on local diff
or --local --ai-rally

# With custom working directory
or --repo owner/repo --pr 123 --ai-rally --working-dir /path/to/repo

Exit codes:

CodeMeaning
0Reviewer approved
1Not approved (request changes, error, or abort)

Headless policy (no human interaction possible):

SituationBehavior
Clarification neededAuto-skip (agent proceeds with best judgment)
Permission neededAuto-deny (prevents dynamic tool expansion)
Post confirmationAuto-approve (posts review/fix to PR)
Agent text/thinkingSuppressed (prevents JSON leakage to stdout)

Codex uses sandbox mode and cannot control tool permissions at a fine-grained level. For maximum security, we recommend:

RoleRecommendedReason
ReviewerCodex or ClaudeRead-only operations, both are safe
RevieweeClaudeAllows fine-grained tool control via allowedTools

Example configuration for secure setup:

[ai]
reviewer = "codex"   # Safe: read-only sandbox
reviewee = "claude"  # Recommended: fine-grained tool control
reviewee_additional_tools = ["Skill"]  # Add only what you need

Note: If you use Codex as reviewee, it runs in --full-auto mode with workspace write access and no tool restrictions.

Tool Permissions

Default Allowed Tools

Reviewer (read-only operations):

ToolDescription
Read, Glob, GrepFile reading and searching
gh pr view/diff/checksView PR information
gh api --method GETGitHub API (GET only)

Reviewee (code modification):

CategoryCommands
FileRead, Edit, Write, Glob, Grep
Gitstatus, diff, add, commit, log, show, branch, switch, stash
GitHub CLIpr view, pr diff, pr checks, api GET
Cargobuild, test, check, clippy, fmt, run
npm/pnpm/buninstall, test, run

Additional Tools (Claude only)

Additional tools can be enabled via config using Claude Code's --allowedTools format:

ExampleDescription
"Skill"Execute Claude Code skills
"WebFetch"Fetch URL content
"WebSearch"Web search
"Bash(git push:*)"git push to remote
"Bash(gh api --method POST:*)"GitHub API POST requests
[ai]
reviewee_additional_tools = ["Skill", "Bash(git push:*)"]

octorus skills

Recommended setup for coding agents. Run the or init subcommand to create the skill file in ~/.claude/skills/octorus.

You can instruct the agent with "/octorus ai-rally in local".

Configuration

All octorus settings are configurable. Settings can be global or project-local.

Settings Reference

Top-level

KeyTypeDefaultDescription
editorstring(none)Editor command for gf keybinding (e.g., "vim", "code --wait"). Ignored in local config

[diff]

KeyTypeDefaultDescription
themestring"base16-ocean.dark"Syntax highlighting theme. Case-insensitive. See Theme
tab_widthu84Tab display width. Minimum 1 (values below are clamped)
bg_colorbooltrueShow background color on added/deleted lines

[layout]

KeyTypeDefaultDescription
left_panel_widthu1635Left panel width percentage in split view (clamped to 10–90). Right panel fills the rest
zen_modeboolfalseZen mode — hides UI chrome for distraction-free diff reading

[mouse]

KeyTypeDefaultDescription
enabledbooltrueEnable mouse support (click, wheel, drag). While capture is on, the terminal's native text selection is unavailable — press F2 (toggle_mouse) to temporarily release the mouse for copying, or set this to false to opt out entirely
wheel_stepu163Lines moved per wheel notch (clamped to 1–10)

[ai]

KeyTypeDefaultDescription
reviewerstring"claude"Reviewer agent. "claude" or "codex"
revieweestring"claude"Reviewee agent. "claude" or "codex"
max_iterationsu3210Max review-fix iterations. Hard limit: 100
timeout_secsu64600Timeout per agent invocation in seconds. Hard limit: 7200
prompt_dirstring(none)Custom prompt template directory. Absolute paths and .. are rejected in local config
reviewer_additional_toolsstring[][]Additional tools for reviewer (Claude only). Uses --allowedTools format
reviewee_additional_toolsstring[][]Additional tools for reviewee (Claude only). Uses --allowedTools format
reviewee_proposal_additional_toolsstring[][]Additional read-only tools layered on the proposal-mode allowlist (Claude only). Fail-closed: entries matching Bash, Edit, Write, NotebookEdit, or Bash(...) are rejected at startup. See Review Only Mode
auto_postboolfalsePost reviews/fixes to PR without confirmation
review_onlyboolfalseRun AI Rally in proposal-iteration mode — reviewee produces fix proposals (no code modification) instead of applying changes. See Review Only Mode
post_reviewee_proposalsstring"final"When to post reviewee proposals as PR comments in review_only mode. "final": only the final proposal. "each": every proposal. "none": never post (session history only)

[git_ops]

KeyTypeDefaultDescription
max_diff_cacheusize20Max entries for commit diff cache (including prefetch)

[shell]

KeyTypeDefaultDescription
timeout_secsu6410Shell command execution timeout in seconds

[keybindings]

See Configurable Keybindings for the full list. Three formats are supported:

[keybindings]
move_down = "j"                          # Simple key
page_down = { key = "d", ctrl = true }   # Key with modifier
go_to_definition = ["g", "d"]            # Two-key sequence

Global Configuration

Run or init to create default config files, or create ~/.config/octorus/config.toml manually:

Project-Local Configuration

You can create project-local configuration under .octorus/ in your repository root. This allows per-project settings that can be shared with your team via version control.

or init --local

This generates:

.octorus/
├── config.toml        # Project-local config (overrides global)
└── prompts/
    ├── reviewer.md    # Project-specific reviewer prompt
    ├── reviewee.md    # Project-specific reviewee prompt
    └── rereview.md    # Project-specific re-review prompt

Override behavior: Local values are deep-merged on top of global config. Only specify keys you want to override — unspecified keys inherit from global config.

# .octorus/config.toml — only override what you need
[ai]
max_iterations = 5
timeout_secs = 300

Prompt resolution order (highest priority first):

  1. .octorus/prompts/ (project-local)
  2. ai.prompt_dir (custom directory from config)
  3. ~/.config/octorus/prompts/ (global)
  4. Built-in defaults

Warning: When you clone or fork a repository that contains .octorus/, be aware that those settings were chosen by the repository owner — not by you. octorus applies the following safeguards to protect you:

  • editor is always ignored in local config. It cannot be set per-project.
  • AI-related settings (ai.reviewer, ai.reviewee, ai.*_additional_tools, ai.auto_post) and local prompt files will trigger a confirmation dialog before AI Rally starts. In headless mode, you must explicitly pass --accept-local-overrides to allow them.
  • ai.prompt_dir cannot use absolute paths or .. in local config.
  • Symlinks under .octorus/prompts/ are not followed.

Customizing Prompt Templates

AI Rally uses customizable prompt templates. Run or init to generate default templates, then edit them as needed:

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

Templates support variable substitution with {{variable}} syntax:

VariableDescriptionAvailable In
{{repo}}Repository name (e.g., "owner/repo")All
{{pr_number}}Pull request numberAll
{{pr_title}}Pull request titleAll
{{pr_body}}Pull request descriptionreviewer
{{diff}}PR diff contentreviewer
{{iteration}}Current iteration numberAll
{{review_summary}}Summary from reviewerreviewee
{{review_action}}Review action (Approve/RequestChanges/Comment)reviewee
{{review_comments}}List of review commentsreviewee
{{blocking_issues}}List of blocking issuesreviewee
{{external_comments}}Comments from external toolsreviewee
{{changes_summary}}Summary of changes maderereview
{{updated_diff}}Updated diff after fixesrereview

Theme

The [diff] section's theme option controls the syntax highlighting color scheme in the diff view.

Built-in Themes

ThemeDescription
base16-ocean.darkDark theme based on Base16 Ocean (default)
base16-ocean.lightLight theme based on Base16 Ocean
base16-eighties.darkDark theme based on Base16 Eighties
base16-mocha.darkDark theme based on Base16 Mocha
DraculaDracula color scheme
InspiredGitHubLight theme inspired by GitHub
Solarized (dark)Solarized dark
Solarized (light)Solarized light
[diff]
theme = "Dracula"

Theme names are case-insensitive (dracula, Dracula, and DRACULA all work).

If a specified theme is not found, it falls back to base16-ocean.dark.

Custom Themes

You can add custom themes by placing .tmTheme (TextMate theme) files in ~/.config/octorus/themes/:

~/.config/octorus/themes/
├── MyCustomTheme.tmTheme
└── nord.tmTheme

The filename (without .tmTheme extension) becomes the theme name:

[diff]
theme = "MyCustomTheme"

Custom themes with the same name as a built-in theme will override it.

Keybindings

Mouse

Mouse support works on every screen and follows the same paths as the keyboard, so lazy loading, prefetching, and state transitions behave identically.

GestureAction
Click a list row / diff lineSelect it (also focuses the clicked pane in split views)
Click the selected row / line againOpen it (Enter equivalent)
WheelMove the cursor/selection under the pointer by wheel_step lines (works on unfocused panes too)
Drag on diff linesMulti-line selection (V equivalent)
Drag the split borderResize the left panel (session only)
Click outside an informational overlayClose it (Esc equivalent)
Click outside a confirmation dialogIgnored — destructive confirmations are answered with y/n only
F2Toggle mouse capture on/off

Copying text: while mouse capture is on, the terminal's native drag-to-select is unavailable. Press F2 to release the mouse, copy, then press F2 again (many terminals also support Shift+drag as a bypass). Set [mouse] enabled = false to disable mouse support entirely.

PR List View

KeyAction
j / ↓Move down
k / ↑Move up
Shift+jPage down
Shift+kPage up
ggJump to first
GJump to last
EnterSelect PR
oFilter: Open PRs only
cFilter: Closed PRs only
aFilter: All PRs
OOpen PR in browser
SView CI checks status
Space /Keyword filter
RRefresh PR list
LToggle local diff mode
ZToggle zen mode
?Toggle help
qQuit

PRs are loaded with infinite scroll — additional PRs are fetched automatically as you scroll down. The header shows the current state filter (open/closed/all).

File List View

KeyAction
j / ↓Move down
k / ↑Move up
Shift+jPage down
Shift+kPage up
Enter / → / lOpen split view
vMark file as viewed/unviewed
VMark directory as viewed
aApprove PR
rRequest changes
cComment only
CView review comments
RForce refresh (discard cache)
dView PR description
AStart AI Rally
SView CI checks status
GOpen git ops view
bOpen Repository Browser
IOpen issue list
tToggle file tree view
Space /Keyword filter
LToggle local diff mode
FToggle auto-focus (local mode)
ZToggle zen mode
?Toggle help
qQuit

Split View

The split view shows the file list (left) and a diff preview (right). The default ratio is 35%/65%, configurable via layout.left_panel_width. The focused pane is highlighted with a yellow border.

File List Focus:

KeyAction
j / ↓Move file selection (diff follows)
k / ↑Move file selection (diff follows)
PageDownScroll diff page down (regardless of focused pane)
PageUpScroll diff page up (regardless of focused pane)
tToggle file tree view
Enter / → / lFocus diff pane
ZToggle zen mode
← / h / qBack to file list

Diff Focus:

KeyAction
j / ↓Scroll diff
k / ↑Scroll diff
gdGo to definition
gfOpen file in $EDITOR
gg / GJump to first/last line
Ctrl-oJump back
Ctrl-dPage down (focus-aware)
Ctrl-uPage up (focus-aware)
PageDownScroll diff page down (regardless of focused pane)
PageUpScroll diff page up (regardless of focused pane)
nJump to next comment
NJump to previous comment
cAdd comment at line
sAdd suggestion at line
Shift+EnterEnter multiline selection mode
EnterOpen comment panel
Tab / → / lOpen fullscreen diff view
← / hFocus file list
qBack to file list

Diff View

KeyAction
j / ↓Move down
k / ↑Move up
gdGo to definition
gfOpen file in $EDITOR
gg / GJump to first/last line
Ctrl-oJump back
nJump to next comment
NJump to previous comment
Ctrl-dPage down
Ctrl-uPage up
PageDownScroll diff page down
PageUpScroll diff page up
cAdd comment at line
sAdd suggestion at line
Shift+Enter / VEnter multiline selection mode
MToggle Markdown rich display
EnterOpen comment panel
← / h / q / EscBack to previous view

Go to Definition (gd): When multiple symbol candidates are found, a popup appears for selection. Use j/k to navigate, Enter to jump, Esc to cancel. The jump stack (Ctrl-o to go back) stores up to 100 positions.

Note: Lines with existing comments are marked with ●. When you select a commented line, the comment content is displayed in a panel below the diff.

Multiline Selection Mode:

Press Shift+Enter to enter multiline selection mode. Select a range of lines, then create a comment or suggestion spanning the entire range.

KeyAction
j / ↓Extend selection down
k / ↑Extend selection up
Enter / cComment on selection
sSuggest on selection
EscCancel selection

Comment Panel (when focused):

KeyAction
j / kScroll panel
cAdd comment
sAdd suggestion
rReply to comment
Tab / Shift-TabSelect reply target
n / NJump to next/prev comment
Esc / qClose panel

Input Mode (Comment/Suggestion/Reply)

When adding a comment, suggestion, or reply, you enter the built-in text input mode:

KeyAction
Ctrl+SSubmit
EscCancel

Multi-line input is supported. Press Enter to insert a newline.

Repository Browser View

The repository browser shows the file tree (left) and file content (right), with an optional UML module graph pane on the far right; the file outline and symbol search open as overlays. Keys depend on which pane has focus. The focused pane is highlighted with a yellow border.

This view can be opened with b from the file list, Repo Browse in the Cockpit, or directly from the CLI with the --browse flag.

Tree Focus:

KeyAction
j / ↓Move down
k / ↑Move up
Ctrl-d / Ctrl-uPage down / up
gg / GJump to first / last row
Enter / l / →Open file, or expand/collapse directory
Space /Filter paths by keyword
sRepository symbol search
ZToggle zen mode
?Toggle help
q / EscBack to the previous screen

File Focus:

KeyAction
j / ↓Move cursor down
k / ↑Move cursor up
Ctrl-d / Ctrl-u, PageDown / PageUpPage down / up
gg / GJump to first / last line
oFile outline
sRepository symbol search
iOpen or focus the right-side UML module graph
gbToggle blame gutter
gcOpen the blamed line's commit diff inside the browser
gpOpen the PR that introduced the blamed line's commit
grMark reviewed lines and open the review discussion for the cursor line (blame gutter must be on)
gdGo to definition
gfOpen file in your editor at the cursor line
MToggle Markdown rich display
Ctrl-oJump back
l / →Focus the graph pane when it is visible
h / ← / q / EscBack to the tree

Outline / Symbol Search Overlay:

KeyAction
j / kMove selection (outline only — in symbol search, letters type into the query)
↑ / ↓, Ctrl-p / Ctrl-nMove selection (symbol search)
BackspaceDelete the last character of the query (symbol search)
Ctrl-uClear the query
EnterJump to the symbol
EscClose

Module Graph Focus:

KeyAction
Tab, h / l, ← / →Switch between outgoing imports and incoming importers
j / k, ↑ / ↓Select a module node
EnterOpen a listed local target/importer; external, unresolved, and unlisted nodes stay visible but do not open
iClose the graph pane and return to code
Esc / qReturn focus to code while leaving the graph pane visible

Git Ops View

The git ops view provides staging, committing, and commit history browsing in a single screen. The left pane is split vertically: file tree (70%) and commit history (30%). The right pane shows the diff preview.

Destructive operations (discard, undo, reset) show a Y/n confirmation prompt with the exact git command that will be executed. The commits pane title shows ↑N when local commits are ahead of the remote.

This view can be opened directly from the CLI with the --git-ops flag.

Tree Focus:

KeyAction
j / ↓Move down
k / ↑Move up
SpaceStage/unstage file or directory
sStage all files
dDiscard changes (Y/n confirmation)
cCommit (opens editor)
uUndo last operation (Y/n confirmation)
RRefresh status
PPush to origin (shows loading spinner)
EnterToggle directory expand/collapse, or focus diff
TabSwitch to commits pane
l / →Focus diff pane
q / EscClose git ops

Commits Focus:

KeyAction
j / ↓Move down in commit list
k / ↑Move up in commit list
gJump to first commit
GJump to last commit
uUndo last operation (Y/n confirmation)
rReset --soft to selected commit (local mode only, Y/n confirmation)
TabSwitch to tree pane
Enter / l / →Focus diff pane (commit diff)
q / EscClose git ops

Diff Focus:

KeyAction
j / ↓Scroll diff
k / ↑Scroll diff
J / KPage down / up
gg / GJump to first/last line
Ctrl-d / Ctrl-uPage down / up
TabSwitch to tree pane
h / ← / EscBack to previous left pane

Commits are loaded with infinite scroll. Diffs are prefetched in the background for faster navigation.

CI Checks View

KeyAction
j / ↓Move down
k / ↑Move up
EnterOpen check in browser
RRefresh check list
OOpen PR in browser
?Toggle help
q / EscBack to previous view

Status icons: ✓ (pass), ✕ (fail), ○ (pending), - (skipped/cancelled). Each check shows its name, workflow, and duration.

Issue List View

KeyAction
j / ↓Move down
k / ↑Move up
Shift+jPage down
Shift+kPage up
ggJump to first
GJump to last
EnterView issue detail
oFilter: Open issues only
cFilter: Closed issues only
aFilter: All issues
OOpen issue in browser
RRefresh issue list
Space /Keyword filter
ZToggle zen mode
?Toggle help
q / EscBack to PR list

Issue Detail View

KeyAction
j / ↓Scroll body
k / ↑Scroll body
TabSwitch focus (Body / Linked PRs)
EnterOpen linked PR
CView issue comments
OOpen issue in browser
MToggle Markdown rich display
?Toggle help
q / EscBack to issue list

Issue Comment List View

KeyAction
j / ↓Move down
k / ↑Move up
EnterView comment detail
OOpen in browser
?Toggle help
q / EscBack to issue detail

Comment List View

KeyAction
j / ↓Move down
k / ↑Move up
EnterJump to file/line
q / EscBack to file list

AI Rally View

KeyAction
j / ↓Move down in log
k / ↑Move up in log
EnterShow log detail
gJump to top
GJump to bottom
bRun in background (return to file list)
yGrant permission / Enter clarification
nDeny permission / Skip clarification
pPause / Resume rally
rRetry (on error)
q / EscAbort and exit rally

Shell Command Input

KeyAction
CharactersType command
EnterExecute
Backspace / DeleteDelete character
← / →Move cursor
Home / EndJump to start / end
Ctrl+uClear input
EscCancel

Shell Command Running

KeyAction
Ctrl+cCancel execution

Shell Command Output

KeyAction
j / ↓Scroll down
k / ↑Scroll up
Ctrl+dPage down
Ctrl+uPage up
gJump to top
GJump to bottom
q / EscClose

Configurable Keybindings

All keybindings can be customized in the [keybindings] section. Three formats are supported:

[keybindings]
# Simple key
move_down = "j"

# Key with modifiers
page_down = { key = "d", ctrl = true }

# Named key (PageDown / PageUp / etc.)
diff_page_down = "PageDown"
diff_page_up = "PageUp"

# Two-key sequence
go_to_definition = ["g", "d"]

Available Keybindings

KeyDefaultDescription
Navigation
move_downjMove down
move_upkMove up
move_lefthMove left / back
move_rightlMove right / select
page_downCtrl+dPage down (focus-aware: file list moves selection, diff scrolls)
page_upCtrl+uPage up (focus-aware)
diff_page_downPageDownScroll diff page down (works from any pane in split view)
diff_page_upPageUpScroll diff page up (works from any pane in split view)
jump_to_firstggJump to first line
jump_to_lastGJump to last line
jump_backCtrl+oJump to previous position
next_commentnJump to next comment
prev_commentNJump to previous comment
Actions
approveaApprove PR
request_changesrRequest changes
commentcAdd comment
suggestionsAdd suggestion
replyrReply to comment
refreshRForce refresh
submitCtrl+sSubmit input
Mode Switching
quitqQuit / back
help?Toggle help
comment_listCOpen comment list
ai_rallyAStart AI Rally
open_panelEnterOpen panel / select
open_in_browserOOpen PR in browser
ci_checksSView CI checks status
git_opsGOpen git ops view
issue_listIOpen issue list
toggle_local_modeLToggle local diff mode
toggle_auto_focusFToggle auto-focus (local mode)
toggle_markdown_richMToggle Markdown rich display
pr_descriptiondView PR description
Diff Operations
go_to_definitiongdGo to definition
go_to_filegfOpen file in $EDITOR
multiline_selectVEnter multiline selection mode
tree_toggletToggle file tree view
Repository Browser
repo_browsebOpen the Repository Browser
symbol_outlineoFile outline (browser only)
symbol_searchsRepository symbol search (browser only)
module_graphiOpen/focus the UML module graph pane (browser file/graph panes only)
toggle_blamegbToggle blame gutter (browser file pane only)
open_blame_commitgcOpen the blamed line's commit diff (browser file pane only)
open_blame_prgpOpen the PR for the blamed line's commit (browser file pane only)
open_line_discussiongrAnchor review threads to lines and open the cursor line's discussion (browser file pane only)
toggle_zen_modeZToggle zen mode (fullscreen diff)
toggle_mouseF2Toggle mouse capture (release the mouse to copy text with the terminal)
Git Ops
git_ops_stageSpaceStage/unstage file or directory
git_ops_stage_allsStage all files
git_ops_discarddDiscard changes
git_ops_commitcCommit (opens editor)
git_ops_undouUndo last operation
git_ops_resetrReset --soft to selected commit
git_ops_pushPPush to origin
List Operations
filterSpace /Keyword filter (PR list / file list)
shell_command!Execute shell command

Keyword Filter

Press Space / in the PR list or file list to activate keyword filtering. Type to filter items by name.

KeyAction
CharactersFilter by keyword
BackspaceDelete character
Ctrl+uClear filter text
↑ / ↓Navigate filtered results
EnterConfirm selection
EscCancel filter

Note: Arrow keys (↑/↓/←/→) always work as alternatives to Vim-style keys and cannot be remapped.

Design Docs

Technical reference documents for the Repository Browser and its code-intelligence engines live in docs/:

DocumentWhat it holds
docs/symbol-index.mdTechnical reference for the tree-sitter tags symbol engine — language matrix, per-grammar quirks, how to add a language, measured cost
docs/module-graph.mdImport extraction, JS/TS and Rust resolution, graph guarantees, path projection, and query behavior
docs/repo-browse-architecture.mdArchitecture of the Repository Browser — state machine, module map, background tasks, extension points, known limitations

docs/README.md indexes the same two documents from inside the directory.

License

MIT

ushironoko/octorus

Review GitHub PRs and local diff in your terminal, with AI-powered automated review & fix cycles

C

225

497 commits

updated Oct 18, 2026

See the code

README

octorus

octorus banner

Crates.io License: MIT

High-performance code review in your terminal for GitHub PRs, issues, local diffs, CI status, and Git operations. Includes an integrated AI-powered review cycle.

Key Features

  • Fast and smooth: Handles 1,000,000+ diff lines and 6,000+ files
  • Multifunctional: Repository browsing, PR review, issue view, local diff view, CI status, and Git operations are integrated into one system with search, filters, comments, suggestions, and more.
  • Code intelligence without an LSP: tree-sitter symbol index powers file outlines, repository-wide symbol search, and Go to Definition — no language server to install, nothing to configure
  • Automatic Review and Code Fix: Automated review and fix workflows for Claude and Codex, while keeping the process under your control
  • Customization: Customize all settings, including keybindings, themes, and agent prompts

Requirements

  • GitHub CLI (gh) - Must be installed and authenticated
  • Rust 1.95+ (for building from source)
  • For AI Rally feature (optional, choose one or both):

Installation

cargo install octorus

Or install via mise:

mise use -g github:ushironoko/octorus

Usage

# 1. Initialize config
or init

# 2. Open the Cockpit dashboard (default when no flags are given)
or

# 3. Open a specific PR directly
or --pr 123

# 4. Preview local changes
or --local

# 5. Browse the repository (read any file, jump by symbol)
or --browse

Options

OptionDescription
-r, --repo <REPO>Repository name (e.g., owner/repo). Auto-detected from current directory if omitted
-p, --pr [<PR>]Open PR list (flag only), or open a specific PR directly if number is provided
-i, --issue [<ISSUE>]Open issue list (flag only), or open a specific issue directly if number is provided
--localShow local git diff against current HEAD (no GitHub PR fetch)
--ai-rallyStart AI Rally mode directly. Runs in headless mode when combined with --pr <number> or --local
--review-only[=BOOL]Force AI Rally proposal-iteration mode. Use with --ai-rally, for example --review-only=true
--git-opsOpen Git Ops view directly on startup
--browseOpen the Repository Browser directly on startup
--auto-focusAuto-focus changed file when local diff updates (local mode only)
--working-dir <DIR>Working directory for AI agents (default: current directory)
--accept-local-overridesAccept local .octorus/ overrides for AI settings in headless mode
--output <FILE>Write JSON result to a file in addition to stdout (headless mode)

Subcommands

SubcommandDescription
or initInitialize global configuration files, prompt templates, and agent SKILL.md
or init --localInitialize project-local .octorus/ config and prompts
or init --forceOverwrite existing configuration files
or cleanRemove AI Rally session data
or local-commentsShow saved local comments for the current worktree
or update-local-commentResolve or reopen local comments by ID

or init creates global config:

  • ~/.config/octorus/config.toml - Main configuration file
  • ~/.config/octorus/prompts/ - Prompt template directory
  • ~/.claude/skills/octorus/SKILL.md - Agent skill documentation (if ~/.claude/ exists)

or init --local creates project-local config:

  • .octorus/config.toml - Project-local configuration (overrides global)
  • .octorus/prompts/ - Project-local prompt templates

Reviewing Code in your Terminal

octorus is an all-in-one review tool for the terminal UI. It shows GitHub PRs, issues, CI status, local diffs, Git Ops, and AI-Rally.

Cockpit

Running or with no flags opens the Cockpit — a dashboard that serves as the main entry point.

  • Live counts: issues mentioning you and PRs requesting your review
  • Navigation menu to PR List, Issue List, Local Diff, Git Ops, and Repo Browse
  • Press Enter to navigate, q to quit, ? for help, r to refresh counts
  • When no GitHub repo is detected, remote features (PR List, Issue List) are disabled; Local Diff, Git Ops, and Repo Browse remain available

Repository Browser

octorus is not only a review tool — or --browse (or b from the file list, or Repo Browse in the Cockpit) opens the whole repository read-only.

  • Browse every file, not just the ones a PR touched — tracked and untracked files included, ignored files excluded, uncommitted files visible immediately
  • Same tree-sitter syntax highlighting as the diff view (24 languages, your configured theme, Vue/Svelte/Markdown injections)
  • Long lines wrap at the pane edge onto gutter-aligned continuation rows, breaking on character boundaries so CJK prose wraps cleanly
  • Markdown rich display (M) — the same rich rendering as the diff view, applied to the open markdown file
  • Background loading — listing the repository, reading a file, and highlighting never block the UI
  • Blame gutter (gb) with jump to the blamed commit's diff (gc) or the PR that introduced it (gp)
  • Review discussion anchoring (gr) — marks the lines a PR review discussed and opens the thread at the cursor line; threads are placed by blame origin, so lines edited or moved since the review may not be matched
  • Read-only — gf opens the file in your editor (editor config → $VISUAL → $EDITOR → vi) at the cursor line
  • Keyword filter for the file tree (Space /)
  • Render limits with explicit notices: over 8 MiB, over 100,000 lines, or a single line over 10,000 bytes; binary and empty files are labelled instead of rendered
  • Works without a GitHub remote — only the PR- and issue-backed screens need one
or --browse

Symbol Intelligence

octorus indexes the repository in the background using tree-sitter tags.scm queries — no language server to install and nothing to configure; the grammars are compiled into the binary. The header shows the index state (symbols: indexing / ready / unavailable), and browsing never waits for it.

FeatureKeyDescription
File outlineoSymbols of the open file, indented by nesting depth, with the cursor's enclosing symbol pre-selected
Symbol searchsFuzzy search across every symbol in the repository, best 200 matches listed; Enter opens the file at the definition
UML module graphiRight-side graph pane showing the current module and its direct imports/importers; Enter opens a listed local module
Go to definitiongdJump to the definition of the first indexed identifier on the cursor line
Jump backCtrl-oReturn to the position before the last jump

Symbol extraction covers Rust, TypeScript, TSX, JavaScript, JSX, Go, Python, Ruby, C, C++, Java, C#, Lua, PHP, Swift, Bash, Zig, Haskell, MoonBit, and Markdown (headings become the outline of a README).

The module graph supports Rust, TypeScript, TSX, JavaScript, and JSX. JavaScript/TypeScript imports resolve relative paths, packages, and a root tsconfig.json or jsconfig.json; Rust resolution is best-effort. Each direction shows up to 200 nodes, every answer is labelled exact or approximate, and the pane follows file navigation.

Pull Requests

PR list

  • Infinite scroll PR list with state filter (open / closed / all)

File list

  • Split view: file list (35%) + diff preview (65%), focused pane highlighted
  • Syntax highlighting powered by tree-sitter
  • Inline comments and code suggestions on specific lines
  • Readline-style editing keys (Ctrl-A/E/B/F/P/N/D/H/K/U/W) inside the comment / reply / suggestion text input
  • Multiline selection mode (Shift+Enter) for range comments and suggestions
  • Show Comment List for Review Comments and Discussions
  • Review submission (Approve / Request Changes / Comment)
  • Mark files and directories as viewed
  • File tree view toggle
  • Go to Definition (gd) with symbol popup and jump stack (up to 100 positions)
  • Go to File (gf) open file at cursor line in external editor (editor config → $VISUAL → $EDITOR → vi)
  • Keyword filter for PR list and file list
  • Show PR Description with Markdown renderer
  • Open PR in browser

Issues

Issue list

  • Infinite scroll issue list with state filter (open / closed / all)

Issue detail

  • Issue detail view with Markdown renderer
  • Linked PR navigation — jump directly to a linked PR
  • Issue comment list and comment detail view
  • Keyword filter
  • Open issue in browser

CI Status

  • CI checks list with workflow name and duration
  • Status icons: ✓ (pass), ✕ (fail), ○ (pending), - (skipped/cancelled)
  • Open check run in browser

Local Diff

Local Diff

  • Preview uncommitted changes (git diff HEAD) without creating a PR
  • Real-time file watching — diff refreshes automatically on save (ignoring .git/ internals)
  • Auto-focus mode (--auto-focus or F key) — automatically selects the most recently changed file
  • Local comments — leave review comments on your own diff, persisted to disk across sessions
  • Header shows [LOCAL] or [LOCAL AF] when auto-focus is active
or --local
or --local --auto-focus

Local Comments

In local mode, you can leave review comments on diff lines just like on a GitHub PR. Comments are saved to ~/.cache/octorus/local-comments/ and persist across sessions, scoped by repo and working directory.

  • Press c on a diff line to add a comment, s for a suggestion, r to reply
  • Press C to view all local comments in the comment list
  • Comments can be resolved and reopened

Local comments can also seed AI Rally — when you start a rally in local mode, any open local comments are passed to the reviewer as a starting point, skipping the initial review step.

CLI subcommands for managing local comments outside the TUI:

# Show open local comments (auto-detects repo)
or local-comments

# Show all comments including resolved
or local-comments --all

# Show as JSON
or local-comments --json

# Resolve a comment
or update-local-comment --resolve 3

# Reopen a comment
or update-local-comment --reopen 3

Git Ops

Git Ops

  • Show staging, committing, and commit history
  • Tree pane (70%) + commit history pane (30%) + diff preview
  • Stage/unstage individual files or directories
  • Discard, undo, soft-reset with Y/n confirmation showing the exact git command
  • Push to origin
  • Infinite scroll commit history
  • Starts without a GitHub remote — or --git-ops reads status and commit history from the local repository alone

Zen mode

Zen mode displays the interface in fullscreen. Toggle it with the Z key.

This is especially effective on small screens.

Shell Command

Press ! to enter shell command mode and execute any shell command.

  • Runs asynchronously in the working directory
  • Not available during text input, filter input, or modal dialogs
  • Output is truncated at 1 MB
  • Timeout: configurable via [shell].timeout_secs (default: 10 seconds)

AI Rally

AI Rally

  • Automated PR review and fix cycle using two AI agents
  • Reviewer: analyzes the PR diff and provides review feedback
  • Reviewee: fixes issues based on the review feedback and commits changes
  • Permission and clarification prompts during the cycle
  • Pause / resume / retry / run in background

Review Only Mode

Use --ai-rally --review-only=true to run AI Rally in proposal-iteration mode. The reviewee never modifies code — instead it produces a written fix proposal which the reviewer re-reviews. Useful when you want a vetted plan rather than direct commits, or when the working tree must stay untouched.

You can also set ai.review_only = true in config, but the CLI flag is the explicit per-run override.

Flow:

  1. Reviewer reviews the PR diff (same as normal mode).
  2. If the reviewer approves → rally ends.
  3. Otherwise the reviewee produces a RevieweeProposal using read-only tools only (no Bash, Edit, Write, NotebookEdit).
  4. The reviewer re-reviews the proposal.
  5. Loop continues until reviewer approves or max_iterations is hit.

The TUI header shows a [Review Only] badge while the mode is active.

Tool boundary: The proposal step runs under a hard read-only boundary (base allowlist Read,Glob,Grep; mutating tools are denied at the agent layer). Extra read-only tools can be added via ai.reviewee_proposal_additional_tools — any entry that would re-introduce a mutating tool is rejected at startup.

Posting proposals: ai.post_reviewee_proposals controls when proposals are posted to the PR — "final" (default) posts only the last proposal, "each" posts every iteration, "none" keeps them in session history only.

[ai]
review_only = true
post_reviewee_proposals = "final"
reviewee_proposal_additional_tools = ["WebSearch"]  # optional, read-only only

Headless Mode (CI/CD)

When --ai-rally is combined with --pr or --local, AI Rally runs in headless mode — no TUI is launched, all output goes to stderr.

# Headless rally on a specific PR
or --repo owner/repo --pr 123 --ai-rally

# Headless review-only rally on a specific PR
or --repo owner/repo --pr 123 --ai-rally --review-only=true

# Headless rally on local diff
or --local --ai-rally

# With custom working directory
or --repo owner/repo --pr 123 --ai-rally --working-dir /path/to/repo

Exit codes:

CodeMeaning
0Reviewer approved
1Not approved (request changes, error, or abort)

Headless policy (no human interaction possible):

SituationBehavior
Clarification neededAuto-skip (agent proceeds with best judgment)
Permission neededAuto-deny (prevents dynamic tool expansion)
Post confirmationAuto-approve (posts review/fix to PR)
Agent text/thinkingSuppressed (prevents JSON leakage to stdout)

Codex uses sandbox mode and cannot control tool permissions at a fine-grained level. For maximum security, we recommend:

RoleRecommendedReason
ReviewerCodex or ClaudeRead-only operations, both are safe
RevieweeClaudeAllows fine-grained tool control via allowedTools

Example configuration for secure setup:

[ai]
reviewer = "codex"   # Safe: read-only sandbox
reviewee = "claude"  # Recommended: fine-grained tool control
reviewee_additional_tools = ["Skill"]  # Add only what you need

Note: If you use Codex as reviewee, it runs in --full-auto mode with workspace write access and no tool restrictions.

Tool Permissions

Default Allowed Tools

Reviewer (read-only operations):

ToolDescription
Read, Glob, GrepFile reading and searching
gh pr view/diff/checksView PR information
gh api --method GETGitHub API (GET only)

Reviewee (code modification):

CategoryCommands
FileRead, Edit, Write, Glob, Grep
Gitstatus, diff, add, commit, log, show, branch, switch, stash
GitHub CLIpr view, pr diff, pr checks, api GET
Cargobuild, test, check, clippy, fmt, run
npm/pnpm/buninstall, test, run

Additional Tools (Claude only)

Additional tools can be enabled via config using Claude Code's --allowedTools format:

ExampleDescription
"Skill"Execute Claude Code skills
"WebFetch"Fetch URL content
"WebSearch"Web search
"Bash(git push:*)"git push to remote
"Bash(gh api --method POST:*)"GitHub API POST requests
[ai]
reviewee_additional_tools = ["Skill", "Bash(git push:*)"]

octorus skills

Recommended setup for coding agents. Run the or init subcommand to create the skill file in ~/.claude/skills/octorus.

You can instruct the agent with "/octorus ai-rally in local".

Configuration

All octorus settings are configurable. Settings can be global or project-local.

Settings Reference

Top-level

KeyTypeDefaultDescription
editorstring(none)Editor command for gf keybinding (e.g., "vim", "code --wait"). Ignored in local config

[diff]

KeyTypeDefaultDescription
themestring"base16-ocean.dark"Syntax highlighting theme. Case-insensitive. See Theme
tab_widthu84Tab display width. Minimum 1 (values below are clamped)
bg_colorbooltrueShow background color on added/deleted lines

[layout]

KeyTypeDefaultDescription
left_panel_widthu1635Left panel width percentage in split view (clamped to 10–90). Right panel fills the rest
zen_modeboolfalseZen mode — hides UI chrome for distraction-free diff reading

[mouse]

KeyTypeDefaultDescription
enabledbooltrueEnable mouse support (click, wheel, drag). While capture is on, the terminal's native text selection is unavailable — press F2 (toggle_mouse) to temporarily release the mouse for copying, or set this to false to opt out entirely
wheel_stepu163Lines moved per wheel notch (clamped to 1–10)

[ai]

KeyTypeDefaultDescription
reviewerstring"claude"Reviewer agent. "claude" or "codex"
revieweestring"claude"Reviewee agent. "claude" or "codex"
max_iterationsu3210Max review-fix iterations. Hard limit: 100
timeout_secsu64600Timeout per agent invocation in seconds. Hard limit: 7200
prompt_dirstring(none)Custom prompt template directory. Absolute paths and .. are rejected in local config
reviewer_additional_toolsstring[][]Additional tools for reviewer (Claude only). Uses --allowedTools format
reviewee_additional_toolsstring[][]Additional tools for reviewee (Claude only). Uses --allowedTools format
reviewee_proposal_additional_toolsstring[][]Additional read-only tools layered on the proposal-mode allowlist (Claude only). Fail-closed: entries matching Bash, Edit, Write, NotebookEdit, or Bash(...) are rejected at startup. See Review Only Mode
auto_postboolfalsePost reviews/fixes to PR without confirmation
review_onlyboolfalseRun AI Rally in proposal-iteration mode — reviewee produces fix proposals (no code modification) instead of applying changes. See Review Only Mode
post_reviewee_proposalsstring"final"When to post reviewee proposals as PR comments in review_only mode. "final": only the final proposal. "each": every proposal. "none": never post (session history only)

[git_ops]

KeyTypeDefaultDescription
max_diff_cacheusize20Max entries for commit diff cache (including prefetch)

[shell]

KeyTypeDefaultDescription
timeout_secsu6410Shell command execution timeout in seconds

[keybindings]

See Configurable Keybindings for the full list. Three formats are supported:

[keybindings]
move_down = "j"                          # Simple key
page_down = { key = "d", ctrl = true }   # Key with modifier
go_to_definition = ["g", "d"]            # Two-key sequence

Global Configuration

Run or init to create default config files, or create ~/.config/octorus/config.toml manually:

Project-Local Configuration

You can create project-local configuration under .octorus/ in your repository root. This allows per-project settings that can be shared with your team via version control.

or init --local

This generates:

.octorus/
├── config.toml        # Project-local config (overrides global)
└── prompts/
    ├── reviewer.md    # Project-specific reviewer prompt
    ├── reviewee.md    # Project-specific reviewee prompt
    └── rereview.md    # Project-specific re-review prompt

Override behavior: Local values are deep-merged on top of global config. Only specify keys you want to override — unspecified keys inherit from global config.

# .octorus/config.toml — only override what you need
[ai]
max_iterations = 5
timeout_secs = 300

Prompt resolution order (highest priority first):

  1. .octorus/prompts/ (project-local)
  2. ai.prompt_dir (custom directory from config)
  3. ~/.config/octorus/prompts/ (global)
  4. Built-in defaults

Warning: When you clone or fork a repository that contains .octorus/, be aware that those settings were chosen by the repository owner — not by you. octorus applies the following safeguards to protect you:

  • editor is always ignored in local config. It cannot be set per-project.
  • AI-related settings (ai.reviewer, ai.reviewee, ai.*_additional_tools, ai.auto_post) and local prompt files will trigger a confirmation dialog before AI Rally starts. In headless mode, you must explicitly pass --accept-local-overrides to allow them.
  • ai.prompt_dir cannot use absolute paths or .. in local config.
  • Symlinks under .octorus/prompts/ are not followed.

Customizing Prompt Templates

AI Rally uses customizable prompt templates. Run or init to generate default templates, then edit them as needed:

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

Templates support variable substitution with {{variable}} syntax:

VariableDescriptionAvailable In
{{repo}}Repository name (e.g., "owner/repo")All
{{pr_number}}Pull request numberAll
{{pr_title}}Pull request titleAll
{{pr_body}}Pull request descriptionreviewer
{{diff}}PR diff contentreviewer
{{iteration}}Current iteration numberAll
{{review_summary}}Summary from reviewerreviewee
{{review_action}}Review action (Approve/RequestChanges/Comment)reviewee
{{review_comments}}List of review commentsreviewee
{{blocking_issues}}List of blocking issuesreviewee
{{external_comments}}Comments from external toolsreviewee
{{changes_summary}}Summary of changes maderereview
{{updated_diff}}Updated diff after fixesrereview

Theme

The [diff] section's theme option controls the syntax highlighting color scheme in the diff view.

Built-in Themes

ThemeDescription
base16-ocean.darkDark theme based on Base16 Ocean (default)
base16-ocean.lightLight theme based on Base16 Ocean
base16-eighties.darkDark theme based on Base16 Eighties
base16-mocha.darkDark theme based on Base16 Mocha
DraculaDracula color scheme
InspiredGitHubLight theme inspired by GitHub
Solarized (dark)Solarized dark
Solarized (light)Solarized light
[diff]
theme = "Dracula"

Theme names are case-insensitive (dracula, Dracula, and DRACULA all work).

If a specified theme is not found, it falls back to base16-ocean.dark.

Custom Themes

You can add custom themes by placing .tmTheme (TextMate theme) files in ~/.config/octorus/themes/:

~/.config/octorus/themes/
├── MyCustomTheme.tmTheme
└── nord.tmTheme

The filename (without .tmTheme extension) becomes the theme name:

[diff]
theme = "MyCustomTheme"

Custom themes with the same name as a built-in theme will override it.

Keybindings

Mouse

Mouse support works on every screen and follows the same paths as the keyboard, so lazy loading, prefetching, and state transitions behave identically.

GestureAction
Click a list row / diff lineSelect it (also focuses the clicked pane in split views)
Click the selected row / line againOpen it (Enter equivalent)
WheelMove the cursor/selection under the pointer by wheel_step lines (works on unfocused panes too)
Drag on diff linesMulti-line selection (V equivalent)
Drag the split borderResize the left panel (session only)
Click outside an informational overlayClose it (Esc equivalent)
Click outside a confirmation dialogIgnored — destructive confirmations are answered with y/n only
F2Toggle mouse capture on/off

Copying text: while mouse capture is on, the terminal's native drag-to-select is unavailable. Press F2 to release the mouse, copy, then press F2 again (many terminals also support Shift+drag as a bypass). Set [mouse] enabled = false to disable mouse support entirely.

PR List View

KeyAction
j / ↓Move down
k / ↑Move up
Shift+jPage down
Shift+kPage up
ggJump to first
GJump to last
EnterSelect PR
oFilter: Open PRs only
cFilter: Closed PRs only
aFilter: All PRs
OOpen PR in browser
SView CI checks status
Space /Keyword filter
RRefresh PR list
LToggle local diff mode
ZToggle zen mode
?Toggle help
qQuit

PRs are loaded with infinite scroll — additional PRs are fetched automatically as you scroll down. The header shows the current state filter (open/closed/all).

File List View

KeyAction
j / ↓Move down
k / ↑Move up
Shift+jPage down
Shift+kPage up
Enter / → / lOpen split view
vMark file as viewed/unviewed
VMark directory as viewed
aApprove PR
rRequest changes
cComment only
CView review comments
RForce refresh (discard cache)
dView PR description
AStart AI Rally
SView CI checks status
GOpen git ops view
bOpen Repository Browser
IOpen issue list
tToggle file tree view
Space /Keyword filter
LToggle local diff mode
FToggle auto-focus (local mode)
ZToggle zen mode
?Toggle help
qQuit

Split View

The split view shows the file list (left) and a diff preview (right). The default ratio is 35%/65%, configurable via layout.left_panel_width. The focused pane is highlighted with a yellow border.

File List Focus:

KeyAction
j / ↓Move file selection (diff follows)
k / ↑Move file selection (diff follows)
PageDownScroll diff page down (regardless of focused pane)
PageUpScroll diff page up (regardless of focused pane)
tToggle file tree view
Enter / → / lFocus diff pane
ZToggle zen mode
← / h / qBack to file list

Diff Focus:

KeyAction
j / ↓Scroll diff
k / ↑Scroll diff
gdGo to definition
gfOpen file in $EDITOR
gg / GJump to first/last line
Ctrl-oJump back
Ctrl-dPage down (focus-aware)
Ctrl-uPage up (focus-aware)
PageDownScroll diff page down (regardless of focused pane)
PageUpScroll diff page up (regardless of focused pane)
nJump to next comment
NJump to previous comment
cAdd comment at line
sAdd suggestion at line
Shift+EnterEnter multiline selection mode
EnterOpen comment panel
Tab / → / lOpen fullscreen diff view
← / hFocus file list
qBack to file list

Diff View

KeyAction
j / ↓Move down
k / ↑Move up
gdGo to definition
gfOpen file in $EDITOR
gg / GJump to first/last line
Ctrl-oJump back
nJump to next comment
NJump to previous comment
Ctrl-dPage down
Ctrl-uPage up
PageDownScroll diff page down
PageUpScroll diff page up
cAdd comment at line
sAdd suggestion at line
Shift+Enter / VEnter multiline selection mode
MToggle Markdown rich display
EnterOpen comment panel
← / h / q / EscBack to previous view

Go to Definition (gd): When multiple symbol candidates are found, a popup appears for selection. Use j/k to navigate, Enter to jump, Esc to cancel. The jump stack (Ctrl-o to go back) stores up to 100 positions.

Note: Lines with existing comments are marked with ●. When you select a commented line, the comment content is displayed in a panel below the diff.

Multiline Selection Mode:

Press Shift+Enter to enter multiline selection mode. Select a range of lines, then create a comment or suggestion spanning the entire range.

KeyAction
j / ↓Extend selection down
k / ↑Extend selection up
Enter / cComment on selection
sSuggest on selection
EscCancel selection

Comment Panel (when focused):

KeyAction
j / kScroll panel
cAdd comment
sAdd suggestion
rReply to comment
Tab / Shift-TabSelect reply target
n / NJump to next/prev comment
Esc / qClose panel

Input Mode (Comment/Suggestion/Reply)

When adding a comment, suggestion, or reply, you enter the built-in text input mode:

KeyAction
Ctrl+SSubmit
EscCancel

Multi-line input is supported. Press Enter to insert a newline.

Repository Browser View

The repository browser shows the file tree (left) and file content (right), with an optional UML module graph pane on the far right; the file outline and symbol search open as overlays. Keys depend on which pane has focus. The focused pane is highlighted with a yellow border.

This view can be opened with b from the file list, Repo Browse in the Cockpit, or directly from the CLI with the --browse flag.

Tree Focus:

KeyAction
j / ↓Move down
k / ↑Move up
Ctrl-d / Ctrl-uPage down / up
gg / GJump to first / last row
Enter / l / →Open file, or expand/collapse directory
Space /Filter paths by keyword
sRepository symbol search
ZToggle zen mode
?Toggle help
q / EscBack to the previous screen

File Focus:

KeyAction
j / ↓Move cursor down
k / ↑Move cursor up
Ctrl-d / Ctrl-u, PageDown / PageUpPage down / up
gg / GJump to first / last line
oFile outline
sRepository symbol search
iOpen or focus the right-side UML module graph
gbToggle blame gutter
gcOpen the blamed line's commit diff inside the browser
gpOpen the PR that introduced the blamed line's commit
grMark reviewed lines and open the review discussion for the cursor line (blame gutter must be on)
gdGo to definition
gfOpen file in your editor at the cursor line
MToggle Markdown rich display
Ctrl-oJump back
l / →Focus the graph pane when it is visible
h / ← / q / EscBack to the tree

Outline / Symbol Search Overlay:

KeyAction
j / kMove selection (outline only — in symbol search, letters type into the query)
↑ / ↓, Ctrl-p / Ctrl-nMove selection (symbol search)
BackspaceDelete the last character of the query (symbol search)
Ctrl-uClear the query
EnterJump to the symbol
EscClose

Module Graph Focus:

KeyAction
Tab, h / l, ← / →Switch between outgoing imports and incoming importers
j / k, ↑ / ↓Select a module node
EnterOpen a listed local target/importer; external, unresolved, and unlisted nodes stay visible but do not open
iClose the graph pane and return to code
Esc / qReturn focus to code while leaving the graph pane visible

Git Ops View

The git ops view provides staging, committing, and commit history browsing in a single screen. The left pane is split vertically: file tree (70%) and commit history (30%). The right pane shows the diff preview.

Destructive operations (discard, undo, reset) show a Y/n confirmation prompt with the exact git command that will be executed. The commits pane title shows ↑N when local commits are ahead of the remote.

This view can be opened directly from the CLI with the --git-ops flag.

Tree Focus:

KeyAction
j / ↓Move down
k / ↑Move up
SpaceStage/unstage file or directory
sStage all files
dDiscard changes (Y/n confirmation)
cCommit (opens editor)
uUndo last operation (Y/n confirmation)
RRefresh status
PPush to origin (shows loading spinner)
EnterToggle directory expand/collapse, or focus diff
TabSwitch to commits pane
l / →Focus diff pane
q / EscClose git ops

Commits Focus:

KeyAction
j / ↓Move down in commit list
k / ↑Move up in commit list
gJump to first commit
GJump to last commit
uUndo last operation (Y/n confirmation)
rReset --soft to selected commit (local mode only, Y/n confirmation)
TabSwitch to tree pane
Enter / l / →Focus diff pane (commit diff)
q / EscClose git ops

Diff Focus:

KeyAction
j / ↓Scroll diff
k / ↑Scroll diff
J / KPage down / up
gg / GJump to first/last line
Ctrl-d / Ctrl-uPage down / up
TabSwitch to tree pane
h / ← / EscBack to previous left pane

Commits are loaded with infinite scroll. Diffs are prefetched in the background for faster navigation.

CI Checks View

KeyAction
j / ↓Move down
k / ↑Move up
EnterOpen check in browser
RRefresh check list
OOpen PR in browser
?Toggle help
q / EscBack to previous view

Status icons: ✓ (pass), ✕ (fail), ○ (pending), - (skipped/cancelled). Each check shows its name, workflow, and duration.

Issue List View

KeyAction
j / ↓Move down
k / ↑Move up
Shift+jPage down
Shift+kPage up
ggJump to first
GJump to last
EnterView issue detail
oFilter: Open issues only
cFilter: Closed issues only
aFilter: All issues
OOpen issue in browser
RRefresh issue list
Space /Keyword filter
ZToggle zen mode
?Toggle help
q / EscBack to PR list

Issue Detail View

KeyAction
j / ↓Scroll body
k / ↑Scroll body
TabSwitch focus (Body / Linked PRs)
EnterOpen linked PR
CView issue comments
OOpen issue in browser
MToggle Markdown rich display
?Toggle help
q / EscBack to issue list

Issue Comment List View

KeyAction
j / ↓Move down
k / ↑Move up
EnterView comment detail
OOpen in browser
?Toggle help
q / EscBack to issue detail

Comment List View

KeyAction
j / ↓Move down
k / ↑Move up
EnterJump to file/line
q / EscBack to file list

AI Rally View

KeyAction
j / ↓Move down in log
k / ↑Move up in log
EnterShow log detail
gJump to top
GJump to bottom
bRun in background (return to file list)
yGrant permission / Enter clarification
nDeny permission / Skip clarification
pPause / Resume rally
rRetry (on error)
q / EscAbort and exit rally

Shell Command Input

KeyAction
CharactersType command
EnterExecute
Backspace / DeleteDelete character
← / →Move cursor
Home / EndJump to start / end
Ctrl+uClear input
EscCancel

Shell Command Running

KeyAction
Ctrl+cCancel execution

Shell Command Output

KeyAction
j / ↓Scroll down
k / ↑Scroll up
Ctrl+dPage down
Ctrl+uPage up
gJump to top
GJump to bottom
q / EscClose

Configurable Keybindings

All keybindings can be customized in the [keybindings] section. Three formats are supported:

[keybindings]
# Simple key
move_down = "j"

# Key with modifiers
page_down = { key = "d", ctrl = true }

# Named key (PageDown / PageUp / etc.)
diff_page_down = "PageDown"
diff_page_up = "PageUp"

# Two-key sequence
go_to_definition = ["g", "d"]

Available Keybindings

KeyDefaultDescription
Navigation
move_downjMove down
move_upkMove up
move_lefthMove left / back
move_rightlMove right / select
page_downCtrl+dPage down (focus-aware: file list moves selection, diff scrolls)
page_upCtrl+uPage up (focus-aware)
diff_page_downPageDownScroll diff page down (works from any pane in split view)
diff_page_upPageUpScroll diff page up (works from any pane in split view)
jump_to_firstggJump to first line
jump_to_lastGJump to last line
jump_backCtrl+oJump to previous position
next_commentnJump to next comment
prev_commentNJump to previous comment
Actions
approveaApprove PR
request_changesrRequest changes
commentcAdd comment
suggestionsAdd suggestion
replyrReply to comment
refreshRForce refresh
submitCtrl+sSubmit input
Mode Switching
quitqQuit / back
help?Toggle help
comment_listCOpen comment list
ai_rallyAStart AI Rally
open_panelEnterOpen panel / select
open_in_browserOOpen PR in browser
ci_checksSView CI checks status
git_opsGOpen git ops view
issue_listIOpen issue list
toggle_local_modeLToggle local diff mode
toggle_auto_focusFToggle auto-focus (local mode)
toggle_markdown_richMToggle Markdown rich display
pr_descriptiondView PR description
Diff Operations
go_to_definitiongdGo to definition
go_to_filegfOpen file in $EDITOR
multiline_selectVEnter multiline selection mode
tree_toggletToggle file tree view
Repository Browser
repo_browsebOpen the Repository Browser
symbol_outlineoFile outline (browser only)
symbol_searchsRepository symbol search (browser only)
module_graphiOpen/focus the UML module graph pane (browser file/graph panes only)
toggle_blamegbToggle blame gutter (browser file pane only)
open_blame_commitgcOpen the blamed line's commit diff (browser file pane only)
open_blame_prgpOpen the PR for the blamed line's commit (browser file pane only)
open_line_discussiongrAnchor review threads to lines and open the cursor line's discussion (browser file pane only)
toggle_zen_modeZToggle zen mode (fullscreen diff)
toggle_mouseF2Toggle mouse capture (release the mouse to copy text with the terminal)
Git Ops
git_ops_stageSpaceStage/unstage file or directory
git_ops_stage_allsStage all files
git_ops_discarddDiscard changes
git_ops_commitcCommit (opens editor)
git_ops_undouUndo last operation
git_ops_resetrReset --soft to selected commit
git_ops_pushPPush to origin
List Operations
filterSpace /Keyword filter (PR list / file list)
shell_command!Execute shell command

Keyword Filter

Press Space / in the PR list or file list to activate keyword filtering. Type to filter items by name.

KeyAction
CharactersFilter by keyword
BackspaceDelete character
Ctrl+uClear filter text
↑ / ↓Navigate filtered results
EnterConfirm selection
EscCancel filter

Note: Arrow keys (↑/↓/←/→) always work as alternatives to Vim-style keys and cannot be remapped.

Design Docs

Technical reference documents for the Repository Browser and its code-intelligence engines live in docs/:

DocumentWhat it holds
docs/symbol-index.mdTechnical reference for the tree-sitter tags symbol engine — language matrix, per-grammar quirks, how to add a language, measured cost
docs/module-graph.mdImport extraction, JS/TS and Rust resolution, graph guarantees, path projection, and query behavior
docs/repo-browse-architecture.mdArchitecture of the Repository Browser — state machine, module map, background tasks, extension points, known limitations

docs/README.md indexes the same two documents from inside the directory.

License

MIT

Project health

crates.io

Latest release

0.7.2 · Aug 7, 2026

Releases this year

50

Significant stargazers

kazuya kawaguchi

4,359 followers · starred Feb 2026

eitsupi

207 followers · starred Mar 2026

Divy

766 followers · starred Feb 2026

Hirokazu Hata

162 followers · starred Jan 2026