marimo edit
Create or edit marimo notebooks in an interactive editor with a web-based interface.Usage
Arguments
NAME - Path to the notebook file or directory to edit (optional)- If a file path is provided, opens that specific notebook
- If a directory path is provided, opens a file browser for that directory
- If omitted, opens the current working directory
- Supports URLs for remote notebooks
- Supports piping:
cat notebook.py | marimo edit
--)
- All arguments after
--are passed to the notebook’ssys.argv
Options
Server Configuration
-p, —port PORT - Port to attach to- Type: Integer
- Default: Auto-assigned
- Type: String
- Default:
127.0.0.1
- Type: String
/)
- Type: String
- Default:
""
Browser & UI
—headless - Don’t launch a browser- Type: Flag
- Default:
False
Authentication
—token / —no-token - Use token for authentication- Type: Flag
- Default:
True - Enables session-based authentication with a random token
- Type: String
- If not set, a random token will be generated
- for stdin
- Type: String
- Mutually exclusive with
--token-password
Security & CORS
—allow-origins ORIGIN - Allowed origins for CORS- Type: String (can be repeated)
- Use
*for all origins - Example:
--allow-origins https://example.com --allow-origins https://other.com
- If
--untrusted, runs marimo in a Docker container - Default: Prompt if remote notebook detected
Development Features
—watch - Watch the file for changes and reload when saved in another editor- Type: Flag
- Default:
False
- Type: Flag
- Default:
True - Prevents version mismatch issues between client and server
- Type: Flag
- Default:
False
Sandbox & Isolation
—sandbox / —no-sandbox - Run in an isolated virtual environment- Type: Flag
- Dependencies tracked via PEP 723 inline metadata
- Requires
uv
Session Management
—timeout MINUTES - Global timeout to shut down server after specified minutes of no connection- Type: Float
- Type: Integer
- If
None, sessions are not automatically closed
Examples
Basic Usage
Custom Server Configuration
Authentication
Development Workflow
Remote Notebooks
Passing Arguments to Notebook
app.py, access arguments via sys.argv:
Using with Reverse Proxy
CORS Configuration
Piping Input
On Unix-like systems, you can pipe notebook content:Related Commands
- marimo run - Run a notebook in read-only mode
- marimo new - Create a new notebook with AI
- marimo tutorial - Open a tutorial