This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
光标与博览会
使用 Cursor 构建、升级、调试和部署你的 Expo 和 React Native 项目。
Cursor 是一个以 AI 为核心的代码编辑器,基于 VS Code 构建。它可以跨多个文件进行编辑、运行终端命令,并通过其代理自主工作。使用 create-expo-app 创建的 Expo 项目会生成一个 AGENTS.md 文件,Cursor 可以直接读取它。它还可以检查 EAS 和 Expo CLI 日志,从 Expo 模型上下文协议 (MCP) 服务器获取文档,使用 Expo 技能获取最佳实践,管理你的 EAS 部署工作流,等等。
🌐 Cursor is an AI-first code editor built on VS Code. It can edit across multiple files, run terminal commands, and work autonomously with its agent. Expo projects created with create-expo-app are scaffolded with an AGENTS.md file that Cursor reads directly. It can also check EAS and Expo CLI logs, fetch documentation from the Expo Model Context Protocol (MCP) Server, use Expo Skills for best practices, manage your EAS deployment workflow, and more.
快速开始
🌐 Quick start
1
下载光标
🌐 Download Cursor
从 Cursor 网站 下载并安装 Cursor。有关安装详情,请参阅 Cursor 文档。
🌐 Download and install Cursor from the Cursor website. For setup details, see the Cursor documentation.
2
3
设置 Expo 技能和 Expo MCP 服务器
🌐 Set up Expo Skills and the Expo MCP Server
安装 Expo Skills 并连接 Expo MCP 服务器,这样 Cursor 就能了解 Expo 的规范并访问你的 EAS。
🌐 Install Expo Skills and connect the Expo MCP Server so Cursor knows Expo conventions and can reach your EAS.
安装教授代理已知良好 Expo 模式的插件,并浏览可用技能的完整列表。
连接远程 Expo MCP 服务器以让代理实时访问 Expo 文档和 EAS。
4
5
验证设置
🌐 Verify setup
在 Cursor 的代理面板中,输入以下提示以确认它可以读取你的项目:
🌐 In Cursor's Agent panel, enter the following prompt to confirm it can read your project:
Open package.json and tell me which Expo SDK version this project targets.
如果代理回复的是来自 package.json 的 SDK 版本,则说明代理正在正确读取你的项目。
🌐 If the agent replies with the SDK version from package.json, the agent is reading your project correctly.
Cursor 如何读取你的 Expo 项目
🌐 How Cursor reads your Expo project
当你在 Cursor 中打开项目时,它会读取项目根目录下生成的 AGENTS.md 文件,以及子目录中任何嵌套的 AGENTS.md 文件。AGENTS.md 指引 Cursor 查阅你项目的 Expo SDK 版本文档,并保存你添加的任何项目级说明。AGENTS.md 会提交到你的项目中,所以开发者的会话从 Cursor 内相同的上下文开始。
🌐 When you open your project in Cursor, it reads the scaffolded AGENTS.md file at the project root, along with any nested AGENTS.md files in subdirectories. AGENTS.md points Cursor to the documentation for your project's Expo SDK version and holds any project-level instructions you add. AGENTS.md is committed to your project, so a developer's session starts from the same context inside Cursor.
你也可以在 .cursor/rules/ 下添加特定于光标的规则。
🌐 You can also add Cursor-specific rules under .cursor/rules/.
示例提示
🌐 Example prompts
设置完成后,用简单的语言描述 Expo 任务。例如:
🌐 After setup, describe Expo tasks in plain language. For example:
| 任务 | 示例提示 |
|---|---|
| 升级 SDK | 将此项目升级到最新的 Expo SDK 并修复任何破坏性更改。 |
| 添加导航 | 使用 Expo Router 添加一个标签导航器和新的设置屏幕。 |
| 自动化构建 | 创建一个 EAS 工作流,在每次拉取请求时构建应用。 |
| 调试构建 | 我最近的 iOS 构建失败了。读取 EAS 构建日志并告诉我出了什么问题。 |
| 添加通知 | 配置 expo-notifications,并在应用启动时显示本地通知。 |
| 设置 CI/CD | 创建一个在每次 PR 时构建的 CI/CD 工作流。 |
| 添加原生 UI | 向我的 Expo 应用添加一个 SwiftUI 选择器组件。 |
| 检查反馈 | 显示我的应用的 TestFlight 反馈。 |
| 验证 UI | 截屏并验证蓝色圆形视图。 |
更多示例,请参见 Expo Skills 和 Expo MCP Server 的示例提示部分。
🌐 For more examples, see the Example prompts sections of Expo Skills and Expo MCP Server.