[KongchangAI]
· 5 min read· 2,986 words

The Complete Codex Guide: A Step-by-Step Tutorial from Installation to Deployment

The Complete Codex Guide: A Step-by-Step Tutorial from Installation to Deployment

A complete hands-on guide to OpenAI Codex — from installation and permission modes to deploying a live website.

This guide offers a beginner-friendly, comprehensive introduction to OpenAI Codex's desktop client. It covers the fundamental difference between Codex (an autonomous Agent) and ChatGPT (a Q&A assistant), the four access methods, account recommendations (Plus + ChatGPT login), the Projects vs. Conversations distinction, three permission modes, model and thinking intensity settings, task queuing and parallelism, plugins and skills (@/$), automations, execution environments (Local/Worktree/Cloud), and using agents.md to enforce project rules. The guide closes with a full walkthrough of building and deploying a personal website to Vercel, plus six practical tips for efficient use.

What Codex Actually Is: From AI Coding Tool to All-Purpose Agent

At first glance, many people mistake Codex for OpenAI's AI coding tool — but that framing is already outdated. While it started with programming, Codex has evolved into a full-fledged AI Agent capable of writing code, creating presentations, generating Excel files, drafting reports, controlling browsers, and even producing videos.

The best way to understand how it differs from ChatGPT is through a home renovation analogy. ChatGPT is like a consultant who only gives advice: show it a photo of your kitchen and it'll tell you the stove should shift 20 cm to the left and the cabinets should be repainted cream white — all very sensible, but you still have to move the stove and paint the walls yourself. Codex is more like a contractor who actually does the work: tell it "renovate the kitchen," and it takes measurements, draws up plans, moves the stove, paints the walls, and sends you photos for sign-off when done — it can even dispatch multiple "workers" to handle the kitchen, bathroom, and living room simultaneously.

That's the core value of an Agent — it can open folders on your computer, create files, run programs, search the web, operate a browser, and after making changes, commit to a code repository and deploy to production. It's not just a Q&A bot; it's an AI that can actually roll up its sleeves and get things done.


Agent is one of the central concepts in recent AI development. It refers to an AI system capable of autonomously perceiving its environment, forming plans, and executing multi-step actions to accomplish a goal. Unlike traditional "question-and-answer" AI, an Agent has tool-calling capabilities — it can invoke the file system, browser, code interpreter, external APIs, and more, breaking down a vague high-level instruction into a series of concrete operations and carrying them out step by step. This "autonomous planning + tool execution" architecture is the fundamental reason Codex can handle end-to-end complex tasks like "build a website and deploy it online." The leading AI Agent frameworks today — including OpenAI's Codex, Anthropic's Claude Code, and Google's Project Mariner — all follow a similar "perceive–think–act" loop. The differences lie mainly in the types of tools supported, multi-task parallelism, and the scope of access granted to the user's machine.

Four Ways to Use Codex and Account Setup

Codex comes in four forms: CLI, VS Code extension, desktop client, and web app. All four deliver the same performance and largely share the same features, but considering ease of onboarding, feature completeness, and beginner friendliness, the desktop client is the recommended starting point.

You'll need a ChatGPT account before you begin. A Plus or Pro subscription is strongly recommended. Free accounts technically work, but the usage quota is extremely limited and will run out quickly. Plus users can send 30 to 150 messages to Codex per five-hour window — more than enough for everyday use. Heavy users or teams should consider Pro.

There are two login options. Sign in with ChatGPT has the most obvious advantages: your existing subscription quota carries over with no extra cost, you get the latest and most capable models immediately, and advanced features like cloud tasks are fully unlocked. API Key login suits those who'd rather not subscribe, but model updates are slower, cloud tasks aren't available, and you pay per use — a single large task could easily cost quite a bit. Overall, subscribing to Plus and logging in with your ChatGPT account offers the best value.

Compared to similar tools like Claude Code, Codex is notably more generous with quotas — quotas reset frequently and account restrictions are looser, which is a standout advantage in day-to-day use.

Interface Layout: The Critical Difference Between Projects and Conversations

After logging in, you'll land on the main interface. The left sidebar has four functional buttons — new conversation, search, plugins, and automations — plus two core lists: Projects and Conversations.

Understanding the difference between these two is key to grasping how Codex works. Conversations are like chatting with ChatGPT on your desktop — great for quick tasks like gathering information, writing copy, translating, or answering questions. Projects, on the other hand, are tied to a real folder on your computer. Every file Codex generates within a project (presentations, spreadsheets, Word documents, code, images) gets saved to that folder, making everything easy to manage and ensuring nothing gets lost.

A simple rule of thumb: if the task involves generating files, work inside a Project; if you're just having a quick chat, use a Conversation. Each project can contain multiple conversations — think of the project as a folder and each conversation as a separate work thread inside it.

Choosing Between the Three Permission Modes

Because Codex can directly modify files and run commands, it has a concept of "permission levels":

  • Default: The safest option. Codex can only make changes within the project folder, and needs your approval for anything involving the internet, running commands, or accessing files outside the project. Recommended for beginners.
  • Auto-review: Codex assesses risk on its own — safe operations (like creating a new file) are approved automatically, while riskier ones (like deleting a file) trigger a confirmation dialog. Think of it as having a built-in reviewer.
  • Full access: Codex can do anything without asking. Maximum efficiency, but also maximum risk — it could accidentally delete files or install the wrong dependencies.

