jrep

jrep is grep for Jupyter notebooks. It is a command line program that can search across multiple notebooks for specific text, but limit itself to certain types of cells, source text, output data, or any combination. This is built to avoid grep matching strings of characters in output data (like images).

Installing

64-bit Windows, Mac, and Linux executables are included with the latest release. The simplest way to install jrep is to download the executable for your computer, unzip it, make the jrep file executable, and place it somewhere on your PATH. If you encounter any problems running these, please open an issue here.

You may also download the source code and compile it locally. This requires Rust be installed, with that, running make release in the repo will compile the program. The compiled program will be target/release/jrep in the repo folder.

Quick start

Once the program is in a directory on your PATH you can call it very similarly to grep. The minimum is to give it a pattern to search for and one or more files to search. The pattern is treated as a regular expression. This is implemented with the Rust regex crate, so the syntax it uses is described here.

jrep CO2 example.ipynb

jrep -i co2 *.ipynb