Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 76 additions & 3 deletions .cursor/skills/update-docs-for-release/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: update-docs-for-release
description: Update the streamlit/docs repo for a new Streamlit release. Covers branch setup, release notes, API docstring generation, and API tiles/pages. Use when the user asks to update docs for a new Streamlit release, add release notes, generate docstrings, or add API tiles for new commands.
description: Update the streamlit/docs repo for a new Streamlit release. Covers branch setup, release notes, API docstring generation, config.toml, API tiles/pages, and removing or deprecating commands and parameters. Use when the user asks to update docs for a new Streamlit release, add release notes, generate docstrings, or add API tiles for new commands.
disable-model-invocation: true
---

Expand Down Expand Up @@ -172,6 +172,79 @@ After adding all files, present a table to the user:

The user will handle deploying the apps to Community Cloud.

## 6. Commit and push
## 6. Configuration options

Make focused commits per logical unit of work (release notes, docstrings, API tiles, images, example apps). Push to the branch and open a PR against `main`.
After generating docstrings, compare Streamlit's live config with the docs. The source of truth is `streamlit config show` from the same virtualenv used in step 3:

```bash
cd python
.venv-generate/bin/python -c "import streamlit; print(streamlit.__version__)"
.venv-generate/bin/python -m streamlit config show
```

**Primary file:** `content/develop/api-reference/configuration/config-toml.md`

Diff the option keys and comments from `streamlit config show` against that page:

- **Added options** — copy the CLI description into the matching `[section]` TOML block, using the same comment style as neighboring options.
- **Changed descriptions or defaults** — update the existing comments (for example allowed values, inheritance rules, or default numbers).
- **Removed options** — delete them from `config-toml.md`. If other pages still mention the option (FAQs, theming guides, tutorials), update or remove those references too.

Do not paste every `theme.light.*` / `theme.dark.*` key as its own table. Document those as inheriting from `[theme]` (and `[theme.sidebar]` where applicable), and only list exceptions that cannot be set per light/dark/sidebar.

**Related pages** — if theme or server options changed, check whether these still match the CLI:

- `content/develop/concepts/configuration/theming.md`
- `content/develop/concepts/configuration/theming-fonts.md`
- `content/develop/concepts/configuration/theming-colors-and-borders.md`

Release-note bullets about `client.*`, `server.*`, `runner.*`, or `theme.*` are a useful hint for what moved, but `streamlit config show` is authoritative.

## 7. Removed and deprecated APIs

If this version **removes** or **deprecates** commands or parameters, update the current docs to match. Start from the release notes (removal and deprecation bullets) and confirm against the new `python/streamlit.json` key:

```bash
cd python
.venv-generate/bin/python -c "
import json
d = json.load(open('streamlit.json'))
prev, new = d['x.y-1.0'], d['x.y.0']
print('removed commands:', sorted(set(prev) - set(new)))
for k in sorted(set(prev) & set(new)):
old_args = {a['name'] for a in (prev[k].get('args') or [])}
new_args = {a['name'] for a in (new[k].get('args') or [])}
gone = sorted(old_args - new_args)
if gone:
print(f'removed params on {k}:', gone)
"
```

Do not edit historical yearly release-note pages. Search `content/` (skip `content/develop/quick-references/release-notes/` except the current version) plus `python/api-examples-source/`, `python/generate.py`, `content/menu.md`, and `content/develop/quick-references/api-cheat-sheet.md`.

### Deprecated (still in Streamlit)

Keep the API page. Mark it so readers see the replacement:

- On the detail page Autofunction: `deprecated={true}` and a `deprecatedText` that names the version and the replacement, for example:

```markdown
<Autofunction function="streamlit.<command>" deprecated={true} deprecatedText="<code>st.<command></code> was deprecated in version x.y.0 and will be removed in a later version. Use <a href='/develop/api-reference/<section>/st.<replacement>'><code>st.<replacement></code></a> instead."/>
```

- Add `deprecated` to the page `keywords`.
- On the section `_index.md` RefCard: `deprecated={true}`. If the section already groups deprecated APIs (for example **Deprecated classes**), put the tile there.
- Parameter deprecations usually flow from docstrings (`.. deprecated::` is parsed into `streamlit.json`). Still rewrite tutorials, cheat-sheet snippets, and extra examples that recommend the old parameter as current.

### Removed

Clear the command or parameter from anything that presents it as current API:

- **Parameters** — they drop from the new Autofunction after docstring generation. Remove them from extra examples, tutorials, concept pages, cheat-sheet snippets, and `python/api-examples-source/` files. Rewrite those examples to the replacement API.
- **Commands with a dedicated page** — keep the slug so old links work. Strip the live Autofunction body down to a deprecation stub whose `deprecatedText` says the command was deprecated in version A and **removed** in this version, and points to the replacement (see `content/develop/api-reference/charts/bokeh_chart.md`). Keep the `content/menu.md` entry.
- **Commands or methods without a dedicated page** (for example a DeltaGenerator method) — delete Autofunctions, tiles, and cheat-sheet lines, and rewrite tutorials or demo apps that still call them.
- If `generate.py` errors because an object no longer exists, remove that entry from `obj_key` (or related dicts) and re-run, as in step 3.

