Launching Codex
\\nCodex features a standard three-column interface: the left sidebar contains the task list, the center is the chat window, and the right side is the multi-function area.
\\nAfter launching the Codex application, we can add projects from the left menu, and enter our requirements in the input box of the center column:
\\nYou can set the model or upload files, etc.:
\\nLaunching Codex CLI
\\nAfter installing and configuring your account, open a terminal in your project directory and type codex to launch the interactive interface:
# Enter your project directory\\ncd ~/my-project\\n\\n# Launch Codex interactive interface\\ncodex\\n\\n# Launch with an initial prompt\\ncodex "Help me analyze the structure of this project."\\n\\n# Specify model on launch\\ncodex --model gpt-5\\n\\n\\n\\n? It is recommended to launch Codex from the project root directory so that it can fully read the project file structure.
\\nCodex interface is very simple, the cursor position is the input box, just type your requirements directly.
\\n
For example, we enter the directory codex-tutorial-test and then use the codex command to launch:
cd codex-tutorial-test\\n\\n# Launch Codex interactive interface\\ncodex\\n\\nThen you can directly enter your requirements in the interactive interface, such as asking it to explain the code in test.py, the effect is as follows (these records will also be displayed in the Codex App):
Three Approval Modes
\\nCodex CLI provides three different levels of operation permission modes, you can choose the appropriate mode according to your task requirements:
\\n| Mode | \\nDescription | \\nApplicable Scenarios | \\n
|---|---|---|
ask (default) | \\nRead-only mode: can read files and formulate plans, but requires your confirmation before executing any operations | \\nExploring unfamiliar codebases, risk assessment | \\n
auto-edit | \\nAuto edit: can read and modify files in the current directory, but network operations still require confirmation | \\nDaily code development, refactoring tasks | \\n
full-auto | \\nFully automatic: runs automatically in a sandbox with network disabled, no confirmation needed | \\nBatch tasks, CI/CD automation | \\n
# Specify approval mode on launch\\ncodex --approval-mode ask # Default read-only mode\\ncodex --approval-mode auto-edit # Auto edit mode (abbreviated as -a auto-edit)\\ncodex --approval-mode full-auto # Fully automatic mode\\n\\n# Switch in interactive interface\\n/approvals # Enter this command to switch approval mode\\n\\nYour First Conversation
\\nExample 1: Analyzing Project Structure
\\ncodex "Analyze the directory structure of this project and tell me the purpose of the main files."\\n# Codex will automatically read files and output something like:\\n# β Read package.json\\n# β Scan src/ Directory (23 files)\\n# Project Structure Analysis:\\n# - src/index.tsοΌApplication entry point, initializes the Express server.\\n# - src/routes/οΌAPI Route Definitions (5 endpoints in total)\\n# ...\\n\\nExample 2: Fixing Bugs
\\ncodex "My login function has a bug; the token is not saved correctly after user login. Help me identify the issue and fix it."\\n# Codex will:\\n# 1. Read relevant files\\n# 2. Analyze code logic\\n# 3. Propose modification plan\\n# 4. Execute modifications after your confirmation\\n\\nExample 3: Generating New Features
\\ncodex "Add a user registration endpoint to my Express application that validates the email format, requires a minimum 8-character password, and stores user information in the database."\\n\\n# Pass image context\\ncodex -i design.png "Implement the corresponding React component according to this design mockup."\\n\\nImage Input
\\nCodex CLI supports using images as context input, which is particularly useful in the following scenarios:
\\n- \\n
- Analyzing error screenshots \\n
- Generating frontend code based on UI design mockups \\n
- Interpreting architecture diagrams and implementing features accordingly \\n
# Method 1: Pass image path via command line\\ncodex -i screenshot.png "Explain this error message and tell me how to fix it."\\n\\n# Method 2: Pass multiple images\\ncodex --image img1.png,img2.jpg "Compare the differences between these two interfaces and implement the design from Figure 1."\\n\\n# Method 3: Paste image in interactive interface (macOS)\\n# After copying the image, directly press Cmd+V in the Codex input box to paste\\n\\n# Method 4: Shift + drag image to terminal window\\n
YouTip