Run as a scriptΒΆ

You can run marimo notebooks as scripts at the command line, just like any other Python script. For example,

python my_marimo_notebook.py

Running a notebook as a script is useful when your notebook has side-effects, like writing to disk. Print statements and other console outputs will show up in your terminal.

You can pass arguments to your notebook at the command-line: see the docs page on CLI args to learn more.

Future plans

In the future, we may give you the option to generate a PDF or HTML of the cell outputs when running as a script.