A Jupyter kernel for JavaScript that executes code directly in your web app.
README.md

LiveJS #

A Jupyter kernel for JavaScript that executes code directly in your web app.

Screenshot of Jupyter and a demo web page side-by-side showing the result of running the Demo.ipynb jupyter notebook

  • Use this kernel for quick interactive feedback by running snippets of JavaScript within your web app and viewing the results from Jupyter.
  • Written from scratch with the kernel hosted from Python.
  • No JavaScript dependencies. No NodeJS.

Note: This project is in very early development and may not have a smooth user experience.

Install #

  • Install the uv Python package manager
    $ curl -LsSf https://astral.sh/uv/install.sh | sh
    
  • Install Jupyter
    $ uv tool install jupyterlab
    $ uv tool install jupyter-core
    
  • Install LiveJS
    $ uv tool install git+https://tangled.org/cduck.me/livejs
    
  • Install the LiveJS kernel into Jupyter
    $ livejs-install --user
    OR
    $ livejs-install --sys-prefix
    

Usage #

  • Launch Jupyter
    $ cd my/working/directory
    $ jupyter lab
    
  • Within the Jupyter interface, create a new notebook and select the kernel "LiveJS"
  • In the first cell, run %serve "path/to/my/webroot", "localhost", 5000
  • In the other cells, run JavaScript!
  • Advanced: For async Javascript, put the %%async magic at the top of each cell

Demo #

demo-video.mp4