Metadata-Version: 2.4
Name: marimo-studio
Version: 0.4.0
Summary: Custom views for marimo notebooks
Author: Péter Ferenc Gyarmati
Author-email: Péter Ferenc Gyarmati <dev.petergy@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Dist: agent-plugins>=0.2.4
Requires-Dist: click>=8.2
Requires-Dist: htpy>=26.5.1
Requires-Dist: marimo==0.25.1
Requires-Dist: marimo-export>=0.2.1
Requires-Dist: markupsafe>=3
Requires-Dist: packaging>=25
Requires-Dist: tomli>=2 ; python_full_version < '3.11'
Requires-Dist: tomlkit>=0.14
Requires-Dist: tree-sitter>=0.25.2
Requires-Dist: tree-sitter-javascript>=0.25.0
Requires-Dist: watchdog>=6.0.0
Requires-Dist: deno>=2.9.5 ; extra == 'deno'
Requires-Dist: marimo-lens>=0.2.3 ; extra == 'lens'
Requires-Dist: marimo-studio[deno,lens] ; extra == 'recommended'
Requires-Dist: typst>=0.15 ; extra == 'typst'
Requires-Python: >=3.10, <3.15
Project-URL: Homepage, https://marimo-team.github.io/marimo-studio/
Project-URL: Documentation, https://marimo-team.github.io/marimo-studio/
Project-URL: Documentation Index, https://marimo-team.github.io/marimo-studio/llms.txt
Project-URL: Repository, https://github.com/marimo-team/marimo-studio
Project-URL: Issues, https://github.com/marimo-team/marimo-studio/issues
Provides-Extra: deno
Provides-Extra: lens
Provides-Extra: recommended
Provides-Extra: typst
Description-Content-Type: text/markdown

<p align="center">
  <a href="https://marimo-team.github.io/marimo-studio/">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://marimo-team.github.io/marimo-studio/brand/marimo-studio-lockup-horizontal-dark.svg">
      <img alt="marimo-studio" src="https://marimo-team.github.io/marimo-studio/brand/marimo-studio-lockup-horizontal-light.svg" width="360">
    </picture>
  </a>
</p>

<p align="center">
  <a href="https://marimo-team.github.io/marimo-studio/examples/">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://marimo-team.github.io/marimo-studio/showcase/marimo-studio-wall-dark.webp">
      <img alt="Four example notebooks, each heading a column of its four views" src="https://marimo-team.github.io/marimo-studio/showcase/marimo-studio-wall-light.webp" width="100%">
    </picture>
  </a>
</p>

<p align="center">
  <a href="https://github.com/marimo-team/marimo-studio/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/marimo-team/marimo-studio/actions/workflows/ci.yml/badge.svg"></a>
  <a href="https://pypi.org/project/marimo-studio/"><img alt="PyPI" src="https://img.shields.io/pypi/v/marimo-studio.svg"></a>
  <a href="https://pypi.org/project/marimo-studio/"><img alt="Python 3.10 through 3.14" src="https://img.shields.io/badge/python-3.10%E2%80%933.14-blue.svg"></a>
</p>

