marimo is a reactive notebook for Python with a modern web frontend.
pixi shell
make fe && make py
make devSee CONTRIBUTING.md for detailed setup options.
marimo/ # Python backend - see marimo/AGENTS.md
frontend/ # React frontend - see frontend/AGENTS.md
tests/ # Python tests (mirrors marimo/ structure)
docs/ # Documentation site
Backend (/marimo/): Reactive notebook runtime built on Starlette/Uvicorn
_ast/: AST handling, cell parsing, dependency analysis_runtime/: Reactive execution engine, dataflow graph_server/: HTTP/WebSocket server, API endpoints, session management_plugins/: UI components (buttons, sliders, tables)_sql/: SQL cell support with multiple engine backends_output/: Output formatting and MIME types
Frontend (/frontend/src/): Interactive UI built with React/TypeScript/Vite
core/: Application state, cell management, runtime communicationcodemirror/: Code editor with Python/SQL support, completionsplugins/: React implementations of UI componentscomponents/: Reusable UI componentshooks/: Custom React hooks
Communication: WebSocket protocol (/ws) for real-time bidirectional messaging using typed operation-based messages.
# Python
make py-check # Typecheck and lint Python
uvx hatch run +py=3.12 test:test tests/path/to/test.py
uvx hatch run +py=3.12 test-optional:test tests/path/to/test.py # with optional deps
# Frontend
make fe-check # Typecheck and lint frontend
cd frontend && pnpm test src/path/to/file.test.ts- UI plugins require changes in both Python (
_plugins/) and React (plugins/) - The frontend communicates with the backend via WebSocket on
/ws
- Run
make checkbefore committing - See CONTRIBUTING.md for PR guidelines and CLA