This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Codex 和 Expo
使用 Codex 来构建、升级、调试和部署你的 Expo 和 React Native 项目。
Codex 是 OpenAI 基于终端的 AI 编程代理。它可以读取和写入你项目中的文件,运行终端命令,并浏览网页。使用 create-expo-app 创建的 Expo 项目会附带一个 AGENTS.md 文件,Codex 可以直接读取它。它还可以检查 EAS 和 Expo CLI 日志,从 Expo 模型上下文协议 (MCP) 服务器获取文档,使用 Expo 技能获取最佳实践,管理你的 EAS 部署工作流等。
🌐 Codex is OpenAI's terminal-based AI coding agent. It can read and write files across your project, run terminal commands, and browse the web. Expo projects created with create-expo-app are scaffolded with an AGENTS.md file that Codex 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
安装 Codex
🌐 Install Codex
安装 Codex,然后从任何项目启动它。有关其他安装方法,请参阅 Codex CLI 文档。
🌐 Install Codex, then start it from any project. For other install methods, see the Codex CLI documentation.
2
3
安装 Expo 插件
🌐 Install the Expo plugin
安装官方的 Expo 插件,这样 Codex 就能了解 Expo 的规范并可以与你的 EAS 项目一起使用。只需一条命令即可安装 Expo 功能并注册 Expo MCP 服务器:
🌐 Install the official Expo plugin so Codex knows Expo conventions and can work with your EAS projects. One command installs Expo Skills and registers the Expo MCP Server:
然后登录你的 Expo 账号:
🌐 Then sign in to your Expo account:
下面的指南涵盖了可用的技能以及MCP服务器的其他功能:
🌐 The guides below cover the available skills and everything else the MCP Server can do:
浏览插件提供的完整技能列表,并查看其他代理的安装选项。
连接远程 Expo MCP 服务器以让代理实时访问 Expo 文档和 EAS。
4
5
验证设置
🌐 Verify setup
将以下提示粘贴到你的 Codex 会话中,以确认它可以读取你的项目:
🌐 Paste the following prompt in your Codex session to confirm it can read your project:
如果代理回复的是来自 package.json 的 SDK 版本,则说明代理正在正确读取你的项目。
🌐 If the agent replies with the SDK version from package.json, the agent is reading your project correctly.
Codex 如何读取你的 Expo 项目
🌐 How Codex reads your Expo project
当你在项目中启动 Codex 时,它会读取脚手架生成的 AGENTS.md 文件。该文件将 Codex 指向你的项目所使用的 Expo SDK 版本的文档,并保存你添加的任何项目级别的指令。
🌐 When you start Codex in your project, it reads the scaffolded AGENTS.md file. This file points Codex to the documentation for your project's Expo SDK version and holds any project-level instructions you add.
AGENTS.md 致力于你的项目,因此开发者的 Codex 会话从相同的上下文开始。
示例提示
🌐 Example prompts
设置完成后,用简单的语言描述 Expo 任务。例如:
🌐 After setup, describe Expo tasks in plain language. For example:
更多示例,请参见 Expo Skills 和 Expo MCP Server 的示例提示部分。
🌐 For more examples, see the Example prompts sections of Expo Skills and Expo MCP Server.