Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/whitphx/stlite/llms.txt

Use this file to discover all available pages before exploring further.

The stlite CLI exposes four commands — share, html, web, and desktop — each converting a local Streamlit project into a different deployment format. All commands take a project directory as their first positional argument.

stlite share <path>

stlite share serializes the entire project (source files, binary assets, and requirements) as a protobuf message, base64url-encodes it, and embeds it in the hash fragment of a URL that opens on share.stlite.net. No file hosting is required — the app lives entirely inside the URL.
stlite share ./my-project
# https://share.stlite.net/#!CgZhcHAucHkS...
Pass --editable to produce an editor URL at https://edit.share.stlite.net/ instead of the read-only viewer URL.

Options

path
string
required
Path to the Streamlit project directory.
--entrypoint
string
default:"app.py"
Entrypoint script filename, relative to <path>. Defaults to app.py.
--requirements
string
Path to a requirements.txt file. Defaults to <path>/requirements.txt if that file is present.
--editable
boolean
default:"false"
Emit an editor URL (https://edit.share.stlite.net/) instead of the read-only viewer URL (https://share.stlite.net/).

stlite html <path>

stlite html generates a single self-contained .html file that loads @stlite/browser from jsDelivr and embeds all project source files inline — text files as JavaScript template literals, binary files as base64. The result can be opened directly in a browser without any server.
stlite html ./my-project -o app.html
By default the output is written to stdout; pass -o to write to a file instead.

Options

path
string
required
Path to the Streamlit project directory.
--entrypoint
string
default:"app.py"
Entrypoint script filename, relative to <path>. Defaults to app.py.
--requirements
string
Path to a requirements.txt file. Defaults to <path>/requirements.txt if that file is present.
-o, --out
string
Write the HTML output to this file path instead of stdout.
--runtime-version
string
Pin the version of @stlite/browser the exported page loads from jsDelivr. Defaults to the version of @stlite/browser bundled with the CLI at build time, keeping it in lockstep with the CLI release.

stlite web <path>

stlite web packages the project into a multi-file directory that runs entirely offline on any HTTP server. The output bundles the @stlite/browser single-page application, the Pyodide runtime (.mjs, .asm, .wasm, and lock files), and a pre-vendored site-packages snapshot — so users never fetch anything from a CDN at boot.
stlite web ./my-project -o ./out
python3 -m http.server -d ./out
# Serves the app at http://localhost:8000/
stlite web is Node.js only. It is not available in the stlite-cli PyPI package because it relies on Pyodide-in-Node tooling.

Options

path
string
required
Path to the Streamlit project directory.
--entrypoint
string
default:"app.py"
Entrypoint script filename, relative to <path>. Defaults to app.py.
--requirements
string
Path to a requirements.txt file. Defaults to <path>/requirements.txt if that file is present.
-o, --out
string
default:"./build"
Output directory for the packaged web app. Defaults to ./build.
--pyodide-source
string
Base URL or local path for Pyodide files (pyodide-lock.json, prebuilt wheels). Defaults to the Pyodide version bundled with the CLI.

stlite desktop <path>

stlite desktop packages the project into a Stlite Desktop artifact — a multi-file directory plus a stlite-manifest.json — that is consumed by electron-builder to produce a standalone Electron application. It is the drop-in replacement for the deprecated dump-stlite-desktop-artifacts binary from @stlite/desktop. Unlike share, html, and web, the desktop command does not read --entrypoint or --requirements flags from the command line. Instead it reads them from the stlite.desktop field in the project’s package.json, alongside additional manifest options (embed, nodeJsWorker, idbfsMountpoints, nodefsMountpoints, appMenu).
stlite desktop ./my-project -o ./dist/stlite
stlite desktop is Node.js only. It is not available in the stlite-cli PyPI package.
For the full list of fields supported under stlite.desktop in package.json, see the Desktop Configuration reference.

Options

path
string
required
Path to the project directory. The directory must contain a package.json with a stlite.desktop field that declares at minimum files (array of strings) and entrypoint (string).
-o, --out
string
default:"./build"
Output directory for the packaged desktop artifact. Defaults to ./build.
--pyodide-source
string
Base URL or local path for Pyodide files (pyodide-lock.json, prebuilt wheels). Defaults to the Pyodide version bundled with the CLI.

Common positional argument

path
string
required
The path to the local Streamlit project directory to convert. Passed as the first positional argument to every command, e.g. stlite share ./my-project.

Build docs developers (and LLMs) love