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 'penguins |> dplyr::filter(body_mass_g > 5000) |> head()'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.
- Quick one-liners. Evaluate any R expression straight from the shell.
- Scaffold scripts. Use
--dry-runto generate self-contained R scripts you can save, edit, and share. - Pipeline-native. Reads from standard input and writes to standard output.
- Reads what you have. CSV, Parquet, JSON, Excel, Arrow, DuckDB, SPSS/Stata/SAS, SQLite, YAML, TOML, XML, and more.
- Converts between formats. The
convertcommand handles it in one step. - Query with SQL. Run DuckDB queries directly against your files.
- Plots in your terminal. Render ggplot2 graphics as ASCII art, or save to PNG/PDF.
- Zero dependency management. Packages are resolved on demand by
ir.
First install ir. Then install
rush as an ir tool:
ir tool install github::jeroenjanssens/rushEvaluate an expression:
$ rush run '6 * 7'
#> 42Read a file into df and filter it:
$ rush run 'df |> dplyr::filter(body_mass_g > 5000)' penguins.csv
#> species,island,bill_length_mm,...
#> Gentoo,Biscoe,49.2,...Pipe into SQL:
$ rush run 'head(df, 100)' penguins.csv | \
rush sql "SELECT species, COUNT(*) AS n FROM stdin GROUP BY species" -
#> species,n
#> Adelie,44
#> Gentoo,34
#> Chinstrap,22Convert between formats:
$ rush convert -o penguins.parquet penguins.csvrush is, to our knowledge, the only CLI tool that combines R expression
evaluation, automatic package resolution, multi-format I/O, SQL queries, and
plotting in a single command. It also doubles as a script scaffolder: every
invocation can emit a self-contained R script via --dry-run, giving you a
starting point you can save, tweak, and version-control. That said, several
excellent tools cover parts of this space, often faster or with fewer
dependencies:
- DuckDB CLI: An embedded SQL engine that queries CSV, Parquet, and JSON files directly. Faster for pure SQL workloads; no R expressions or plotting.
- Miller (mlr): A streaming processor for CSV, TSV, and JSON with its own verb language. Handles files larger than RAM; no Parquet, SQL, or plotting.
- qsv: A fast Rust-based CSV toolkit with 90+ subcommands, Polars SQL, and Luau scripting. CSV-focused; no R ecosystem access.
- csvkit: A Python suite for converting, slicing, and querying CSV files. Mature and widely used; slower and CSV-only for output.
- jq: The standard CLI JSON processor. Powerful for reshaping JSON in pipelines; JSON-only.
- yq: Like jq but for YAML, TOML, XML, and JSON. Aimed at config-file editing rather than data analysis.
- Nushell: A shell where every command outputs structured tables. Requires adopting a new shell; limited analytical depth.
- VisiData: An interactive terminal spreadsheet for exploring tabular data. Designed for interactive use, not scripted pipelines.
- littler: A lightweight front-end for running R one-liners from the shell. No format I/O helpers, no dependency resolution, no SQL or plotting, but a useful building block for R scripting.
Full documentation is available at https://rush.jeroenjanssens.com.
Please note that the rush project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.