October 23, 2026

Codex CLI 설치 및 설정 방법

Codex CLI는 OpenAI의 터미널용 오픈 소스 코딩 에이전트예요. 이 가이드에서는 macOS, Linux, Windows에 Codex CLI를 설치하는 모든 방법과 로그인, 내 첫 세션, 설정, 업데이트 방법을 다뤄요. 이어서 Chief에서 Codex를 Claude Code와 함께 실행하는 방법을 보여 드려요.

빠른 설치

플랫폼명령어
macOS 및 Linuxcurl -fsSL https://chatgpt.com/codex/install.sh | sh
Windows (PowerShell)powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
npm (모든 플랫폼)npm install -g @openai/codex
Homebrewbrew install --cask codex

그런 다음 내 프로젝트 폴더에서 codex를 실행하고 ChatGPT로 로그인을 선택하세요.

명령어는 OpenAI의 Codex README와 문서에서 가져왔으며 2026년 10월에 확인했어요. 최신 정보는 OpenAI의 Codex 문서에서 확인하세요.


1단계: Codex CLI 설치하기

macOS 및 Linux

macOS와 Linux에서는 OpenAI의 독립 실행형 설치 프로그램으로 Codex CLI를 설치하는 방법을 권장해요.

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Codex CLI는 Apple Silicon 및 Intel 기반 macOS와 x86_64 및 arm64 기반 Linux를 지원해요.

패키지 관리자를 선호한다면 Homebrew를 사용하세요.

brew install --cask codex

또는 npm을 사용하세요.

npm install -g @openai/codex

Codex GitHub 릴리스 페이지에서 내 플랫폼용 바이너리를 내려받아 이름을 codex로 바꿔도 돼요.

Windows

Codex CLI는 Windows에서 네이티브로 실행돼요. Windows에 Codex CLI를 설치하려면 PowerShell에서 다음을 실행하세요.

powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

Windows에서 Codex는 기본적으로 네이티브 Windows 샌드박스를 사용하므로 WSL이나 가상 머신이 필요하지 않아요. Linux 네이티브 도구가 필요하거나 이미 워크플로를 WSL에서 실행하고 있다면 OpenAI는 WSL2를 권장해요. 이 경우 위의 macOS 및 Linux 명령어로 WSL 안에 Codex를 설치하세요.

설치 확인하기

codex --version

문제가 있어 보이면 codex doctor로 내 설치, 설정, 로그인, 런타임 상태를 점검할 수 있어요.

2단계: 로그인하기

아무 폴더에서나 codex를 실행하세요. 처음 실행하면 로그인 방법을 선택하라는 안내가 나와요.

  • ChatGPT로 로그인은 내 ChatGPT 플랜을 사용하므로 Codex 사용량이 내 구독에 포함돼요. Plus, Pro, Business, Edu, Enterprise 플랜에 권장되는 옵션이에요.
  • API 키로 로그인은 사용량을 내 OpenAI API 계정으로 청구해요.

명령줄에서 로그인할 수도 있어요.

codex login                                            # browser sign-in
printenv OPENAI_API_KEY | codex login --with-api-key   # API key from stdin
codex login --device-auth                              # device code, for remote or headless machines
codex login status                                     # show the active sign-in
codex logout                                           # clear stored credentials

서버나 브라우저가 없는 머신에서는 OpenAI가 기기 코드 로그인을 권장해요. Codex는 자격 증명을 ~/.codex/auth.json 또는 내 운영체제의 자격 증명 저장소에 보관해요.

3단계: 내 첫 세션 실행하기

내 프로젝트를 열고 Codex를 시작하세요.

cd my-project
codex

“가입 양식에 입력값 검증을 추가하고, 그 검증을 확인하는 테스트도 작성해 주세요”처럼 작업을 평범한 말로 입력하세요. 첫날부터 알아 두면 좋은 슬래시 명령어가 몇 가지 있어요.

명령어기능
/initCodex용 지침이 담긴 AGENTS.md 파일을 만들어요
/model모델과 추론 강도를 선택해요
/permissionsCodex가 묻지 않고 할 수 있는 일을 선택해요
/status현재 세션 설정을 보여 줘요
/review내 변경 사항을 검토하고 문제를 찾아요