## 8. Commit and push

Make focused commits per logical unit of work (release notes, docstrings, config, API tiles, deprecations/removals, images, example apps). Push to the branch and open a PR against `main`.
26 changes: 0 additions & 26 deletions content/develop/api-reference/caching-and-state/cache-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,29 +73,3 @@ def show_data():
st.write("And here is the raw data:")
st.dataframe(data)
```

### Input widgets

You can also use [interactive input widgets](/develop/api-reference/widgets) like `st.slider` or `st.text_input` in cached functions. Widget replay is an experimental feature at the moment. To enable it, you need to set the `experimental_allow_widgets` parameter:

```python
@st.cache_data(experimental_allow_widgets=True) # 👈 Set the parameter
def get_data():
num_rows = st.slider("Number of rows to get") # 👈 Add a slider
data = api.get(..., num_rows)
return data
```

Streamlit treats the slider like an additional input parameter to the cached function. If you change the slider position, Streamlit will see if it has already cached the function for this slider value. If yes, it will return the cached value. If not, it will rerun the function using the new slider value.

Using widgets in cached functions is extremely powerful because it lets you cache entire parts of your app. But it can be dangerous! Since Streamlit treats the widget value as an additional input parameter, it can easily lead to excessive memory usage. Imagine your cached function has five sliders and returns a 100 MB DataFrame. Then we’ll add 100 MB to the cache for _every permutation_ of these five slider values – even if the sliders do not influence the returned data! These additions can make your cache explode very quickly. Please be aware of this limitation if you use widgets in cached functions. We recommend using this feature only for isolated parts of your UI where the widgets directly influence the cached return value.

<Warning>

Support for widgets in cached functions is currently experimental. We may change or remove it anytime without warning. Please use it with care!
</Warning>

<Note>

Two widgets are currently not supported in cached functions: `st.file_uploader` and `st.camera_input`. We may support them in the future. Feel free to [open a GitHub issue](https://github.com/streamlit/streamlit/issues) if you need them!
</Note>
Original file line number Diff line number Diff line change
Expand Up @@ -71,29 +71,3 @@ def load_model():
st.write("Here's the model:")
return model
```

### Input widgets

You can also use [interactive input widgets](/develop/api-reference/widgets) like `st.slider` or `st.text_input` in cached functions. Widget replay is an experimental feature at the moment. To enable it, you need to set the `experimental_allow_widgets` parameter:

```python
@st.cache_resource(experimental_allow_widgets=True) # 👈 Set the parameter
def load_model():
pretrained = st.checkbox("Use pre-trained model:") # 👈 Add a checkbox
model = torchvision.models.resnet50(weights=ResNet50_Weights.DEFAULT, pretrained=pretrained)
return model
```

Streamlit treats the checkbox like an additional input parameter to the cached function. If you uncheck it, Streamlit will see if it has already cached the function for this checkbox state. If yes, it will return the cached value. If not, it will rerun the function using the new slider value.

Using widgets in cached functions is extremely powerful because it lets you cache entire parts of your app. But it can be dangerous! Since Streamlit treats the widget value as an additional input parameter, it can easily lead to excessive memory usage. Imagine your cached function has five sliders and returns a 100 MB DataFrame. Then we’ll add 100 MB to the cache for _every permutation_ of these five slider values – even if the sliders do not influence the returned data! These additions can make your cache explode very quickly. Please be aware of this limitation if you use widgets in cached functions. We recommend using this feature only for isolated parts of your UI where the widgets directly influence the cached return value.

<Warning>

Support for widgets in cached functions is currently experimental. We may change or remove it anytime without warning. Please use it with care!
</Warning>

<Note>

