JupyterLite Terminal
JupyterLite is an unofficial Jupyter distribution that runs entirely in the web browser without any server components. Deployment and hosting are easy as JupyterLite sites are just static websites.
JupyterLite isn’t yet as fully-featured as the more established JupyterLab and developers are always looking for ways to add new features to bridge that gap. QuantStack are therefore delighted to announce that we have been working on a new Terminal for JupyterLite.
How do you try out the JupyterLite Terminal?
Go to https://jupyterlite-terminal.vercel.app/ and click on the Terminal launcher.
What can you do with the JupyterLite Terminal?
- Run shell commands such as
ls
andcat
on the same file system as the rest of JupyterLite:
- Use tab completion of command and file names, and pipes between commands:
- Store and use the command history:
- Change the theme settings:
- You can even run
lua
scripts from the command line:
- To list the available commands press
tab
in an empty prompt:
How does it work?
In JupyterLab the Terminal connects to a real shell such as bash
running on the server. In JupyterLite the Terminal runs entirely within the browser with commands that are compiled to WebAssembly and glued together with TypeScript to provide bash
-like functionality.
The WebAssembly commands are compiled on Emscripten-forge and automatically packaged up when you build a JupyterLite deployment using the Terminal.
You can see which Emscripten-forge packages are included in your Terminal using the cockle-config
command:
What is the status of the project?
The JupyterLite Terminal is still experimental and there are lots of things it doesn’t yet do. But it is under active development and major improvements are planned for the coming months. These will include more commands, improvedbash
-like shell functionality, and instructions on how to build and use your own WebAssembly commands.
Resources
JupyterLite deployment to try out the Terminal.
Github repositories:
- terminal: JupyterLite extension for the Terminal.
- cockle: underlying
bash
-like shell functionality. - recipes: Emscripten-forge recipes for WebAssembly commands.
Acknowledgements
This work was performed by Ian Thomas, Jeremy Tuloup and Thorsten Beier at QuantStack. Thanks to Bloomberg for funding this work and for their ongoing support for JupyterLite in general.
About the author
Ian Thomas is a Scientific Software Developer at QuantStack, is a core maintainer of the Open Source projects Matplotlib, Bokeh and ContourPy, and has an interest in many parts of the Jupyter ecosystem.