Linux command
marimo 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Create new notebook
marimo edit [notebook.py]
Open existing notebook
marimo edit [notebook.py]
Run notebook as app
marimo run [notebook.py]
Run with custom port
marimo run --port [8080] [notebook.py]
Convert Jupyter notebook
marimo convert [notebook.ipynb] > [notebook.py]
Export to HTML
marimo export html [notebook.py] > [output.html]
New notebook with template
marimo new
Show version
marimo --version
说明
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.
参数
- 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.
FAQ
What is the marimo command used for?
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.
How do I run a basic marimo example?
Run `marimo edit [notebook.py]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does edit _FILE_ do in marimo?
Edit notebook in browser.