AGENTS.md는 내 프로젝트가 어떻게 동작하는지 Codex에 알려 주는 파일이에요. 테스트 실행 방법, 따라야 할 규칙, 피해야 할 것을 적어 두세요. /init을 한 번 실행한 뒤 결과를 수정하면 돼요.

4단계: 권한과 기본값 설정하기

Codex는 내가 설정한 범위를 벗어나 파일을 편집하거나 명령어를 실행하기 전에 먼저 물어봐요. 세션마다 /permissions로 바꾸거나 플래그를 붙여 Codex를 시작할 수 있어요.

codex --sandbox workspace-write --ask-for-approval on-request

샌드박스 모드는 read-only, workspace-write, danger-full-access가 있어요. 기본값을 계속 유지하려면 ~/.codex/config.toml에 같은 옵션을 설정하세요.

model = "gpt-6.1-sol"
approval_policy = "on-request"
sandbox_mode = "workspace-write"

codex --profile <name>을 사용하면 내 베이스 설정 위에 이름 붙인 프로필을 덧씌울 수 있어요. 예를 들어 신중한 작업용 프로필과 빠른 실험용 프로필을 따로 둘 수 있어요.

5단계: Codex CLI 업데이트하기

Codex는 자주 업데이트돼요. 가장 간단한 업데이트 방법은 다음과 같아요.

codex update

또는 설치할 때 사용한 도구로 업데이트하세요.

curl -fsSL https://chatgpt.com/codex/install.sh | sh   # standalone installer: rerun it
npm install -g @openai/codex@latest                    # npm
brew upgrade --cask codex                              # Homebrew

업데이트한 뒤 codex --version을 실행해 새 버전을 확인하세요.

유용한 Codex CLI 명령어

명령어기능
codex대화형 세션을 시작해요
codex exec "<task>"스크립트와 CI용으로 작업을 비대화형으로 실행해요
codex review코드 리뷰를 비대화형으로 실행해요
codex resume이전 세션을 재개해요 (가장 최근 세션은 --last)
codex --worktree새 git worktree에서 세션을 실행해요
codex mcpMCP 서버를 관리해요
codex appCodex 데스크톱 앱을 실행해요

Chief에서 Codex를 Claude Code와 함께 실행하기

Codex CLI를 설치하고 로그인하면 Chief에서 바로 사용할 수 있어요. Chief는 AI 에이전트 관리 도구예요. 목표를 정하면 Chief가 이를 마일스톤으로 계획하고 각 마일스톤을 내가 선택한 에이전트로 실행해요.

  • 하나의 계획에 Codex와 Claude Code를 함께. 프로젝트마다 기본 에이전트를 정하고, 마일스톤마다 Codex나 Claude Code를 고를 수 있어요. 각각 어디에서 강점을 보이는지는 Claude Code vs Codex에서 확인하세요.
  • 방금 설치한 Codex를 실행해요. Chief 릴레이는 macOS, Linux, Windows에서 실행되며, 내 ChatGPT 계정으로 로그인된 내 머신의 codex를 시작해요. 내 코드는 원래 있던 곳에 그대로 있어요.
  • 독립적인 작업은 병렬로 실행돼요. Chief는 의존성이 완료된 마일스톤을 모두 동시에 실행하고, 각 결과를 해당 마일스톤의 완료 기준에 따라 확인해요.
  • Codex에서 Chief와 대화하세요. codex mcp로 Chief의 MCP 서버를 추가하면 내 세션을 떠나지 않고도 내가 처리하기를 기다리는 일이 무엇인지 물어볼 수 있어요.

Chief로 Codex를 실행하세요. 무료로 시작하기 →

함께 사용하는 방법 더 보기: Chief + Codex.


자주 묻는 질문

Codex CLI는 어떻게 설치하나요?

macOS와 Linux에서는 curl -fsSL https://chatgpt.com/codex/install.sh | sh를 실행하세요. Windows에서는 PowerShell 설치 프로그램을 실행하세요. npm install -g @openai/codex나 brew install --cask codex를 사용해도 돼요. 그런 다음 codex를 실행하고 로그인하세요.

Codex CLI는 Windows에서 동작하나요?

네. Codex CLI는 Windows 샌드박스와 함께 Windows에서 네이티브로 실행되므로 WSL이 필요하지 않아요. 내 도구가 Linux 네이티브라면 여전히 WSL2를 쓸 수 있어요.