A practical progression to follow: use Default for your first week, try Auto-review in your second week, and only consider Full access once you're familiar with Codex's behavior and have Git backups in place.

Everything involving network access


The permission modes reflect an important security concept: the Principle of Least Privilege. This classic tenet of computer security states that any program or user should have only the minimum permissions necessary to complete the task at hand — nothing more. It's especially important for AI Agents, because large language models are prone to "hallucinations" and may take actions beyond their intended scope (for example, deleting configuration files they deem unnecessary while trying to "optimize the project"). Full access mode is highly efficient, but if the model misunderstands an instruction, the resulting damage may be irreversible. The author's recommendation to pair elevated permissions with Git version control essentially introduces a recoverable buffer layer between efficiency and safety — a standard practice in engineering for managing the risks of autonomous AI actions.

Models and Thinking Intensity

The bottom-right corner of the input box lets you switch models and thinking intensity. On the model side, GPT-5.5 is currently the most capable and is recommended as the default; GPT-5.4 is also very strong and covers most use cases; 5.4 mini is faster and more quota-efficient for simpler tasks; 5.3 Codex still excels at complex engineering work.

Thinking intensity comes in four levels — low, medium, high, and max. Low is for fixing typos or answering simple grammar questions; medium is the recommended everyday setting; high is suited for cross-file feature development; max is for stubborn bugs that resist all other approaches, or large-scale refactoring. There are also standard and fast speed modes — fast runs about 1.5× quicker but consumes more quota.

Hands-On Workflow: From Creating a Project to Reviewing Changes

When creating a project, you have two options: create a blank project (which sets up an empty folder at a default path — good for starting from scratch) or use an existing folder (which opens a folder that already contains code or files — good for working on existing projects).

Once you issue an instruction, Codex displays its full reasoning process — what files it's analyzing, what it plans to do, and why. In any mode other than Full Access, a dialog appears before each action, offering three choices: "Approve for this action only," "Approve for this entire conversation," or "Decline."

After generating a webpage, Word document, presentation, or spreadsheet, you can click the filename to preview it directly. The most useful feature is the annotation tool in the top-right corner: select anything you're unhappy with and write your feedback inline. The annotation appears in the conversation box, and once you send it, Codex makes the precise changes you asked for.

Projects managed with Git

Once editing is done, click the Review button in the top-right corner to open a diff panel — green for additions, red for deletions, line by line. If you're not satisfied, you can undo and revert. If your project uses Git, you can commit and push to GitHub directly within Codex — the entire process is graphical, so no Git knowledge is required.

Queuing, Jumping the Queue, and Parallel Tasks

These three operations are among the most frequently used in the desktop app. Understanding them can dramatically improve your efficiency:

  • Task queuing: While Codex is working on Task A, just type in Task B — it will finish A and automatically start B. You can queue up as many tasks as you like and they'll execute in order.
  • Jumping the queue: If you want the currently running task to immediately incorporate a new requirement (say, you suddenly want an iOS-style UI), click the guide button next to the message and it will skip the queue and be injected into the current task right away.
  • Parallel tasks: Open a new conversation and assign a different task — both run simultaneously without interfering with each other. You can even run tasks in parallel across different projects.

One thing to note: different conversations don't share conversational memory, but since they all point to the same folder, every conversation can see all the files in the project.

Plugins and Skills: Two Layers of Capability Extension

Many users confuse plugins and skills, but the distinction is straightforward. Skills are a set of pre-written execution steps packaged into a Markdown file that Codex follows like a recipe — think of them as instruction manuals. The most commonly used built-in skill is imagegen (for generating images).

Plugins are one level above skills: a plugin includes multiple skills plus the ability to connect with an external application. For example, the computer use plugin takes control of your computer and bundles several skills — operating apps, screen recording, keyboard input, and more. Installing one plugin gives the AI the complete ability to interact with a specific external application.

How to trigger them: type @ to bring up the plugin list and manually invoke a plugin; type $ to trigger a skill. You can use both in a single message — for example: "Research the latest news on AAPL stock, use @Documents to summarize it into a Word report, and use $imagegen to generate a cover image."

Latest developments in the AI industry

With plugins like Documents, Spreadsheets, and Presentation, Codex can search the web for information and automatically generate a Word report complete with a table of contents and tables, a color-coded Excel comparison sheet, a clean business-style presentation deck, or even produce a Word document, spreadsheet, presentation, and cover image all from a single instruction.

Automations, Execution Environments, and the Terminal

If you repeat the same task every day, Automations are the answer. Just describe what you want in plain language — "Every morning at 9 AM, automatically search for AI stock news and generate a report" — and Codex will create a scheduled task. You can view, run immediately, pause, or delete automations in the Automations panel. A word of caution from the author: don't jump straight to setting up an automation the first time. Run it manually in a regular conversation first and confirm the output meets your expectations — otherwise you risk burning quota on something that doesn't work as intended.

