From 8a9f5e9521c3bc3f83056cea6765828650f321d8 Mon Sep 17 00:00:00 2001 From: mokashang Date: Tue, 12 May 2026 17:54:57 -0700 Subject: [PATCH] docs: clarify that marimo run does not send code to the client Without `--include-code`, `marimo run` blanks the cell source before sending kernel-ready over the WebSocket, so the source is not just visually hidden but also unretrievable from the client. The previous wording could be read as merely "hidden in the UI". Update the deploying guide and the `--include-code` help text to make this explicit, which matters for notebooks whose source is confidential. Fixes #9489 --- docs/guides/deploying/index.md | 7 ++++++- marimo/_cli/cli.py | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/guides/deploying/index.md b/docs/guides/deploying/index.md index 81efe7e9c4e..8ee626e9ae6 100644 --- a/docs/guides/deploying/index.md +++ b/docs/guides/deploying/index.md @@ -55,7 +55,12 @@ 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` hides the notebook source code from the app and does +not send it to the client, so the code is not retrievable via browser dev +tools. This is useful when the notebook source is confidential. + +If you would like to expose the source code in the app, you can include it by +using the `--include-code` flag when running your application. ```bash marimo run app.py --include-code diff --git a/marimo/_cli/cli.py b/marimo/_cli/cli.py index 8c815275d26..75c47d91aa9 100644 --- a/marimo/_cli/cli.py +++ b/marimo/_cli/cli.py @@ -997,7 +997,10 @@ def _create_run_workspace( is_flag=True, default=False, type=bool, - help="Include notebook code in the app.", + help=( + "Include notebook code in the app. By default, code is hidden and " + "is not sent to the client." + ), ) @click.option( "--session-ttl",