Skip to content

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.

docs: clarify that marimo run hides source code by default (#9529)

Shahmir Varqhac2d9c4f982ec
diff --git a/docs/guides/deploying/index.md b/docs/guides/deploying/index.md
index 81efe7e9c4..17f71f5779 100644
--- a/docs/guides/deploying/index.md
+++ b/docs/guides/deploying/index.md
@@ -55,7 +55,11 @@ marimo run app.py --base-url /subpath
### Including code in your application
-You can include code in your application by using the `--include-code` flag when running your application.
+By default, `marimo run` does not send your notebook's source code to
+browser clients, so viewers cannot read it from the browser (including
+through dev tools).
+
+If you want to expose the code to viewers, pass the `--include-code` flag:
```bash
marimo run app.py --include-code
diff --git a/docs/index.md b/docs/index.md
index 7a0b2a9798..bb51dece05 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -211,8 +211,8 @@ Create or edit notebooks with
marimo edit
```
-**Run apps.** Run your notebook as a web app, with Python
-code hidden and uneditable:
+**Run apps.** Run your notebook as a web app. By default, the Python
+source code is not sent to the browser, so it stays hidden and uneditable:
```bash
marimo run your_notebook.py
diff --git a/marimo/_cli/cli.py b/marimo/_cli/cli.py
index ffe750b559..a35123a3cf 100644
--- a/marimo/_cli/cli.py
+++ b/marimo/_cli/cli.py
@@ -1009,7 +1009,10 @@ Example:
is_flag=True,
default=False,
type=bool,
- help="Include notebook code in the app.",
+ help=(
+ "Send notebook source code to the client. "
+ "By default, code is not sent to the client and cannot be viewed in the browser."
+ ),
)
@click.option(
"--session-ttl",