jupyter-to-marimo
Convert Jupyter notebooks to marimo Python scripts with CLI-driven transformation and cleanup guidance.
- Use
uvx marimo convert <notebook.ipynb> -o <notebook.py>to generate marimo-compatible.pyfiles without local installation - Run
marimo checkbefore and after manual edits to catch syntax and compatibility issues - Common cleanup tasks include removing Jupyter artifacts (
%magiccommands,display()calls), verifying package metadata, and ensuring final cell expressions render correctly - Includes reference guides for porting ipywidgets to marimo equivalents, converting MathJax to KaTeX, and adding environment variable configuration via EnvConfig widget
Converting Jupyter Notebooks to Marimo
IMPORTANT: When asked to translate a notebook, ALWAYS run uvx marimo convert <notebook.ipynb> -o <notebook.py> FIRST before reading any files. This saves precious tokens - reading large notebooks can consume 30k+ tokens, while the converted .py file is much smaller and easier to work with.
Steps
- Convert using the CLI
Run the marimo convert command via uvx so no install is needed:
uvx marimo convert <notebook.ipynb> -o <notebook.py>
This generates a marimo-compatible .py file from the Jupyter notebook.
- Run
marimo checkon the output
More from marimo-team/skills
marimo-notebook
Write a marimo notebook in a Python file in the right format.
2.5Kmarimo-batch
An opintionated skill to prepare a marimo notebook to make it ready for a scheduled run.
1.6Kanywidget-generator
Generate anywidget components for marimo notebooks.
1.5Kwasm-compatibility
Check if a marimo notebook is compatible with WebAssembly (WASM) and report any issues.
1.1Kimplement-paper
Implement a research paper as an interactive marimo notebook together with the user. Start by understanding what the user wants to explore, fetch the paper via alphaxiv, then build a focused notebook.
899add-molab-badge
Add "Open in molab" badge(s) linking to marimo notebooks. Works with READMEs, docs, websites, or any markdown/HTML target.
779