Nix flake for CodeRabbit CLI - AI-powered code review tool.
- Declarative installation via Nix flakes
- Automatic hourly version updates via GitHub Actions
- Support for x86_64-linux (other platforms need hash updates)
# Run CodeRabbit CLI
nix run github:YOUR_USERNAME/coderabbit-nix
# Or use the short alias
nix run github:YOUR_USERNAME/coderabbit-nix#cr{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
coderabbit.url = "github:YOUR_USERNAME/coderabbit-nix";
};
outputs = { self, nixpkgs, coderabbit, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, ... }: {
environment.systemPackages = [
coderabbit.packages.${pkgs.system}.coderabbit
];
})
];
};
};
}{
inputs.coderabbit.url = "github:YOUR_USERNAME/coderabbit-nix";
outputs = { self, nixpkgs, coderabbit, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, ... }: {
nixpkgs.overlays = [ coderabbit.overlays.default ];
environment.systemPackages = [ pkgs.coderabbit ];
})
];
};
};
}After installation, authenticate with CodeRabbit:
coderabbit auth login
# or
cr auth logincoderabbit --help # Show help
coderabbit auth login # Authenticate
coderabbit review # Start a code review./scripts/update-version.shnix build .#coderabbit
./result/bin/coderabbit --helpThis repository uses GitHub Actions to automatically check for new CodeRabbit versions every hour. When a new version is detected:
- A pull request is created with the updated version and hash
- The PR is automatically merged if the build succeeds
The Nix packaging code in this repository is MIT licensed. CodeRabbit CLI itself is proprietary software - see CodeRabbit's terms.