Two widgets are currently not supported in cached functions: `st.file_uploader` and `st.camera_input`. We may support them in the future. Feel free to [open a GitHub issue](https://github.com/streamlit/streamlit/issues) if you need them!
</Note>
4 changes: 0 additions & 4 deletions content/develop/api-reference/charts/altair_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ keywords: altair_chart, altair, chart, visualization, data, plot, graph, vega-li

<Autofunction function="streamlit.altair_chart" />

## Chart selections

<Autofunction function="VegaLiteState" />

<Autofunction function="DeltaGenerator.add_rows" deprecated={true} deprecatedText="We plan to deprecate <code>.add_rows()</code>. Please leave <a href='https://github.com/streamlit/streamlit/issues/13063'>feedback</a>." />

## Theming

Altair charts are displayed using the Streamlit theme by default. This theme is sleek, user-friendly, and incorporates Streamlit's color palette. The added benefit is that your charts better integrate with the rest of your app's design.
Expand Down
2 changes: 0 additions & 2 deletions content/develop/api-reference/charts/area_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ keywords: area chart, chart, visualization, data, plot, graph, dataframe, filled
---

<Autofunction function="streamlit.area_chart" />

<Autofunction function="DeltaGenerator.add_rows" deprecated={true} deprecatedText="We plan to deprecate <code>.add_rows()</code>. Please leave <a href='https://github.com/streamlit/streamlit/issues/13063'>feedback</a>." />
2 changes: 0 additions & 2 deletions content/develop/api-reference/charts/bar_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ keywords: bar chart, chart, visualization, data, plot, graph, dataframe, categor
---

<Autofunction function="streamlit.bar_chart" />

<Autofunction function="DeltaGenerator.add_rows" deprecated={true} deprecatedText="We plan to deprecate <code>.add_rows()</code>. Please leave <a href='https://github.com/streamlit/streamlit/issues/13063'>feedback</a>." />
2 changes: 0 additions & 2 deletions content/develop/api-reference/charts/line_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ keywords: line chart, chart, visualization, data, plot, graph, dataframe, time s
---

<Autofunction function="streamlit.line_chart" />

<Autofunction function="DeltaGenerator.add_rows" deprecated={true} deprecatedText="We plan to deprecate <code>.add_rows()</code>. Please leave <a href='https://github.com/streamlit/streamlit/issues/13063'>feedback</a>." />
2 changes: 0 additions & 2 deletions content/develop/api-reference/charts/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ keywords: map, geographic, visualization, data, plot, graph, dataframe, coordina
---

<Autofunction function="streamlit.map" />

<Autofunction function="DeltaGenerator.add_rows" deprecated={true} deprecatedText="We plan to deprecate <code>.add_rows()</code>. Please leave <a href='https://github.com/streamlit/streamlit/issues/13063'>feedback</a>." />
2 changes: 0 additions & 2 deletions content/develop/api-reference/charts/scatter_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ keywords: scatter chart, chart, visualization, data, plot, graph, dataframe, cor
---

<Autofunction function="streamlit.scatter_chart" />

<Autofunction function="DeltaGenerator.add_rows" deprecated={true} deprecatedText="We plan to deprecate <code>.add_rows()</code>. Please leave <a href='https://github.com/streamlit/streamlit/issues/13063'>feedback</a>." />
4 changes: 0 additions & 4 deletions content/develop/api-reference/charts/vega_lite_chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ keywords: vega_lite_chart, vega-lite, chart, visualization, data, plot, graph, i

<Autofunction function="streamlit.vega_lite_chart" />

## Chart selections

<Autofunction function="VegaLiteState" />

<Autofunction function="DeltaGenerator.add_rows" deprecated={true} deprecatedText="We plan to deprecate <code>.add_rows()</code>. Please leave <a href='https://github.com/streamlit/streamlit/issues/13063'>feedback</a>." />

## Theming

Vega-Lite charts are displayed using the Streamlit theme by default. This theme is sleek, user-friendly, and incorporates Streamlit's color palette. The added benefit is that your charts better integrate with the rest of your app's design.
Expand Down
2 changes: 2 additions & 0 deletions content/develop/api-reference/chat/chat-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Read the [Build a basic LLM chat app](/develop/tutorials/chat-and-llm-apps/build

<Autofunction function="streamlit.chat_input" />

<Autofunction function="ChatInputValue" />

For an overview of the `st.chat_input` and `st.chat_message` API, check out this video tutorial by Chanin Nantasenamat ([@dataprofessor](https://www.youtube.com/dataprofessor)), a Senior Developer Advocate at Streamlit.

<YouTube videoId="4sPnOqeUDmk" />
8 changes: 7 additions & 1 deletion content/develop/api-reference/command-line/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Command-line options
slug: /develop/api-reference/cli
description: Run Streamlit apps and manage configuration using the command-line interface for app execution, cache management, and system diagnostics.
keywords: cli, command line, streamlit run, cache, config, docs, hello, help, init, version, terminal, command
keywords: cli, command line, streamlit run, cache, config, docs, hello, help, init, version, terminal, command, streamlit skills
---

# Command-line interface
Expand All @@ -11,6 +11,12 @@ When you install Streamlit, a command-line (CLI) tool gets installed
as well. The purpose of this tool is to run Streamlit apps, change Streamlit configuration options,
and help you diagnose and fix issues.

<Tip>

If you use an AI coding agent, run [`streamlit skills`](/develop/api-reference/cli/skills) to install Streamlit's official agent skills.

</Tip>

## Available commands

- [`streamlit cache clear`](/develop/api-reference/cli/cache): Clear the on-disk cache.
Expand Down
Loading