CodeRabbit CLI on WSL
The CodeRabbit CLI runs on Windows Subsystem for Linux (WSL), allowing you to access AI code reviews in your development environment. WSL provides a full Linux environment on Windows, making it ideal for running command-line tools like CodeRabbit.Video of install steps
This guide covers installing and using CodeRabbit CLI on WSL. For integration
with AI coding assistants, see Claude Code
integration, Cursor
integration, or Codex
integration.
Why use CodeRabbit CLI on WSL
Native Linux environment
Run CodeRabbit in a genuine Linux environment on Windows without dual-booting or virtual machines.
Windows development workflow
Access your Windows files and integrate with Windows-based IDEs while using
Linux command-line tools.
Expert issue detection
CodeRabbit spots race conditions, memory leaks, and logic errors that generic
linters miss. Same pattern recognition that powers our PR reviews.
Git integration
Work with git repositories in WSL, maintaining full compatibility with Windows-based git clients and IDEs.
Prerequisites
1
Install WSL
If you haven’t already installed WSL, open PowerShell or Windows Command Prompt as Administrator and run:This installs Ubuntu by default. Restart your computer when prompted.For other distributions or manual installation, see Microsoft’s WSL installation guide.
2
Launch WSL
Open your WSL distribution (e.g., Ubuntu) from the Start menu or by running
wsl
in PowerShell/Command Prompt.Set up your Linux username and password when prompted (first launch only).3
Verify prerequisites
Ensure you have curl and unzip available (typically pre-installed in WSL):If curl or unzip are not installed:
Installation
1
Install CodeRabbit CLI
In your WSL terminal, install the CodeRabbit CLI globally:The installer automatically detects your shell and adds CodeRabbit to your PATH.
2
Restart your shell
Reload your shell configuration:
3
Verify installation
Confirm CodeRabbit is installed and accessible:You should see the current version number.
Authentication
1
Start authentication
Begin the authentication process:CodeRabbit displays a URL and waits for authentication.
2
Open the authentication URL
The URL is clickable in most WSL terminals. If not, copy and paste it into your Windows web browser.
Windows Terminal and modern WSL terminals support clickable links. If your terminal doesn’t, manually copy the URL.
3
Complete authentication
Log in to CodeRabbit in your browser and copy the authentication token.Paste the token back into your WSL terminal.
4
Verify authentication
Check your authentication status:Success shows your login status and confirms authentication is working.
Usage workflow
Running code reviews
1
Navigate to your repository
In WSL, navigate to your git repository. This can be:
- A repository in your Linux home directory (
~/projects/my-repo
) - A repository in your Windows filesystem (accessed via
/mnt/c/Users/YourName/projects/my-repo
)
WSL can access Windows files via
/mnt/c/
, /mnt/d/
, etc. Performance is better with files in the Linux filesystem (~
), but both work.2
Run CodeRabbit review
Analyze your code changes:CodeRabbit analyzes tracked git changes and provides detailed feedback.
3
Review the output
CodeRabbit displays:
- Issues found with severity levels
- File locations and line numbers
- Suggested fixes and improvements
- Code quality insights
Review options
Control what CodeRabbit analyzes:Working with Windows tools
Using Windows-based IDEs
You can edit files in Windows IDEs (VS Code, Visual Studio, etc.) while running CodeRabbit reviews in WSL:- Open your project in Windows: Use your preferred Windows IDE
- Run reviews in WSL: Keep a WSL terminal open for running CodeRabbit
- Seamless file sync: Changes in Windows immediately reflect in WSL
VS Code has excellent WSL integration via the “Remote - WSL” extension,
allowing you to run the terminal in WSL while editing in the Windows UI.
Install the extension from the VS Code marketplace to keep everything in sync
between your Windows UI and WSL environment.
Git configuration
If you use git in both Windows and WSL, you may need to configure line endings:Troubleshooting
CodeRabbit command not found
Ifcoderabbit
isn’t recognized after installation:
-
Verify installation: Check if the binary exists:
-
Reload shell configuration:
-
Manually add to PATH (if needed):
Authentication URL not clickable
If the authentication URL isn’t clickable in your terminal:- Copy manually: Select and copy the URL, then paste into your Windows browser
- Upgrade terminal: Consider using Windows Terminal for better WSL integration
- Alternative authentication: The authentication process is browser-based, so any modern browser works
Slow performance on Windows files
If CodeRabbit runs slowly when working with files in/mnt/c/
:
- Move repository to Linux filesystem: Copy your project to
~/projects/
for better performance - Use WSL 2: Ensure you’re running WSL 2 (check with
wsl -l -v
in PowerShell) - Consider git clone in WSL: Clone repositories directly in WSL’s filesystem
File operations in
/mnt/c/
(Windows filesystem) are slower than in the Linux
filesystem (~
). For best performance, work with repositories in your WSL
home directory.CodeRabbit not finding issues
If CodeRabbit isn’t detecting expected issues:- Check authentication status: Run
coderabbit auth status
(authentication improves review quality but isn’t required) - Verify git status: CodeRabbit analyzes tracked changes - check
git status
- Consider review type: Use the
--type
flag to specify what to review:coderabbit --type uncommitted
- only uncommitted changescoderabbit --type committed
- only committed changescoderabbit --type all
- both committed and uncommitted (default)
- Specify base branch: If your main branch isn’t
main
, use--base
:coderabbit --base develop
coderabbit --base master
- Review file types: CodeRabbit focuses on code files, not docs or configuration
Advanced: WSL integration tips
Access WSL from Windows Explorer
You can access your WSL files from Windows Explorer:- Type
\\wsl$\
in the Explorer address bar - Navigate to your distribution (e.g.,
\\wsl$\Ubuntu\home\username\
)
Run CodeRabbit from Windows PowerShell
You can invoke WSL commands from Windows PowerShell:Set up VSCode Remote - WSL
For the best development experience:- Install the “Remote - WSL” extension in VS Code
- Open a WSL terminal and navigate to your project
- Run
code .
to open VS Code in WSL mode - Use the integrated terminal to run CodeRabbit commands