Euporie is a text-based user interface for running and editing Jupyter notebooks
Project description
Euporie
About
Euporie is a text-based user interface for running and editing Jupyter notebooks.
Install
Euporie is on pypi, so can be installed using pip:
pip install euporie
If you are using Windows, you may wish to install some optional python dependencies to render images and HTML tables:
pip install euporie[tables,images]
Screenshots
Features
- Execute notebooks in the terminal
- Autocompletion in code cells
- Rich output support, including:
- Markdown
- Tables
- Images
- Open multiple notebooks side-by-side
- Good performance with large notebook files
Image Support
Euporie will attempt to render images in the best possible way it can. The following methods are supported:
-
Sixel
If supported by your teminal, euporie can show graphical images in cell outputs This requires one of the following:
-
Kitty's terminal image protocal
If your terminal supports kitty's terminal graphics protocol, euporie will use it to render images
-
Ansi art
This requires one of the following:
The kitty & sixel image rendering methods will fall back to ansi art images when rendering images in partially obscured cells, to prevent clipped images destroying the user interface.
For SVG support, cairosvg
or imagemagik
are required.
HTML Support
Euporie will attempt to render HTML outputs. This requires one of the following:
Note: only HTML tables will be displayed if mtable
is used
If none of these commands are found in your $PATH
, the plain text representation will be used.
Key Bindings
Command | Key Binding |
---|---|
Quit | Ctrl + q |
Close notebook | Ctrl + w |
Select next cell | Up , k |
Select previous cell | Down , j |
Page up (move up 5 cells) | Pgup |
Page down (move down 5 cells) | PgDown |
Scroll up | [ |
Scroll down | ] |
Enter edit mode | Enter |
Exit edit mode | Esc *, Esc, Esc |
Edit cell in $EDITOR |
e |
Run cell | Ctrl + Enter **, Ctrl + Space , F20 |
Run cell and select next cell | Shift + Enter **, F21 |
Insert cell above selected cell | a |
Insert cell below selected cell | b |
Toggle line numbers | l |
Copy cell | c |
Cut cell | x |
Paste cell | v |
Delete cell | dd |
* There is a slight delay detecting an escape key-event. To exit edit mode quickly, double-press the escape key.
** These entries require key remapping in your terminal in order to work - see below).
When in edit mode, emacs style key-bindings apply.
Key Remapping
By default, VT100 terminal emulators do not distinguish between Enter
, Ctrl + Enter
& Shift + Enter
. In order to work around this, it is possible to re-map these key bindings so they produce the escape code of another key. To replicate the Ctrl + Enter
& Shift + Enter
of Jupyter, you will need to remap the following shortcuts in your terminal:
Key Combination | Output |
---|---|
Ctrl + Enter |
Ctrl + F20 |
Shift + Enter |
F21 |
xterm
Add the following to your ~/.Xresources
*.vt100.translations: #override \n\
Ctrl <Key>Return: string("\033\[19;6~") \n\
Shift <Key>Return: string("\033\[20;2~") \n\
konsole
In the menu, navigate to:
Settings
-> Edit Current Profile
-> Keyboard
-> Edit
Change the existing entry for Return+Shift
to Return+Shift+Ctrl
(or whatever you prefer), then add the following entries:
Key combination | Output |
---|---|
Return+Ctrl |
\E\[19;6~ |
Return+Shift |
\E\[20;2~ |
Roadmap
- Add a configuration file to expose configurable settings
- Add ability to dump formatted notebooks
- Add command line argument parsing
- Render outputs asynchronously in a separate thread
- Cell attachements
- LaTeX
- Widgets
Related projects
-
https://github.com/davidbrochart/nbterm
An alternative effort sponsored by QuantStack
-
https://github.com/chentau/nbtui
A cli Jupyter notebook viewer with support for kitty's terminal graphics protocol
-
https://github.com/mosiman/jupytui
A cli Jupyter notebook viewer
-
https://kracekumar.com/post/jut/
Another cli Jupyter notebook viewer
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.