Transcription
A while back, we explored one of the best ways to bring AI code reviews directly to your coding assistant, which is helping developers cut code review time and bugs in half instantly. It's with a tool called Code Rabbit.
And now the Code Rabbit team has taken it a step further with Code Rabbit CLI, which brings AI code reviews straight to your terminal. This means anyone can perform self-reviews before commits as well as pull requests, effectively giving you a free senior engineer reviewing your code in real time. It integrates seamlessly with any AI coding CLI including cloud code, first CLI, codeex, and Gemini CLI and so many others. You can stay in your flow without leaving the command line.
And with Code Rabbit CLI, it allows you to catch AI slop before it ships, which serves as a backstop for hallucination and logical errors from AI coding agents. You can review both staged and unstaged code, ensuring feedback comes before commits or PRs. And the CLI supports all major programming languages like JavaScript, Python, Java, Go, Rust, and more. With its multi-layered review process, you can get contextual project-aware analysis and even one-click fixes. So, suggestions can be applied instantly without manual changes.
But what sets Code Rabbit CLI apart is its terminal-native experience with code reviews and commits without context switching and its unique AI agent orchestration which hands off reviews as well as context to your AI agent for automated fixes. This is why we're going to be covering it throughout today's video. And this is something that you can definitely get started with completely for free.
In summary, with Code Rabbit CLI, it provides line-by-line reviews with senior developer-level insights, gives you immediate feedback on staged and unstaged changes, and lets you apply suggestions with a single command while also handing off different review context to your AI agent for automated fixes.
To get started, it's as simple as just running this command within your terminal. Now, this is currently available for Mac OS as well as for Linux. So, if you're on Windows, you can use WSL. So, what I can do is just simply open up my command prompt. And then I can simply go ahead and paste in this command to install Code Rabbit onto my computer. And you can see that it has finished installing it. And now there's a couple of steps that I'll need to do. So, I'm going to need to first reload my terminal. And to do so, you can use the source command over here to reload it. And then what we can do is simply go ahead and log in with code rabbit login. You can use the code rabbit o login command. And you can just simply open up your command prompt and paste in this command and click enter. This will prompt you to log in or create an account with Code Rabbit, which you can do completely for free. And now, once you have authenticated your account, you can then start using Code Rabbit.
Now, next is where you can implement whatever coding agent you want to work with alongside with Code Rabbit CLI. In this case, I'm going to be using Cloud Code, but you can use any like Codeex or CLI, like I mentioned, or even Gemini CLI. And essentially, once you have opened up the coding agent, you can basically have Code Rabbit integrated by having it requested to execute a task like `code rabbit review`. This is where I'm telling it to build a responsive React component for a login form with email and password inputs, including client-side validation. But alongside with that prompt, I'm telling it to run the Code Rabbit review to get a comprehensive analysis and suggestion for cleaner, more maintainable code, and then apply the feedback to improve accessibility, structure, and best practices. There's multiple different sorts of commands that we'll take a look at as we go, but this is a rough example which will showcase how you can include Code Rabbit alongside your coding agent to execute any task. So you can see that it started to work on building the authentication login form with Cloud Code, and now it is working on the Code Rabbit review. So in this case, we can proceed with this bash command and then have it work on code review for the comprehensive analysis, which will work on validating any content a part of the code that was generated by Cloud Code.
Before we get started, I just want to mention that you should definitely go ahead and subscribe to the World of AI newsletter. I'm constantly posting different newsletters on a weekly basis. So this is where you can easily get up-to-date knowledge about what is happening in the AI space. So definitely go ahead and subscribe, as this is completely for free.
So you can see right here that it has already started making the changes for us while reviewing all the different lines of code that Claude Code had generated for this login page. And you can see it gives you a comprehensive analysis of what changes it has made. And it is something that has made a good analysis of the code that was written. And there we go. Looks like we have finished generating our overall login page, and we can actually sign in and see a functional page that pops up which says "Login is successful," and all of this was thoroughly checked and analyzed to see if it actually functions, thanks to the help of Code Rabbit CLI.
But there's a couple of ways you can use Code Rabbit. You can simply just use it with the `code rabbit` plain text command, which you can get an output of detailed feedback in plain text format, or you can use `code rabbit review`, which is an AI-driven code review with an interactive or text output. So in this case, you can see that it is now running `code rabbit review` to detect any issues. Just take a look at this demo video which showcases Code Rabbit CLI in action. This is where it is showcasing Cloud Code given a prompt to create an app while Code Rabbit runs in the background to thoroughly analyze your codebase. It detects issues, it is requesting changes, and even autonomously applying fixes for simpler problems. In this case, you can see how context-aware it is, where it leverages your Git integration and it synthesizes insights from over 40+ sources. It includes static analysis. It also has security scanners and a unique code graph relationship feature. And overall, this is ensuring the most thorough review. There's also a pre-commit review which analyzes your changes before they leave your machine, and it enables a multi-layer check system without slowing your workflow. And at the end, there's a one-click fix which applies simple fixes instantly or hands off complex issues to AI agents with full context for smarter resolution. Overall, you can see that it is making the necessary changes and it prioritizes all the different changes that is needed to be fixed for the application to be running.
If you like this video and would love to support the channel, you can consider donating to my channel through the Super Thanks option below. Or you can consider joining our private Discord, where you can access multiple subscriptions to different AI tools for free on a monthly basis, plus daily AI news and exclusive content, plus a lot more.
In essence, Code Rabbit CLI is a powerful tool that brings AI-assisted code review directly to your terminal. And it's going to definitely streamline development with a coding agent like Cloud Code, Gemini CLI, Cursor CLI, and so many others. And you can essentially catch issues super fast. Now, this is something that you can easily get started with with the links in the description below, and you can easily get started completely for free. So, definitely get started with that.
But that's basically it, guys, for today's video. Thank you, guys, so much for watching. Make sure you subscribe to the second channel, join the newsletter, join our Patreon, follow me on Twitter, and lastly, make sure you guys subscribe, turn on the notification bell, like this video, and please take a look at our previous videos, 'cause there's a lot of content that you'll truly benefit from. But with that thought, guys, have an amazing day. Spread positivity, and I'll see you guys fairly shortly.