rush

R Scripting at the Command Line

R-CMD-check

rush brings R to the command line. Run an R expression, wrangle a CSV, query a Parquet file with SQL, or draw a plot right in your terminal, all without opening an R session or writing a script.

rush run 'dplyr::filter(df, body_mass_g > 5000) |> head()' penguins.csv
#> species,island,bill_length_mm,bill_depth_mm,flipper_length_mm,body_mass_g,sex,year
#> Gentoo,Biscoe,50,16.3,230,5700,male,2007
#> Gentoo,Biscoe,50,15.2,218,5700,male,2007
#> Gentoo,Biscoe,47.6,14.5,215,5400,male,2007
#> Gentoo,Biscoe,46.7,15.3,219,5200,male,2007
#> Gentoo,Biscoe,46.8,15.4,215,5150,male,2007
#> Gentoo,Biscoe,49,16.1,216,5550,male,2007

R has a wonderful ecosystem for working with data, but reaching for it usually means launching R, loading packages, and reading files by hand. rush collapses that into a single command you can pipe, redirect, and drop into any shell pipeline. R becomes just another Unix tool, at home next to grep, awk, and jq.

Highlights

  • Quick one-liners. Evaluate any R expression straight from the shell.
  • Scaffold scripts. Use --dry-run to generate self-contained R scripts you can save, edit, and share.
  • Pipeline-native. Reads from standard input and writes to standard output, so it composes with every other command-line tool.
  • Reads what you have. CSV, Parquet, JSON/JSONL, Excel, Arrow IPC, DuckDB, SPSS/Stata/SAS, SQLite, YAML, TOML, XML, and more, chosen automatically by file extension.
  • Converts between formats. The convert command converts files directly between any supported format.
  • Query with SQL. The sql command runs DuckDB queries directly against your files, no import step required.
  • Plots in your terminal. The plot command renders ggplot2 graphics as ANSI/ASCII art, or saves them to PNG, PDF, and more.
  • Zero dependency management. Packages are resolved on demand by ir.

How it works

Under the hood, each invocation assembles a small, self-contained R script and runs it with ir, the R interpreter launcher from r-lib. The script declares its own package dependencies in #| frontmatter, and ir installs whatever it needs on the fly. That means rush itself stays lightweight, and you never have to manage a library of packages just to run a one-liner.

TipReady to try it?

Head over to Get started for installation instructions and a quick tour.