Codex
OpenAI Codex CLI is OpenAI’s agentic coding tool. devai:install configures it with an AGENTS.md project guidelines file, MCP server registration via the codex mcp add CLI, and Marko skills distributed to .agents/skills/.
Prerequisites
Section titled “Prerequisites”- Codex CLI installed:
npm install -g @openai/codex - Authenticated:
codex auth login marko/devaiinstalled (see Installation)
What devai:install writes
Section titled “What devai:install writes”Running marko devai:install with Codex detected produces the following:
AGENTS.md # Project guidelines for Codex.agents/skills/ # Marko skill files distributed for CodexMCP registration is performed via the Codex CLI (codex mcp add) rather than by writing a config file.
AGENTS.md
Section titled “AGENTS.md”The root AGENTS.md receives Marko project guidelines inside a <!-- BEGIN/END marko:devai --> marker block: created if absent, and on later runs only the marked region is refreshed, so anything you add outside the markers is preserved. Remove the markers to take full ownership — devai then leaves the file alone (see Editing generated files). It contains:
- Marko module conventions and project structure overview
- Available MCP tools and their descriptions
- Project-specific guidelines from every installed package’s
resources/ai/guidelines.md
MCP registration
Section titled “MCP registration”The installer calls codex mcp add <serverName> -- <command> [args] to register marko mcp:serve as an MCP server. Codex stores this registration in its own configuration; no .codex/mcp.json file is written by devai:install.
Skills
Section titled “Skills”Marko skill bundles are written to .agents/skills/ so Codex can reference them during agentic tasks.
Manual verification
Section titled “Manual verification”- Open a terminal in your project root.
- Run
codex "What Marko MCP tools are available?"— Codex should list the registered tools frommarko/mcp. - Run
codex "Search docs for routing"— thesearch_docstool should return Marko documentation results. - Verify
AGENTS.mdexists in the project root and.agents/skills/contains skill files.
Agent-specific tips
Section titled “Agent-specific tips”- Full-auto mode: Codex works well in
--full-automode for routine Marko tasks like generating module boilerplate. Thevalidate_moduleMCP tool helps it self-check generated code. - Skills as tasks: Marko skills in
resources/ai/skills/map naturally to Codex task descriptions. Reference a skill by name in your prompt to load its context. - Sandboxing: When running with network sandboxing, ensure
marko mcp:serveis allowed through since it communicates over stdio.