promptgarten 🌱

Command reference

Codex CLI

OpenAI’s coding agent for the terminal β€” subcommands, flags and interactive slash commands.

learn.chatgpt.com β†—

ALL COMMANDS Β· 32

/modelSwitches the AI model used in the running Codex session./permissionsControls which actions Codex may perform without asking (approval mode)./statusShows the current status of the running Codex session./planShows or manages the work plan for the current task./reviewTriggers a review of the current code changes./diffShows the current changes (diff) of the session./resumeContinues an earlier Codex session./newStarts a new, empty Codex session./forkBranches the current session into a new, independent copy./mcpShows or manages the MCP servers connected to Codex./skillsShows available skills and applies the chosen one to the next request/goalSets a persistent task goal that Codex works toward across the session.codex execRuns Codex non-interactively, e.g. for scripts or CI.codex reviewRuns a review of changes via the CLI.codex resumeContinues an earlier Codex session via the CLI.codex applyApplies a diff created in the cloud locally./initGenerates an AGENTS.md scaffold for the current project./compactCompacts the current chat’s context./reasoningNo standalone command in the Codex terminal CLI, see /model/fastTurns a Fast service tier on or off, when available./personalityChooses how Codex responds, when the model supports personalities./memoriesSets whether the chat may use or create memories, when Memories is available./ideTurns IDE context on or off./feedbackOpens the feedback dialog, optionally with logs./approveApproves one retry after an automatic-review denial./sideStarts a temporary side chat without disturbing the main chat./projectChooses a project for new chats./cloudRuns the chat in the cloud (general Codex command reference)./localRuns the chat in your local workspace./cloud-environmentChooses the cloud environment for the chat./worktreeStarts the chat in a new Git worktree./quitExits the session.