All articles
claude-codecodexgeminiconfigcomparison

Claude Code vs Codex vs Gemini: Config Files Compared

CLAUDE.md, AGENTS.md, opencode.json, .gemini/settings.json — same rules, four formats. Here's exactly how they differ and how to unify them with one command.

6 min read

Claude Code uses CLAUDE.md. Codex uses AGENTS.md. Gemini uses .gemini/settings.json. OpenCode uses opencode.json. Same project, same rules, four different formats. Here's exactly how they differ and how to unify them.

CLAUDE.md — Claude Code's Instruction File

Claude Code reads a Markdown file at the project root. It supports structured instructions, coding conventions, and project-specific rules. The format is free-form Markdown — flexible but unstructured.

terminal
# CLAUDE.md\n\n## Project Rules\n- Use TypeScript strict mode\n- Tests use Vitest, not Jest\n- API responses use camelCase\n\n## Architecture\n- Next.js App Router\n- Prisma ORM with PostgreSQL

AGENTS.md — Codex's Instruction File

Codex reads AGENTS.md, backed by the Linux Foundation's emerging standard. Similar free-form Markdown, but with different conventions for agent roles and task boundaries.

terminal
# AGENTS.md\n\n## Coding Agent\nYou are a senior TypeScript developer.\nFollow existing patterns in src/.\nRun tests before committing.\n\n## Review Agent\nFocus on security and performance.

opencode.json — OpenCode's Config

OpenCode uses a structured JSON format. More rigid than Markdown, but machine-parseable. Defines agents with specific models and instructions.

terminal
agents\nname\ndefault\nmodel\nkimi-k2.5\ninstructions\nUse TypeScript strict mode...

.gemini/settings.json — Gemini CLI's Config

Gemini CLI uses a settings file in a hidden directory. JSON format with model preferences and context settings.

The Problem: Same Rules, Four Files

Notice the pattern? Every file says roughly the same thing:

01

Language

TypeScript with strict mode
02

Testing

Vitest, not Jest
03

Architecture

Next.js App Router + Prisma
04

Style

camelCase API responses

Four files. Same rules. One will drift within two weeks. Guaranteed.

The Fix: One Source, All Configs

0dai generates all four files from a single ai/ directory:

terminal
$ 0dai init\n✓ Detected: Next.js + TypeScript + Prisma\n✓ Generated: CLAUDE.md\n✓ Generated: AGENTS.md\n✓ Generated: opencode.json\n✓ Generated: .gemini/settings.json\n\n$ 0dai sync  # after editing ai/\n✓ All 4 configs updated from ai/ source

Edit your rules once in ai/. Run 0dai sync. Every agent gets the update. No drift. No copy-paste.

Note
0dai generates native configs for the supported agent CLIs from one shared source of truth. Free forever for local use. Pro ($15/mo) adds graph sync, session roaming, and swarm.

Get Started

terminal
$ npm install -g @0dai-dev/cli\n$ cd your-project\n$ 0dai init\n$ 0dai doctor  # verify everything works

Try 0dai

AI agents that know your project

Shared context, session roaming, and multi-agent swarm for Claude Code, Codex, Gemini, Aider, and OpenCode — from a singleai/directory. Install in seconds.

npm install -g @0dai-dev/cli && 0dai init
Back to all articles