LinuxCommandLibrary

marimo

reactive Python notebook that stores notebooks as pure Python files

TLDR

Create new notebook

$ marimo edit [notebook.py]
copy
Open existing notebook
$ marimo edit [notebook.py]
copy
Run notebook as app
$ marimo run [notebook.py]
copy
Run with custom port
$ marimo run --port [8080] [notebook.py]
copy
Convert Jupyter notebook
$ marimo convert [notebook.ipynb] > [notebook.py]
copy
Export to HTML
$ marimo export html [notebook.py] > [output.html]
copy
New notebook with template
$ marimo new
copy
Show version
$ marimo --version
copy

SYNOPSIS

marimo [edit] [run] [convert] [export] [options] [notebook.py]

DESCRIPTION

marimo is a reactive Python notebook that stores notebooks as pure Python files. Unlike Jupyter, cells automatically re-execute when their dependencies change.
Notebooks are Python scripts, enabling version control with Git without JSON merge conflicts. Cells define functions and variables that form a dependency graph.
The reactive execution model ensures consistency. Changing a variable automatically updates all dependent cells. Hidden state and execution order issues from traditional notebooks are eliminated.
Run mode deploys notebooks as interactive web applications. Users interact with widgets while the Python backend handles computation.
Conversion from Jupyter preserves code and markdown cells. The reactive structure may need adjustment for notebooks that relied on execution order.

PARAMETERS

edit FILE

Edit notebook in browser.
run FILE
Run notebook as interactive app.
convert FILE
Convert from Jupyter to marimo.
export FORMAT FILE
Export notebook (html, md, script).
new
Create new notebook from template.
--port PORT
Server port.
--host HOST
Server host.
--headless
Don't open browser.
--watch
Watch for file changes.
--sandbox
Run in sandbox environment.
--version
Show version.
--help
Show help.

CAVEATS

Different mental model from Jupyter - linear execution not guaranteed. Some Jupyter magic commands not supported. Large notebooks may have performance implications from reactive updates.

HISTORY

marimo was created by Akshay Agrawal and Myles Scolnick in 2023 at Stanford. It addresses reproducibility issues in traditional notebooks by making execution deterministic through reactive programming.

SEE ALSO

jupyter(1), ipython(1), streamlit(1), python(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community