Beginner Guide
Codex Beginner GuideStarting from a Clean Local Folder
Never written a line of code? Open the Codex view inside the ChatGPT desktop app, pick one clean empty folder, and build an interactive portfolio page in a single local HTML file.

Section Outline
Step 1: Understand the Landscape
How Desktop Codex Differs from Everyday ChatGPT
People often assume building a webpage means memorizing syntax first. In the Codex view, you describe the layout and buttons in plain English, and it writes the file directly into the folder you choose.
No manual copy-paste juggling between chat and files
Instead of copying code blocks out of chat into a text editor and saving repeatedly, Codex reads, creates, and updates files directly inside the local folder you mount.
How Chat, Work, and Codex divide jobs
Chat handles quick Q&A; Work focuses on larger deliverables; Codex adds developer views for files, diffs, and checks. Capabilities overlap and Work shares plan usage with Codex. Projects keep chats and context grouped, with local projects attaching a folder.
The safest zero-code start: one standalone HTML file
Skip servers and package managers completely. Your resulting index.html runs offline in any browser with a double-click; internet access is only needed while Codex is generating or editing.
Step 2: Three Preparatory Steps
Install the App, Sign In, and Create One Empty Folder
No separate API keys needed—your existing ChatGPT account and a fresh blank folder are all it takes.
1. Download the official desktop app and sign in
Install the official ChatGPT desktop app for macOS, Windows, or Linux and sign in with your regular ChatGPT account. You do not need a separately billed API key.
chatgpt.com/download/ ↗2. Create a clean empty folder
Make an empty folder called codex-portfolio on your desktop or documents drive. Starting empty reduces stray edits to unrelated files, though remember a folder alone is not a strict security sandbox.
3. Switch to Codex and attach that folder
Open the desktop app, pick Codex from the product menu, and open codex-portfolio. Always glance at the displayed folder path before sending your first prompt.
Project files stay physically on your hard drive, while chat turns and generation connect to online model services.
Step 3: Reading the Workspace
Spot Four Signals: Composer, Progress, File List, and Approvals
Menu layouts shift slightly between releases, yet the rhythm stays simple: you describe the goal, Codex reports progress, and files update.
A composer box just like regular chat
Describe what you want in plain conversational language as if briefing a teammate—no programming vocabulary required.
Wait for the turn to finish
After sending a prompt, status signals show when Codex is planning, reading, or writing files. Let the full turn conclude before sending follow-up requests.
Watch index.html appear in the file list
The file pane shows everything inside your mounted folder. Once the first turn finishes, index.html appears and can be clicked to inspect.
Read approval dialogs before accepting
Depending on your OS permissions and settings, the app may ask permission before running commands or applying edits. Skim what it wants to touch before clicking Approve.
Focus on recognizing what state the tool is reporting rather than memorizing exact corner coordinates.


Desktop Reference
Common Keyboard Shortcuts
Shortcuts are optional time-savers—pick up two or three you like rather than memorizing the table.
| Action | macOS | Windows / Linux |
|---|---|---|
| New chat | CmdN | CtrlN |
| Open folder | CmdO | CtrlO |
| Find text in current chat | CmdF | CtrlF |
| View keyboard shortcuts | Cmd/ | Ctrl/ |
Note: On macOS, Cmd stands for Command and Ctrl stands for Control. Starting a new chat does not undo file edits, and find only searches inside the open chat. Press Cmd+/ (or Ctrl+/) anytime to check live bindings, or customize them in Settings > Keyboard Shortcuts.
Step 4: Real Implementation
Build Four Portfolio Cards with Live Category Filtering
This prompt packages layout, styling, filter buttons, and accessible detail dialogs inside a single index.html file—zero external packages required.
Give the full spec in one message
Dripping requirements across five short messages often causes early rules to be forgotten. Copy the complete prompt template below in one go.
Spot index.html in the file tree
Codex packs structure, CSS, and JavaScript into that single file. Once index.html appears, you are ready to open it in your browser.
Practice Materials
The exercise uses four fictional practice cards (already included in the prompt below): 1. Travel photography (Category: Photography) 2. Coffee brand proposal (Category: Design) 3. Event poster (Category: Design) 4. Reading notes page (Category: Web) Four filter buttons across the top: All, Photography, Design, Web. Default to showing all four cards, and narrow down to matching items on click.
Create a single standalone file named index.html inside the current empty folder. Embed all CSS styling and JavaScript logic directly inside this file. Do not use npm, external package managers, remote CDN image links, or backend API dependencies. Content and behavioral requirements: 1. Top heading displaying "My Portfolio" with a brief explanatory subheading. 2. Filter bar with four buttons: "All", "Photography", "Design", and "Web". 3. Four showcase cards: - "Travel photography", category "Photography", with a short summary. - "Coffee brand proposal", category "Design", with a short summary. - "Event poster", category "Design", with a short summary. - "Reading notes page", category "Web", with a short summary. 4. Interaction and accessibility requirements: - Clicking "All" displays all 4 cards; clicking "Photography" displays 1 card; clicking "Design" displays 2 cards; clicking "Web" displays 1 card. - Full keyboard navigation: users can press Tab to move between filter buttons and cards, using Enter or Space as applicable to select filters or open details. - Activating a card opens a details dialog element showing the complete project overview and a close button; pressing Escape or clicking the close button dismisses the dialog and returns focus to the triggering card. - Cards stack into a clean single-column layout on narrow mobile viewports. Output the complete, working file directly.
Expected Result Sample
Expected text-only result (illustrative structure only, not a personal run): Your folder holds one index.html file. In a browser, 'All' shows 4 cards, 'Photography' shows 1, 'Design' shows 2, and 'Web' shows 1. Activating any card opens a detail dialog that closes via button or Escape.
Verification Checklist
- Confirm codex-portfolio holds only the single index.html file
- Verify counts: 'All' shows 4 cards, 'Photography' 1, 'Design' 2, and 'Web' 1
- Verify Tab moves focus across filter buttons and cards, and Enter or Space triggers them
- Open a dialog, press Escape or click close, and confirm focus returns to that card
- Drag the browser window narrow and confirm cards stack into a clean single column with zero horizontal scroll
If all five checks pass, try shifting the mood! Send: "Keeping the current structure and behavior intact, update the color palette to warm earthy tones."
Step 5: Browser Verification
Double-Click index.html and Test Every Filter and Dialog
No local dev server needed—open the file straight from your file manager to inspect your work.
Double-click index.html directly
Open Finder (macOS) or File Explorer (Windows), go inside codex-portfolio, and double-click index.html to launch it in your default browser.
Click through all four filter buttons
Test All, Photography, Design, and Web in turn and count the cards (4, 1, 2, 1). Switching should feel instant without reloading the page.
Test keyboard navigation and Escape dismissal
Click a card, then try Tabbing to a card and pressing Enter or Space. Dismiss with Escape and confirm keyboard focus returns cleanly to the triggering card.
Shrink the browser window to mobile width
Drag the window edge inward until it resembles a phone screen; cards should stack neatly into one column without text clipping or sideways scrolling.
What if extra files like package.json appeared?
Ask Codex to explain the current files first, then say: "Inspect the current files and consolidate the project into a single index.html with embedded CSS and JavaScript, without deleting unconfirmed files." Re-test in the browser afterward.
A URL starting with file:/// means local file mode—it runs only on your computer and is not live on the internet.

