A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
docs: marimo edit - homepage (#1125)
Akshay Agrawal764cbb9497b7
diff --git a/README.md b/README.mdindex da3d0520df..e4278bd837 100644--- a/README.md+++ b/README.md@@ -81,22 +81,15 @@ marimo tutorial intro```**Create notebooks.**-Create an empty notebook with-```bash-marimo edit-```--or create/edit a notebook with a given name with+Create or edit notebooks with```bash-marimo edit your_notebook.py+marimo edit```-**Run apps.** Run your notebook as a web app, with Python-code hidden and-uneditable:+code hidden and uneditable:```bashmarimo run your_notebook.py@@ -104,14 +97,15 @@ marimo run your_notebook.py<img src="docs/_static/docs-model-comparison.gif" style="border-radius: 8px" width="450px" />-**Execute as scripts.** marimo notebooks can be executed as scripts at the+**Execute as scripts.** Execute a notebook as a script at thecommand line:```bashpython your_notebook.py```-**Automatically convert Jupyter notebooks.** Automatically convert Jupyter notebooks to marimo notebooks with the CLI+**Automatically convert Jupyter notebooks.** Automatically convert Jupyter+notebooks to marimo notebooks with the CLI```bashmarimo convert your_notebook.ipynb > your_notebook.pydiff --git a/docs/faq.md b/docs/faq.mdindex e85d9998d3..335556607c 100644--- a/docs/faq.md+++ b/docs/faq.md@@ -390,18 +390,18 @@ You can use any Python package. marimo cells run arbitrary Python code.### How do I use marimo on a remote server?-Use SSH port-forwarding to run the marimo kernel on a remote server+Use SSH port-forwarding to run marimo on a remote serverand connect to it from a browser on your local machine. Make sureto pass the `--headless` flag when starting marimo on remote:```bash-marimo edit notebook.py --headless+marimo edit --headless```You may also want to set a custom host and port:```bash-marimo edit notebook.py --headless --host 0.0.0.0 --port 8080+marimo edit --headless --host 0.0.0.0 --port 8080```<a name="faq-interfaces"></a>@@ -411,7 +411,7 @@ marimo edit notebook.py --headless --host 0.0.0.0 --port 8080Use `--host 0.0.0.0` with `marimo edit`, `marimo run`, or `marimo tutorial`:```bash-marimo edit notebook.py --host 0.0.0.0+marimo edit --host 0.0.0.0```<a name="faq-app-deploy"></a>diff --git a/docs/getting_started/index.md b/docs/getting_started/index.mdindex 142b86d8b1..ecfb38c1ff 100644--- a/docs/getting_started/index.md+++ b/docs/getting_started/index.md@@ -73,13 +73,14 @@ marimo tutorial --helpCreate and edit notebooks with `marimo edit`.-- create a new notebook:+- launch the notebook server to create new notebooks,+ and start or stop existing ones:```bashmarimo edit```-- marimo saves notebooks as Python files, which you can edit using:+- create or edit a single notebook with```bashmarimo edit your_notebook.pydiff --git a/marimo/_server/api/lifespans.py b/marimo/_server/api/lifespans.pyindex 6c4c69255c..fb427b349e 100644--- a/marimo/_server/api/lifespans.py+++ b/marimo/_server/api/lifespans.py@@ -6,6 +6,7 @@ import contextlibimport socketimport sys+from marimo._server.file_router import AppFileRouterfrom marimo._server.sessions import SessionManagerif sys.version_info < (3, 9):@@ -136,6 +137,7 @@ async def logging(app: Starlette) -> AsyncIterator[None]:file.name if file else None,f"http://{host}:{port}{base_url}",manager.mode == SessionMode.RUN,+ new=file_router.get_unique_file_key() == AppFileRouter.NEW_FILE,)yielddiff --git a/marimo/_server/print.py b/marimo/_server/print.pyindex 39ef300522..b3b037120c 100644--- a/marimo/_server/print.py+++ b/marimo/_server/print.py@@ -14,7 +14,9 @@ except Exception:pass-def print_startup(file_name: Optional[str], url: str, run: bool) -> None:+def print_startup(+ file_name: Optional[str], url: str, run: bool, new: bool+) -> None:print()if file_name is not None and not run:print_tabbed(@@ -26,10 +28,15 @@ def print_startup(file_name: Optional[str], url: str, run: bool) -> None:f"\033[1;32mRunning {os.path.basename(file_name)}""\033[0m " + _utf8("⚡"))+ elif new:+ print_tabbed(+ "\033[1;32mCreate a new notebook in your browser\033[0m "+ + _utf8("📝")+ )else:print_tabbed(- "\033[1;32mCreate or open a marimo notebook in your "- "browser\033[0m " + _utf8("🛠")+ "\033[1;32mCreate or edit notebooks in your "+ "browser\033[0m " + _utf8("📝"))print()print_tabbed(f"\033[32mURL\033[0m: \033[1m{url}\033[0m")diff --git a/marimo/_tutorials/intro.py b/marimo/_tutorials/intro.pyindex 83489735da..237311afc9 100644--- a/marimo/_tutorials/intro.py+++ b/marimo/_tutorials/intro.py@@ -2,7 +2,7 @@import marimo-__generated_with = "0.3.6"+__generated_with = "0.3.12"app = marimo.App()@@ -259,13 +259,9 @@ def __(mo):marimo edit```- in a terminal to create a new marimo notebook, or+ in a terminal to start the marimo notebook server. From here+ you can create a new notebook or edit existing ones.- ```- marimo edit notebook.py- ```-- to create/edit a notebook called `notebook.py`.**Running as apps.** Use