Skills

Using Streamlit CLI

Documents Streamlit CLI commands for running apps, managing configuration, and...

Install

npx skills add iusztinpaul/designing-real-world-ai-agents-workshop --skill using-streamlit-cli -g -a claude-code -y
Category
Engineering
Updated
5mo ago
License
MIT
Context cost
Lightabout 1,031 tokens
Runs scripts
No, instructions only

What it does

Documents Streamlit CLI commands for running apps, managing configuration, and diagnostics. Use when starting Streamlit apps, configuring runtime options, or troubleshooting CLI issues.

Using the Streamlit CLI

The Streamlit CLI is the primary tool for running Streamlit applications and managing configuration. This skill covers all essential commands and configuration options.

Running Streamlit apps

Basic syntax

streamlit run [<entrypoint>] [-- config options] [script args]

Entrypoint options

ArgumentBehavior
(none)Looks for streamlit_app.py in current directory
Directory pathRuns streamlit_app.py within that directory
File pathRuns the specified file directly
URLRuns a remote script (e.g., from GitHub)

Examples

# Run default app in current directory
streamlit run

# Run a specific file
streamlit run app.py

# Run from a URL
streamlit run https://raw.githubusercontent.com/streamlit/demo-uber-nyc-pickups/master/streamlit_app.py

# Alternative: run as Python module (useful for IDE configuration)
python -m streamlit run app.py

Running with uv (recommended)

Use uv run to run Streamlit in a virtual environment with automatic dependency management:

# Run with uv (automatically uses/creates virtual environment)
uv run streamlit run app.py

# With configuration options
uv run streamlit run app.py --server.headless=true

# With script arguments
uv run streamlit run app.py -- arg1 arg2

Using uv run is the recommended approach because it:

  • Automatically manages virtual environments
  • Resolves and installs dependencies from pyproject.toml
  • Ensures reproducible environments across machines
  • Avoids manual activation/deactivation of virtual environments

Setting configuration with streamlit run

Configuration options follow the pattern --<section>.<option>=<value> and must come after the script name.

Read the whole SKILL.md on GitHub

More in Engineering