Skip to contents

Human-scale LLM code review, as if a member of the tidyverse team were there with you to workshop your code for reproducibility, readability, and resilience:

A code editor containing R code with a panel on the right showing a comment from 'Tidy reviewer'. On the left, the workspace setup section loads various libraries including tidyverse, extraDistr, MASS, cmdstanr, and bayesplot. Three lines (tidyr, purrr, and ggplot2) are highlighted in red, indicating they've been flagged. The 'Tidy Reviewer' panel displays feedback explaining that these three packages are redundant because tidyverse already includes them, suggesting their removal to simplify dependencies.

This project is highly experimental; expect many rough edges.

Installation

Install reviewer from GitHub with:

pak::pak("simonpcouch/reviewer")

Usage

To review an R script:

library(reviewer)
review("path/to/your/script.R")

This opens a Shiny app where you can accept or reject the suggested improvements to your code.

If you haven’t yet configured a client to use with reviewer, review() will present you with an interactive menu of possible models to use based on the environment variables you have available. You can use any model provider supported by ellmer.

I’ve had good experiences with using GPT-5.2 as a client. To change models, set the review(client) argument or the reviewer.client option to an ellmer chat.