**Turn your marimo notebook into any document.** Use your
[marimo](https://marimo.io/) notebook's outputs as building blocks. Place a
chart, a table, or a single number in a web page, a slide deck, or a paper, and
keep all of your Python in the notebook.

Each document is a view: an ordinary project in its own folder beside the
notebook, which you or a coding agent can edit with any tool. A view places a
whole cell with its controls, one output such as a figure, or a value that you
format yourself. Pages stay live, so changing a control updates every result
that reads it, and PDFs compile again with the new values. Every result traces
back to the notebook cell that computed it.

You can start from HTML, React, Svelte, Reveal.js, Observable Notebook Kit,
Quarto, Typst, or LaTeX, and bring any other framework, template, or build tool
with a
[view provider](https://marimo-team.github.io/marimo-studio/guide/view-providers),
a Python package.

Studio is experimental and changing rapidly. Pin `marimo-studio` and
third-party view providers in saved projects.

## Outputs as building blocks

Two cells from a notebook that solves an optimization problem:

```python
@app.cell
def solution(q, solve):
    solution = solve(q)
    return (solution,)


@app.cell
def level_curves(bowl, draw_problem, region, solution):
    problem_figure = draw_problem(region, bowl, solution)
    problem_figure
    return (problem_figure,)
```

An HTML page places the figure and the optimal value:

```html
<marimo-output value="problem_figure"></marimo-output>
<p>The optimal value is <strong mo-value="solution.value"></strong>.</p>
```

A Typst report places the same two results in a PDF:

```typst
#import "marimo.typ": marimo_output, marimo_value

#marimo_output("problem_figure", width: 100%)
The optimal value is #marimo_value("solution.value", default: 0).
```

The notebook computes both results, and each view places them in its own
format:

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://marimo-team.github.io/marimo-studio/figures/output-value-wide-dark.webp">
    <img alt="The solution and level_curves cells in marimo, with the level-curve figure under level_curves, beside the HTML page and the Typst PDF. The page and the PDF show the same figure and state the optimal value." src="https://marimo-team.github.io/marimo-studio/figures/output-value-wide-light.webp" width="100%">
  </picture>
</p>

The page shows the figure as marimo renders it. The PDF draws it as a vector
graphic at the width the Typst source places it.

[What is Studio?](https://marimo-team.github.io/marimo-studio/what-is-studio)
explains the model,
[How Studio works](https://marimo-team.github.io/marimo-studio/how-studio-works)
shows how a page receives your notebook's results, and the
[Quadratic programs](https://marimo-team.github.io/marimo-studio/examples/quadratic-programs)
example shows both views next to the notebook.

## Get started

Paste this request into Claude Code, Codex, or another terminal agent:

```text
Run `uvx --with marimo-studio agent-plugins read marimo-studio` and create
a scrollytelling report and a slide deck explaining calculus basics.
```

The agent reads the instructions Studio ships for coding agents, starts a
notebook with Studio, writes the calculus in Python cells, then builds both
views and shows them beside the notebook. [uv](https://docs.astral.sh/uv/)
supplies `uvx`.

To work by hand, open a notebook with Studio:

```console
uvx --with marimo-studio marimo edit analysis.py --sandbox --watch
```

Click **Add view** in the toolbar, choose **HTML document**, and create the
view. Notebook and Preview open side by side. Edit the view's files in Studio's
Source pane or in your own editor, and Preview rebuilds when you save.

![Notebook, Preview, and view source in Studio](https://marimo-team.github.io/marimo-studio/screenshots/studio-develop.png)

[Getting started](https://marimo-team.github.io/marimo-studio/guide/getting-started) walks through a first view,
[Author with a coding agent](https://marimo-team.github.io/marimo-studio/guide/coding-agents) covers working
with an agent, and
[Select results with Lens](https://marimo-team.github.io/marimo-studio/guide/lens) points the agent at any part
of a view, down to a figure inside a PDF.

## Examples

Each example notebook backs four views:

- [Quadratic programs](https://marimo-team.github.io/marimo-studio/examples/quadratic-programs): a Reveal.js
  lecture, an HTML explainer, a Svelte and D3 lab, and a Typst report.
- [Rio 2016 athletes](https://marimo-team.github.io/marimo-studio/examples/athletes): an HTML overview, a Mosaic
  explorer, a Three.js presentation, and a Quarto paper.
- [Earthquake watch](https://marimo-team.github.io/marimo-studio/examples/earthquakes): an Observable Plot story,
  a MapLibre operations map, a Reveal.js briefing, and a Quarto bulletin.
- [Building occupancy](https://marimo-team.github.io/marimo-studio/examples/occupancy): a Notebook Kit monitor, a
  PDF field report, a LaTeX journal paper, and a Recharts model review.

D3, Mosaic, Three.js, MapLibre, Observable Plot, and Recharts run in the
views' own code and draw the values those views read from the notebook. A
page can load any JavaScript library the same way.

## Run or export a view

Serve the notebook's views as a live Python app:

```console
uvx --with marimo-studio marimo run analysis.py --sandbox
```

Or export the `report` view as a static site:

```console
uvx marimo-studio view export report --target analysis.py --output dist/report
```

The export runs the notebook on your machine, saves the results for each state
the view prepares, and leaves the notebook source out of the site. Views can
also run Python in your reader's browser.
[Run or export a view](https://marimo-team.github.io/marimo-studio/guide/run-and-share) compares the options.

## Documentation

[Guide](https://marimo-team.github.io/marimo-studio/guide/) ·
[Examples](https://marimo-team.github.io/marimo-studio/examples/) ·
[Reference](https://marimo-team.github.io/marimo-studio/reference/) ·
[Compatibility](https://marimo-team.github.io/marimo-studio/reference/compatibility) ·
[Troubleshooting](https://marimo-team.github.io/marimo-studio/guide/troubleshooting)

Report bugs through [GitHub Issues](https://github.com/marimo-team/marimo-studio/issues).
See the [security policy](https://github.com/marimo-team/marimo-studio/blob/main/SECURITY.md)
for private reports.

## License

[Apache License 2.0](https://github.com/marimo-team/marimo-studio/blob/main/LICENSE).
