codex-env-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Codex 環境建置

Codex Environment Setup

先判斷作業系統,再確認 Codex Desktop app 是否已安裝、登入。不要一開始就重裝所有工具。
本 Skill 不檢查 GitHub 帳號、不執行
gh auth status
,也不安裝 Git 或 GitHub CLI。GitHub 相關設定全部留給
codex-github
。
First determine the operating system, then confirm whether the Codex Desktop app is installed and signed in. Do not reinstall all tools at the beginning.
This Skill does not check GitHub accounts, run
gh auth status
, or install Git or GitHub CLI. All GitHub-related configuration is left to
codex-github
.

步驟一:檢查

Step One: Inspection

Windows 使用 PowerShell:
powershell
node --version
uv --version
只有使用者明確要使用 CLI 時才執行:
powershell
codex --version
Node.js 需 18 以上,建議使用目前 LTS。缺少選用的 Codex CLI 不算 Desktop 環境失敗。
On Windows, use PowerShell:
powershell
node --version
uv --version
Run the following only when the user explicitly wants to use the CLI:
powershell
codex --version
Node.js must be version 18 or later; the current LTS release is recommended. A missing optional Codex CLI does not count as a failure of the Desktop environment.

步驟二:只補裝缺少項目

Step Two: Install Only Missing Items

Windows

Windows

powershell
winget install --id OpenJS.NodeJS.LTS --exact --accept-source-agreements --accept-package-agreements
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Codex Desktop app 尚未安裝時,可引導使用者到官方下載頁,或使用:
powershell
winget install Codex -s msstore
powershell
winget install --id OpenJS.NodeJS.LTS --exact --accept-source-agreements --accept-package-agreements
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
If the Codex Desktop app is not yet installed, guide the user to the official download page, or use:
powershell
winget install Codex -s msstore

macOS

macOS

shell
brew install node
curl -LsSf https://astral.sh/uv/install.sh | sh
shell
brew install node
curl -LsSf https://astral.sh/uv/install.sh | sh

Linux

Linux

Linux 沒有 Codex Desktop app,使用 IDE 擴充或 Codex CLI。Node.js 依 NodeSource LTS 官方指示安裝,uv 使用:
shell
curl -LsSf https://astral.sh/uv/install.sh | sh
安裝後若目前程序仍找不到指令,先重開 PowerShell 或 Codex Desktop app,再重新檢查,不要立刻判定安裝失敗。
Linux does not have a Codex Desktop app; use an IDE extension or Codex CLI. Install Node.js according to the official NodeSource LTS instructions, and install uv using:
shell
curl -LsSf https://astral.sh/uv/install.sh | sh
After installation, if the current process still cannot find the command, reopen PowerShell or the Codex Desktop app and then check again. Do not immediately determine that the installation failed.

步驟三:驗收

Step Three: Acceptance Verification

至少確認:
  • Codex Desktop app 能開啟並正常對話,或使用者選用的 IDE/CLI 可運作。
  • node --version
    為 18 以上。
  • uv --version
    有正常版本輸出。
  • 只有選用 CLI 時,才要求
    codex --version
    成功。
  • 全程沒有要求 GitHub 帳號或 GitHub 登入。
最終回報:已安裝/已補裝清單、版本、Codex 使用介面與登入狀態,以及仍需使用者手動完成的項目。
At minimum, confirm the following:
  • The Codex Desktop app can open and communicate normally, or the user's selected IDE/CLI works.
  • node --version
    reports version 18 or later.
  • uv --version
    outputs a valid version.
  • Require
    codex --version
    to succeed only when the optional CLI has been selected.
  • No GitHub account or GitHub sign-in is required at any point.
Final report: list the tools that were already installed and newly installed, their versions, the Codex interface and sign-in status, and any items that still require manual completion by the user.