Skip to content

Commit 01c8ef1

Browse files
Merge remote-tracking branch 'upstream/main' into try-orjson
2 parents b71fa64 + 1ffc3b5 commit 01c8ef1

171 files changed

Lines changed: 13091 additions & 3460 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Documentation
3+
about: Report a problem with the docs at reflex.dev/docs
4+
title: ""
5+
labels: documentation
6+
assignees: ""
7+
---
8+
9+
**Page**
10+
Path:
11+
12+
**What's wrong?**
13+
A clear description of the issue (typo, missing info, broken example, etc.).
14+
15+
**Suggested fix (optional)**
16+
If you have a suggestion for how to improve the page, share it here.
17+
18+
**Screenshots (optional)**
19+
If applicable, add screenshots to help explain.

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ docs/ # documentation site (separate workspace member)
4646
- No block comments (`# --- Section ---`, `# ============`). Plain inline comments only.
4747
- Be cautious creating new public APIs — they must be documented and supported long-term.
4848
- Google-style docstrings on all functions: one-line summary, optional detail sentence(s), then Args/Returns (or Yields)/Raises.
49+
- Prefer imports at the top of the module in isort order. Only use inline imports when necessary to avoid circular dependencies.
4950

5051
## Testing
5152

docs/advanced_onboarding/how-reflex-works.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ On the frontend, we maintain an event queue of all pending events.
197197
When an event is triggered, it is added to the queue. We have a `processing` flag to make sure only one event is processed at a time. This ensures that the state is always consistent and there aren't any race conditions with two event handlers modifying the state at the same time.
198198

199199
```md alert info
200-
# There are exceptions to this, such as [background events](/docs/events/background_events) which allow you to run events in the background without blocking the UI.
200+
# There are exceptions to this, such as [background events](/docs/events/background-events) which allow you to run events in the background without blocking the UI.
201201
```
202202

203203
Once the event is ready to be processed, it is sent to the backend through a WebSocket connection.
@@ -225,7 +225,7 @@ In our example, the `set_profile` event handler is run on the user's state. This
225225

226226
### State Updates
227227

228-
Every time an event handler returns (or [yields](/docs/events/yield_events)), we save the state in the state manager and send the **state updates** to the frontend to update the UI.
228+
Every time an event handler returns (or [yields](/docs/events/yield-events)), we save the state in the state manager and send the **state updates** to the frontend to update the UI.
229229

