DEV Community

Abdelmomen
Abdelmomen

Posted on

One Setup for Claude Code, Codex, OpenCode, and Antigravity — With One-Command Undo

If you use more than one AI coding agent—say Claude Code in one project, Codex in another, OpenCode or Antigravity elsewhere—you end up maintaining the same global rules, MCP servers, and skills in multiple places.

Each tool uses its own paths and formats (CLAUDE.md vs AGENTS.md, JSON vs JSONC vs TOML vs CLI-managed MCP entries). Change a rule in one tool, forget the others, and your setups drift apart.

Copying files by hand is annoying. Letting a random sync script overwrite your real developer config without a safety net is worse.

That is why I built one-setup-all-agents (v0.1.0 pre-alpha, MIT, Python >= 3.11 stdlib only).

The four commands

  1. Import what you already have:
   all-agents init
Enter fullscreen mode Exit fullscreen mode

Detects installed tools, proposes an import into a shared source config, and records a permanent safety snapshot before writing.

  1. Preview and sync safely:
   all-agents sync
Enter fullscreen mode Exit fullscreen mode

Prints the exact plan across tools and asks for confirmation before touching files.

  1. Verify sync and conflicts:
   all-agents status
Enter fullscreen mode Exit fullscreen mode

Reports per-tool status (instructions, mcp, skills) and highlights any drift or conflicts.

  1. Reverse the last operation:
   all-agents undo
Enter fullscreen mode Exit fullscreen mode

Reverts the last logged operation from a unified write-ahead journal. If you edited a target file manually after syncing, undo detects the drift and refuses to overwrite your edit unless you pass --force.

Try it without installing

If you have uv installed, you can run a read-only dry run that writes nothing:

uvx one-setup-all-agents init --dry-run
Enter fullscreen mode Exit fullscreen mode

Or install it with pipx:

pipx install one-setup-all-agents
Enter fullscreen mode Exit fullscreen mode

Design choices & honest boundaries

  • Zero runtime dependencies: pure Python >=3.11 standard library.
  • Zero secret exposure: API keys and tokens are referenced strictly by environment-variable name (e.g. ${GITHUB_TOKEN}). Values are never read, printed, written to backups/journals, or passed on CLI flags.
  • Explicit per-tool boundaries: instead of pretending all four tools are identical, unsupported features are flagged clearly—for example, Antigravity does not expand env vars in HTTP headers (so HTTP MCP servers with auth headers are skipped), Codex flags conflicts if a non-empty AGENTS.override.md exists, and Claude Code MCP updates go through claude mcp CLI to avoid racing with running sessions.
  • Current verification scope (v0.1.0 pre-alpha): global user scope only. Live tool binaries were verified on Windows; Linux (Ubuntu WSL2) and macOS CI (macos-latest) pass the 989-test unit/contract suite on fixtures, with live Linux/macOS tool binaries still unverified.

Links & Arabic demo

If you try init --dry-run on your setup—especially on Linux or macOS—open an issue with your OS and tool versions so we can expand real-world verification.

Top comments (0)