{"version":"2.1.182","anchor":"migrate-import-config-from-codex-or-gemini-cli","canonical_anchor":"migrate-import-config-from-codex-or-gemini-cli","heading":"\/migrate \u2014 Import config from Codex or Gemini CLI","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.182\/e\/migrate-import-config-from-codex-or-gemini-cli","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.182","markdown":"### `\/migrate` \u2014 Import config from Codex or Gemini CLI\n\n**What**\n\nA new slash command and CLI subcommand that scans for OpenAI Codex or Google Gemini CLI configuration and imports compatible items into Claude Code.\n\n**Usage**\n\n`# Interactive TUI picker (terminal only) claude migrate # Import from a specific agent claude migrate codex claude migrate gemini # Preview without writing anything claude migrate --dry-run # Non-interactive: auto-import user-level items (skips \u26a0-flagged and project-level items) claude migrate --yes claude migrate codex --yes --dry-run` Or from inside a session:\n\n`\/migrate \/migrate codex --dry-run \/migrate --yes` **Details** - Detects Codex config at `~\/.codex\/config.toml`, `~\/.codex\/AGENTS.md`, `~\/.codex\/prompts\/`, and `.codex\/config.toml` in the current project - Detects Gemini CLI config at `~\/.gemini\/settings.json`, `~\/.gemini\/GEMINI.md`, `~\/.gemini\/commands\/`, and `GEMINI.md` \/ `.gemini\/` in the current project - Importable item types: MCP servers, slash commands, subagents, skill directories, and instruction files (AGENTS.md \/ AGENTS.override.md \/ GEMINI.md \u2192 CLAUDE.md) - Items requiring extra review are flagged with \u26a0 and held back by `--yes`; they can be individually toggled in the terminal checkbox picker - Project-level config (from `.codex\/` or `.gemini\/` in the repo) is detected and listed but never auto-imported \u2014 project config can be authored by anyone with write access to that repo. Run `claude migrate` from a terminal to review project items individually - Items that cannot be mapped automatically (hooks, sandbox settings, named profiles, Gemini extensions) generate a `\/migrate-to-claude-code` fallback skill listing each one with guidance - On surfaces without an interactive picker, `\/migrate` asks Claude to summarize what was found and guide the user to run `--yes` or use the terminal - Path-traversal guards prevent importing files that escape the config directory (symlinks and `..` components are rejected) - Files exceeding the size limit are refused with `\"file exceeds MIGRATE_MAX_FILE_BYTES; refusing to load\"` **Evidence** Full migration subsystem \u2014 search for `\"Import config from another AI coding agent (Codex, Gemini CLI)\"` and `\"claude migrate [codex|gemini] [--dry-run] [--yes]\"`"}