Step 6: Targeted Adjustments
Edit One Small Spot While Protecting Everything That Works
The secret to smooth AI edits is simple: be crystal clear about what should change—and explicitly list what must stay untouched.
Target one small change per turn
Bundling ten redesign requests at once makes bugs hard to trace. Practicing with a single helper sentence lets you verify results in seconds.
Name what must stay untouched
Lines like 'keep filter counts and modal behavior unchanged' anchor the model so working features survive small edits.
Hit refresh in your browser
Once Codex finishes updating the file, switch back to your browser and refresh to see the new line live.
Apply a small adjustment to index.html: 1. Beneath the main heading, add a subtle helper note: "Click any tag to filter categories, or click a card to view complete project details." 2. Keep all existing filter buttons (All, Photography, Design, Web), card counts, and active behaviors completely unchanged. 3. Keep the modal dialog, Escape key handler, and responsive single-column layout working exactly as they are now. Update the file directly.
Verification Checklist
- Refresh your browser and verify the helper note sits under the main heading
- Click every filter button to confirm counts remain 4, 1, 2, and 1
- Open and close a card dialog to confirm interactions still work
Explicit preservation lines stop the assistant from accidentally wiping working filters while adding one sentence.
Step 7: Safeguarding Your Work
Duplicate Your Folder First—and Demystify Commit, Push, and Deploy
Once you have a working version you like, grab a quick backup before bigger experiments. Here is the simplest backup habit plus plain-English definitions of three terms you will hear everywhere.
The zero-stress folder copy
Duplicate the codex-portfolio folder in Finder or File Explorer and name it codex-portfolio-backup. If a future experiment breaks the layout, you are two clicks from restoring.
What Git actually does
Git is version control that saves snapshots when you deliberately commit changes—it does not record every keystroke automatically. Each commit logs exact differences at a chosen checkpoint.
Commit vs. Push vs. Deploy
Commit saves a checkpoint locally on your machine; Push uploads checkpoints to a remote repository (like GitHub); Deploy puts files onto hosting, becoming visible on the web only when configured as public.
No rush to put it online
A local single-file tool that solves a real need on your own computer is already valuable. Get comfortable locally before worrying about hosting.
Automated tools cannot promise effortless undo on every turn; a manual folder copy remains your safest net.
Your First Page Works—Where Next?
Now that you know how one clean folder, a single HTML file, and clear instructions fit together, tweak the palette yourself or read the next guide for everyday editing and recovery.
Step 8: Clarifying Common Doubts
Three Questions Every Beginner Asks After Round One
Quick answers on layout differences, missing-Git messages, and local-only browser previews.
Why do button labels or limits look slightly different from someone else's screen?
ChatGPT subscription tiers, usage thresholds, and staged app updates vary across accounts. As long as you attach the right folder, state clear requirements, and check files, the core flow works the same.
Why does the Review Diff pane say Git is missing?
The visual diff pane reads from a Git repository. Because our practice folder is a plain empty directory without Git initialized, Codex displays plain files instead—your index.html runs fine in the browser either way.
If my page opens in Chrome or Safari, can anyone on the internet see it?
No. Opening a file via file:/// loads it strictly from your local drive. Without deploying to a web server, nobody else can reach that page.
Knowing how local previews and review panes behave keeps surprises low.