Skip to content

Document CodeRabbit CLI review defaults#4

Open
juanpflores wants to merge 1 commit intomainfrom
coderabbit-cli-defaults
Open

Document CodeRabbit CLI review defaults#4
juanpflores wants to merge 1 commit intomainfrom
coderabbit-cli-defaults

Conversation

@juanpflores
Copy link
Copy Markdown
Collaborator

@juanpflores juanpflores commented May 8, 2026

This pull request updates the documentation for the coderabbit review command to clarify its usage, especially when using the --agent flag. The changes make it easier to understand the default behaviors and options for running reviews with different scopes.

Documentation improvements for review commands:

  • Clarified that coderabbit review produces plain text output by default, while --agent switches output to structured findings for agent workflows.
  • Explained that the --type (-t) flag defaults to all, covering committed, staged, unstaged, and untracked changes.
  • Added a list of common review command variations and clarified their usage, including specifying directories and base commits.

Summary by CodeRabbit

  • Documentation
    • Enhanced CodeRabbit review documentation with clearer explanations of default agent review commands
    • Added comprehensive examples demonstrating various review scope options
    • Expanded guidance on CLI options including base commit references and directory specifications
    • Improved documentation to better reflect current agent-mode usage patterns

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The CodeRabbit review skill documentation is updated to clarify the default agent review command syntax and expand documented CLI options. The "Review Commands" section now provides a "Default agent review" example using coderabbit review --agent -t all, documents output behavior defaults, and includes additional scope examples for --base-commit and --dir parameters.

Changes

CLI Documentation Update

Layer / File(s) Summary
CLI Examples and Defaults
plugins/coderabbit/skills/coderabbit-review/SKILL.md
The Review Commands section introduces a new "Default agent review" example with coderabbit review --agent -t all, documents CLI defaults for output format and type scoping, and expands scope examples to include --base-commit <sha> and --dir /path/to/repo. Replaces the prior shorter Default review guidance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A clearer path through agent reviews we trace,
With --agent -t all now showing its face,
Examples expand for scope and for time,
--base-commit and --dir in their prime—
Your CLI commands now shine so bright!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Document CodeRabbit CLI review defaults' accurately and concisely summarizes the main change: updating documentation to clarify CodeRabbit review command defaults and behaviors.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch coderabbit-cli-defaults
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch coderabbit-cli-defaults

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/coderabbit/skills/coderabbit-review/SKILL.md`:
- Around line 45-56: The example "coderabbit review --agent -t all" redundantly
specifies -t all while the docs already state that `--type` defaults to `all`;
either remove `-t all` from the example so it reads "coderabbit review --agent"
or (if you want explicit clarity) keep the example but add a short parenthetical
like "(-t all shown for clarity; all is the default)" and ensure the explanatory
line that says "`--type` defaults to `all`" remains accurate; update the
surrounding text referencing `--type`/`-t` so there is no contradiction.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: a2cc0f47-b9e5-4007-9669-47f3e01dd512

📥 Commits

Reviewing files that changed from the base of the PR and between 0f66928 and 5088b7e.

📒 Files selected for processing (1)
  • plugins/coderabbit/skills/coderabbit-review/SKILL.md
📜 Review details
🔇 Additional comments (1)
plugins/coderabbit/skills/coderabbit-review/SKILL.md (1)

57-93: LGTM!

The "Common scopes and comparisons" examples are clear and well-structured, demonstrating useful command variations. The Output Handling, Result Format, and Guardrails sections provide comprehensive operational guidance with appropriate detail.

Comment on lines +45 to +56
Default agent review:

```bash
coderabbit review --agent
coderabbit review --agent -t all
```

Common narrower scopes:
CLI defaults to know:

- `coderabbit review` uses plain text output by default.
- `--agent` changes output to structured findings for agent workflows.
- `--type` defaults to `all`, which includes committed, staged, unstaged, and untracked changes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check CodeRabbit CLI help output to verify --type default value

# Check if coderabbit CLI is available and get help for review command
if command -v coderabbit &> /dev/null; then
    echo "=== Checking coderabbit review --help ==="
    coderabbit review --help 2>&1 | rg -A 5 -i "type|--type|-t"
else
    echo "CodeRabbit CLI not found in this environment"
fi

Repository: coderabbitai/codex-plugin

Length of output: 114


🏁 Script executed:

#!/bin/bash
# Read the SKILL.md file to see the exact content at lines 45-56
echo "=== Reading SKILL.md (lines 45-65) ==="
sed -n '45,65p' plugins/coderabbit/skills/coderabbit-review/SKILL.md

Repository: coderabbitai/codex-plugin

Length of output: 711


🏁 Script executed:

#!/bin/bash
# Search for CLI code related to the review command and --type defaults
echo "=== Searching for review command implementation ==="
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.md" \) | head -20
echo ""
echo "=== Searching for --type flag definition ==="
rg -i "type.*default|--type" --type ts --type js -A 3 -B 1 | head -50

Repository: coderabbitai/codex-plugin

Length of output: 9784


🏁 Script executed:

#!/bin/bash
# Look for any configuration files or additional documentation about CLI defaults
echo "=== Searching for CLI or review-related documentation ==="
fd -e md | grep -i "review\|cli\|command" | head -20

Repository: coderabbitai/codex-plugin

Length of output: 1233


Clarify redundancy between default command and documented defaults.

The "Default agent review" command on line 48 explicitly includes -t all, but line 55 documents that --type defaults to all. This creates potential confusion for users about whether the flag needs to be specified.

Consider one of these approaches:

  1. Remove -t all from line 48 since it's redundant with the default
  2. Add clarifying text such as: "The -t all flag is shown explicitly for clarity, though all is already the default"
📝 Proposed fix to remove redundant flag
-coderabbit review --agent -t all
+coderabbit review --agent

Then also update line 60:

-coderabbit review --agent -t all
+coderabbit review --agent
 coderabbit review --agent -t committed
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/coderabbit/skills/coderabbit-review/SKILL.md` around lines 45 - 56,
The example "coderabbit review --agent -t all" redundantly specifies -t all
while the docs already state that `--type` defaults to `all`; either remove `-t
all` from the example so it reads "coderabbit review --agent" or (if you want
explicit clarity) keep the example but add a short parenthetical like "(-t all
shown for clarity; all is the default)" and ensure the explanatory line that
says "`--type` defaults to `all`" remains accurate; update the surrounding text
referencing `--type`/`-t` so there is no contradiction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant