OpenAI Codexcodex-cli 0.154 · macOS, Linux, WSL, Windows
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
26 small wins to finish your path

Repository setup: end to end

Everything in this course, in the order you would actually do it, on one repository.

Lesson 0 promised a repository where Codex works the way you want. This is that setup, and every piece is something you met alone in an earlier lesson.

The files

text
my-project/
  AGENTS.md                  the rules of this project        lesson 6
  .codex/config.toml         sandbox, approvals, MCP servers  lessons 13, 16
  .codex/hooks/hook.py       the rule that is code            lesson 17
  .codex/skills/             procedures, loaded when needed   lesson 14

~/.codex/AGENTS.md           your preferences, everywhere     lesson 6
~/.codex/rules/default.rules the one command that may leave   lesson 7

Four things in the repository and two in your home directory. None of it is framework: it is the decisions you would otherwise repeat, written where the tool reads them.

The setting that matters most

toml
sandbox_mode = "workspace-write"
approval_policy = "on-request"

Committed, so a colleague gets your limits by cloning rather than by being told. That is the preset from lesson 5: it can edit this project and run its tests, and it asks before anything wider.

The order that works

Build it over a fortnight, not an afternoon
Run the sandbox. Lesson 3, on your own repository. Ten seconds, and refusals stop being mysterious.Step 1 of 6

Doing all of it on the first afternoon produces a configuration for a project you imagined. Doing it across two real weeks produces one for the project you have.

How you know it is working

  • Refusals are rare, and the ones you get are ones you agree with.
  • You have stopped retyping the same three sentences.
  • An unattended run cannot do anything you would not have allowed in person.
  • A new colleague gets your setup by cloning.

What this course left out

Left outWhat it is
Codex SecurityA separate product for scanning repositories, with its own CLI, plugin, SDK and CI integrations. A quarter of the documentation
The Codex SDK and app serverEmbedding Codex in your own product
Enterprise administrationManaged configuration, allowed profiles, compliance, Bedrock and Azure
IDE extension settings in depthThe same agent, with editor-specific commands and settings
Record and replay, computer historyCapturing and replaying sessions
Voice, and Codex MicroOther surfaces for the same agent
Windows sandbox and WSL specificsThe same boundary, enforced differently

None of those change what you learned. They are the same agent with more around it, and the documentation reads like a manual once the boundary makes sense.

You are done

You can say what Codex may touch and prove it in ten seconds. You can write the instructions, rules and hooks that keep a project inside limits you chose, run it without sitting there, read what a run did from its JSON, and hand the whole setup to somebody else by asking them to clone.

Try it yourself
  • Do the first two steps of that order today, in a repository you actually work in.
  • In a fortnight, open your config and delete anything you have not used.

Every expert started right here.