Preview Jupyter Notebooks In Finder
Press Space on an .ipynb file and read it as cells, with its saved outputs, without starting Jupyter
Quick Look can’t draw a .ipynb. spacebar takes Space for notebooks and lays them out as Jupyter does: each cell with its prompt and saved output, the folder in the sidebar.
What A Notebook Shows
- Markdown cellsRendered with math; Mermaid as source.
- Code cellsHighlighted, with the
[n]:prompt. - Saved outputsText, Markdown, PNG, JPEG, GIF and SVG, tracebacks without color codes.
- Rich HTML outputNot drawn: its saved plain text, else a note.
Nothing runs: there’s no kernel.
Raw, Find And Copy
| Raw | The notebook’s JSON, for as long as the preview stays open |
|---|---|
| ⌘F | Find; Copy takes the text |
| Open | Hands it to your editor |
Limits
- A notebook over 16 MB shows its first 16 MB as text, not as cells.
- The first 2,000 cells, 100 outputs each. An image over about 6 MB (8 MB saved) shows its text form, if any.
- If another app claims
.ipynb, pick the notebook from the folder’s sidebar.
Questions
Do I need Jupyter or Python installed?
No. spacebar reads the notebook file and draws the outputs saved in it. Nothing is run.
Does it work in Quick Look, or only in spacebar’s window?
Both. Space on a notebook opens spacebar’s Quick Look extension, no Space helper needed, and the sidebar shows it the same way.
Why is my notebook shown as text?
It is over 16 MB, or its JSON isn’t a notebook spacebar can read. Raw always shows the file as it is.
More: JSON, CSV, code, file types.
Install It
Or paste this in Terminal
curl -fsSL https://spacebar.patebryant.com/install.sh | sh
The script downloads the latest notarized release from GitHub, checks its SHA-256 and installs to ~/Applications, no sudo. Read the script.