There are three execution environments: Local (edits your actual files directly — suitable for small changes, but make sure you have backups), Worktree (creates a parallel copy in the background so multiple AI tasks can edit the same files without conflicting — changes can be merged or discarded afterward), and Cloud (sends the task to a remote server for execution — ideal for long-running heavy tasks, but requires connecting a GitHub account and is somewhat complex to configure). Beginners will find Local and Worktree more than sufficient.

The desktop app also includes a built-in terminal (open with Cmd+J or Ctrl+J). The working directory automatically follows the current conversation, and Codex can read terminal output to automatically assess server status. A handy trick: if you also have Claude Code installed, type claude in the terminal to launch it, then let Codex handle tasks it excels at — like operating the browser and generating images — while Claude Code focuses on front-end visual refinement.

Setting Project Rules with agents.md

Create an agents.md file in the root directory of your project, and Codex will automatically read it every time it starts up, treating the contents as standing orders. Since each new conversation gives Codex no memory of previous ones, repeatedly restating important guidelines in complex projects becomes tedious. This file acts like an onboarding handbook for a new employee — write it once and it never forgets.

agents.md goes in the outermost layer of the project

A practical tip: try to keep agents.md under 150 lines. If it's too long, it consumes too much of the AI's context capacity, which can actually impair its ability to understand the specific task at hand.


The design philosophy behind agents.md comes from the AI engineering practice of persisting system prompts. Large language models are inherently stateless — at the start of each conversation, the model knows nothing about your project and has to rebuild its understanding from context. agents.md essentially codifies the project's "system-level constraints" into a file that the model automatically loads at the beginning of every task, eliminating the need to re-explain the background each time. Effective content typically includes: tech stack constraints ("React only, no Vue"), file protection rules ("do not modify anything under /config"), coding style ("use camelCase for variable names"), output format requirements, and so on. This approach is especially valuable in collaborative projects — when team members each start a new conversation, the AI's behavioral boundaries remain consistent, effectively encoding shared team conventions into the project itself.

Full Walkthrough: Building a Personal Website and Deploying It Live

Create a new project called "Personal Brand Website," describe your requirements in the conversation, and Codex will write the code, spin up a local development server, and give you a preview URL. If something isn't right, just tell it in the conversation — refresh the page and you'll see the updated result.

Once you're satisfied, it's time to deploy. A locally running website disappears the moment you shut down your computer; deployment means handing it off to a cloud platform (Vercel, AWS, Alibaba Cloud, etc.) so it runs continuously and gives you a public URL. Using Vercel as an example: install and authorize it in the Plugins page, then return to your conversation, type @, select the Vercel plugin, and tell it to deploy. Within moments you'll have a publicly accessible URL.


Vercel is currently the most widely used zero-configuration cloud deployment platform for front-end projects, built by the team behind the Next.js framework. Its core strengths: once connected to a GitHub repository, every code push automatically triggers a build and deployment with no manual steps required; the free tier is sufficient for personal projects and includes global CDN acceleration and automatic HTTPS certificates. Other comparable platforms include Netlify and Cloudflare Pages — all three offer excellent support for static sites and popular front-end frameworks (React, Vue, Astro, etc.). Users who need a licensed domain in China or want lower latency may also consider Alibaba Cloud Static Web Hosting or Tencent Cloud's static website hosting. At its core, deployment means packaging your locally running code, uploading it to a public server for continuous operation, and binding it to an accessible domain — so your website stays online regardless of whether your own machine is running.

Six Tips for Getting the Most Out of Codex

  1. Use Projects whenever files are involved — Conversations are only for quick, casual questions.
  2. One task per conversation — The more focused a conversation is, the better Codex performs.
  3. Ask for a plan before tackling complex tasks — Use planning mode or have Codex outline the steps before it starts working.
  4. Define what "done" looks like — For example: "all tests passing, manually verified it works, no unrelated files modified."
  5. Commit frequently — Submit after each small step so you can roll back quickly if something breaks.
  6. Have Codex review Codex's own code — Open a new conversation and have it audit the security and performance of the previous session's changes.

Don't panic when things go wrong: if you hit a usage limit, wait an hour or two and your quota will roll over. If code gets broken, discard the Worktree directly, or use the diff panel to revert all changes in Local mode, or run git checkout. If you're worried about Codex touching unrelated files, add a rule to agents.md: "Do not make additional optimizations unless I specifically ask."

Final Thoughts

Codex has evolved from a pure coding tool into an all-purpose AI assistant for getting real work done. Whether you're in operations, design, or content creation, you can plug it into your actual workflow to work faster — no knowledge of HTML, CSS, or JavaScript required. Just describe what you want in plain language.

But how much Codex can accomplish ultimately depends on you: the better you understand your own project and the more clearly you can articulate your requirements, the higher the quality of what it delivers. Vague instructions will almost always produce results that aren't quite what you had in mind.

#Codex tutorial#OpenAI Codex#AI Agent#Codex desktop client#Codex deployment#agents.md#Codex vs ChatGPT#Vercel deployment#AI automation#Codex plugins
Share:

Related articles