230230
To maintain performance as your state grows, internally Reflex keeps track of vars that were updated during the event handler (**dirty vars**). When the event handler is done processing, we find all the dirty vars and create a state update to send to the frontend.
231231

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# AGENTS.md and CLAUDE.md
2+
3+
`AGENTS.md` and `CLAUDE.md` are project-level instruction files that AI coding assistants read when they enter your repository. They give the assistant durable, repository-specific context so it follows Reflex conventions instead of generic defaults.
4+
5+
- `AGENTS.md` is read by agents that follow the [AGENTS.md convention](https://agents.md), including Cursor, OpenCode, OpenAI Codex, and Pi.
6+
- `CLAUDE.md` is read by [Claude Code](https://code.claude.com/docs/en/memory). Claude Code does not read `AGENTS.md` directly — see [Sharing With Claude Code](#sharing-with-claude-code) below.
7+
8+
A Reflex project should have at least one of these files at the project root, next to `rxconfig.py`.
9+
10+
## Recommended Content
11+
12+
The [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository ships an `AGENTS.md` template that points assistants at the [Reflex Agent Skills](/docs/ai/integrations/skills/) for environment setup, documentation lookup, and process management. Use it as the starting point, then add anything specific to your codebase.
13+
14+
```md alert info
15+
# `AGENTS.md` references skills by name, so it works once the [Reflex Agent Skills](/docs/ai/integrations/skills/) are installed in the assistant.
16+
```
17+
18+
## Installation
19+
20+
Download the template into your project root, next to `rxconfig.py`:
21+
22+
```bash
23+
curl -fsSL https://raw.githubusercontent.com/reflex-dev/agent-skills/main/AGENTS.md -o AGENTS.md
24+
```
25+
26+
Or copy it manually from a local clone of the [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository.
27+
28+
## Sharing With Claude Code
29+
30+
Claude Code reads `CLAUDE.md`, not `AGENTS.md`. To avoid duplicating content, create a `CLAUDE.md` that [imports](https://code.claude.com/docs/en/memory#import-additional-files) `AGENTS.md` using the `@` syntax:
31+
32+
```md
33+
@AGENTS.md
34+
35+
## Claude Code
36+
37+
Add any Claude-specific instructions here.
38+
```
39+
40+
Claude Code expands the `@AGENTS.md` import at session start, then appends anything you write below it. Both files stay in sync from a single source.
41+
42+
After installation, your project root looks like:
43+
44+
```text
45+
my_app/
46+
AGENTS.md
47+
CLAUDE.md
48+
rxconfig.py
49+
my_app/
50+
my_app.py
51+
```
52+
53+
## Project-Specific Additions
54+
55+
The template covers Reflex-wide setup. Below it, add anything else the assistant should know about your project:
56+
57+
- Internal conventions and code style.
58+
- Required lint, type-check, or test commands.
59+
- Folder layout and where new code should go.
60+
- Hosting or deployment notes.
61+
62+
Keep entries short and imperative — assistants follow concise, direct instructions more reliably than long paragraphs.
63+
64+
## Keeping Files Updated
65+
66+
Reflex evolves quickly. If you used `curl` to download the template, re-run the same command to refresh it:
67+
68+
```bash
69+
curl -fsSL https://raw.githubusercontent.com/reflex-dev/agent-skills/main/AGENTS.md -o AGENTS.md
70+
```
71+
72+
If you cloned the [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository, pull the latest changes and copy the file back into your project:
73+
74+
```bash
75+
cd agent-skills
76+
git pull
77+
cp AGENTS.md /path/to/your/reflex-project/AGENTS.md
78+
```
79+
80+
## Combining With Skills and MCP
81+
82+
`AGENTS.md` and `CLAUDE.md` anchor the assistant in your project. Pair them with the other onboarding tools for deeper Reflex knowledge:
83+
84+
- [Reflex Agent Skills](/docs/ai/integrations/skills/) provide reusable workflows that the file references by name.
85+
- [Reflex MCP](/docs/ai/integrations/mcp-overview/) provides structured documentation lookup at runtime.
86+
- The [llms.txt index](/llms.txt) gives a broad map of the documentation in one file.

docs/ai_builder/integrations/ai_onboarding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The index groups docs by section and links to agent-friendly Markdown assets.
102102
Use MCP when your editor or agent can call tools for structured documentation and component lookup:
103103

104104
```text
105-
https://mcp.reflex.dev/mcp
105+
https://build.reflex.dev/mcp
106106
```
107107

108108
See the [MCP overview](/docs/ai/integrations/mcp-overview/) and [MCP installation](/docs/ai/integrations/mcp-installation/) guides for details.

docs/ai_builder/integrations/mcp_installation.md

Lines changed: 72 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To use the Reflex MCP integration, you'll need to configure your AI assistant or
1212

1313
## Prerequisites
1414

15-
- An MCP-compatible AI tool (Claude Desktop, Windsurf, Codex, etc.)
15+
- An MCP-compatible AI tool (Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, Windsurf, etc.)
1616
- Internet connection to access the hosted MCP server
1717
- Valid Reflex account for OAuth 2.1 authentication
1818

@@ -27,49 +27,105 @@ The Reflex MCP server uses OAuth 2.1 protocol for secure authentication. You'll
2727
Add the Reflex MCP server to Claude Code by running:
2828

2929
```bash
30-
claude mcp add --transport http reflex https://mcp.reflex.dev/mcp
30+
claude mcp add --transport http reflex https://build.reflex.dev/mcp
3131
```
3232

3333
Then authenticate by running the `/mcp` command inside Claude Code and following the login steps in your browser. Authentication tokens are stored securely and refreshed automatically. See the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp) for more details.
3434

3535
### Claude Desktop
3636

37-
Add the Reflex MCP server to your Claude Desktop configuration by editing your configuration file:
37+
Claude Desktop pulls remote MCP servers from your Claude account's connectors. Go to [claude.ai](https://claude.ai)**Settings****Connectors****Add custom connector**, enter `https://build.reflex.dev/mcp` as the URL, and complete the OAuth login. The connector will then be available in Claude Desktop after you sign in. See the [custom connectors guide](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp) for details and plan availability.
38+
39+
### Codex
40+
41+
Add the Reflex MCP server to Codex by running:
42+
43+
```bash
44+
codex mcp add reflex --url https://build.reflex.dev/mcp
45+
```
46+
47+
See the [Codex MCP documentation](https://developers.openai.com/codex/mcp) for more details.
48+
49+
### Cursor
50+
51+
[Click here to install the Reflex MCP server in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=reflex&config=eyJ1cmwiOiJodHRwczovL2J1aWxkLnJlZmxleC5kZXYvbWNwIn0=), or edit (or create) `~/.cursor/mcp.json` for a global config, or `.cursor/mcp.json` in your project root for a project-specific config:
3852

3953
```json
4054
{
4155
"mcpServers": {
4256
"reflex": {
43-
"command": "npx",
44-
"args": ["-y", "mcp-remote", "https://mcp.reflex.dev/mcp"]
57+
"url": "https://build.reflex.dev/mcp"
4558
}
4659
}
4760
}
4861
```
4962

50-
### Windsurf/Cascade
63+
Open Cursor settings under **MCP & Integrations** to verify the server is connected and complete OAuth login. See the [Cursor MCP documentation](https://cursor.com/docs/context/mcp) for more details.
5164

52-
Create a `.vscode/mcp.json` file in your project root:
65+
### Gemini CLI
66+
67+
Add the Reflex MCP server to `~/.gemini/settings.json`:
5368

5469
```json
5570
{
5671
"mcpServers": {
5772
"reflex": {
58-
"serverType": "http",
59-
"url": "https://mcp.reflex.dev/mcp"
73+
"httpUrl": "https://build.reflex.dev/mcp"
6074
}
6175
}
6276
}
6377
```
6478

65-
### Codex
79+
See the [Gemini CLI MCP documentation](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html) for more details.
80+
81+
### GitHub Copilot
82+
83+
Create a `.vscode/mcp.json` file in your project root (or open **MCP: Open User Configuration** from the VS Code command palette for a global config):
84+
85+
```json
86+
{
87+
"servers": {
88+
"reflex": {
89+
"type": "http",
90+
"url": "https://build.reflex.dev/mcp"
91+
}
92+
}
93+
}
94+
```
6695

67-
Add this configuration to your `~/.codex/config.toml` file:
96+
After saving, start the server from the inline action above the entry in `mcp.json`, then complete the OAuth login when prompted. See the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) for more details.
6897

69-
```toml
70-
[mcp_servers.reflex]
71-
command = "npx"
72-
args = ["-y", "mcp-remote", "https://mcp.reflex.dev/mcp"]
98+
### OpenCode
99+
100+
Add the Reflex MCP server to your `opencode.json` (project) or `~/.config/opencode/opencode.json` (global):
101+
102+
```json
103+
{
104+
"$schema": "https://opencode.ai/config.json",
105+
"mcp": {
106+
"reflex": {
107+
"type": "remote",
108+
"url": "https://build.reflex.dev/mcp",
109+
"enabled": true
110+
}
111+
}
112+
}
113+
```
114+
115+
See the [OpenCode MCP documentation](https://opencode.ai/docs/mcp-servers/) for more details.
116+
117+
### Windsurf
118+
119+
Edit (or create) `~/.codeium/windsurf/mcp_config.json` and add the Reflex server:
120+
121+
```json
122+
{
123+
"mcpServers": {
124+
"reflex": {
125+
"serverUrl": "https://build.reflex.dev/mcp"
126+
}
127+
}
128+
}
73129
```
74130

75-
Note: Codex requires MCP servers to communicate over stdio. The `mcp-remote` package bridges the connection to the HTTP-based Reflex MCP server.
131+
After saving, open Cascade and click the refresh icon in the MCP toolbar to load the new server. See the [Windsurf MCP documentation](https://docs.windsurf.com/windsurf/cascade/mcp) for more details.

docs/ai_builder/integrations/mcp_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import reflex as rx
1010

1111
The Reflex [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) integration provides AI assistants and coding tools with structured access to Reflex framework documentation and component information. This enables intelligent assistance while developing Reflex applications.
1212

13-
The Reflex MCP server is deployed at `https://mcp.reflex.dev/mcp` and provides access to component documentation and Reflex documentation through standardized MCP tools.
13+
The Reflex MCP server is deployed at `https://build.reflex.dev/mcp` and provides access to component documentation and Reflex documentation through standardized MCP tools.
1414

1515
## Available Tools
1616

docs/api-reference/event_triggers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def protected_page():
7373
return rx.text("Protected content")
7474
```
7575

76-
For more details on page load events, see the [page load events documentation](/docs/events/page_load_events).
76+
For more details on page load events, see the [page load events documentation](/docs/events/page-load-events).
7777

7878
# Event Reference
7979

docs/app/.github/workflows/integration_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@ jobs:
6363

6464
- name: Export the website
6565
run: reflex export
66+
67+
- name: Validate /docs links against generated sitemap
68+
run: uv run python scripts/check_doc_links.py

0 commit comments

Comments
 (0)