Codex CLI는 어떻게 업데이트하나요?

codex update를 실행하거나, 설치할 때 사용한 도구로 업데이트하세요. 설치 스크립트를 다시 실행하거나 npm install -g @openai/codex@latest 또는 brew upgrade --cask codex를 실행하면 돼요.

Codex CLI는 무료인가요?

Codex CLI는 Apache-2.0 라이선스의 오픈 소스예요. 사용하려면 Codex가 포함된 ChatGPT 플랜이나 토큰당 요금이 청구되는 OpenAI API 키가 필요해요. 현재 플랜은 OpenAI의 요금제 페이지에서 확인하세요.

Codex CLI를 설치하려면 Node.js가 필요한가요?

아니요. 독립 실행형 설치 프로그램과 Homebrew는 Node.js가 필요하지 않아요. npm으로 설치하기로 한 경우에만 Node.js가 필요해요.

Codex CLI와 Claude Code를 함께 사용할 수 있나요?

네. 같은 파일을 편집하지 않도록 각각 별도의 브랜치나 git worktree를 주거나, Chief가 작업을 계획하고 각 마일스톤을 내가 선택한 에이전트에 보내도록 하세요.

More articles

AI Agent Orchestration Guide

What AI agent orchestration is, how multi-agent orchestration works for Claude Code and Codex, and a comparison of orchestration approaches. Free guide.

What Is Agentic Engineering?

Agentic engineering means directing AI coding agents that write and test code while you set goals and review results. How it differs from agentic coding.

AI Code Review at Scale

What AI code review is, the main types of AI code review tools, and five workflows for reviewing AI-generated code from several coding agents at once.

Claude Code and Codex Pricing

Claude Code pricing from $20/mo (Pro) to $200/mo (Max 20x), Codex pricing from ChatGPT Free to Pro, usage limits and a comparison table, checked Oct 2026.

From Single Agent to Multi-Agent

Already using one AI coding agent? Here's how to scale to multiple instances running in parallel — the concurrency patterns, worktree isolation, and task decomposition strategies that make it work.

Vibe Coding at Scale

Vibe coding with one agent is fun. Vibe coding with five is chaos — unless you have orchestration. Here's how to scale the vibe without losing the quality.

Why AI Agents Need an Orchestration Layer

Running AI coding agents in terminal tabs works for two. Five signs you've outgrown it, tabs vs an orchestration layer, and what to look for in one.

Multi-Provider AI Orchestration

Claude Code, Codex, Cursor, Aider — each excels at different work. Here's how to combine providers into one coordinated workflow and why cross-provider review catches bugs single-provider setups miss.

Use Chief From Your AI Assistant

Add Chief's remote MCP server to Claude, Claude Code or Codex. Ask what's waiting on you, catch up on what shipped and propose milestones from chat.

Claude Code vs Codex: When to Use Each

Codex vs Claude Code: when each fits, a comparison table and FAQ. Claude Code vs Codex isn't either-or; Chief runs both on your projects.

Claude Code vs Cursor: When to Use Each

Cursor vs Claude Code: when each fits, a comparison table and FAQ. Claude Code vs Cursor isn't either-or; keep Cursor and let Chief run Claude Code.

How to Run Multiple Claude Code Agents in Parallel

Run multiple Claude Code agents in parallel, step by step: worktrees, background agents, subagents and review. Then let Chief orchestrate them for you.

Git Worktrees for AI Coding Agents

How to use git worktrees with Claude Code and Codex: one per agent, parallel runs, .env files, merging and cleanup. Every command, step by step.

How to Run Claude Code From Your Phone

Run Claude Code from your phone: Remote Control, cloud sessions in the Claude mobile app, or SSH and tmux, step by step. Plus approving agents in Discord.

The Best AI Coding Agents in 2026

The best AI coding agents of 2026: Claude Code, Codex, Cursor, Copilot and more agentic AI coding tools compared, and how to run several with Chief.

Subagents vs Parallel Agents

What is a subagent? How Claude Code subagents and Codex subagents work, how they differ from parallel agents, and when to use each one.

Ready to manage your agents?

_Codex는 OpenAI의 상표예요. Claude Code는 Anthropic의 상표예요. Chief는 독립 제품이며 두 회사와 제휴하거나 두 회사의 후원 또는 보증을 받지 않았어요._