docs/install/migrating-claude.md
OpenClaw imports local Claude state through the bundled Claude migration provider. The provider previews every item before changing state, redacts secrets in plans and reports, and creates a verified backup before apply.
<Note> Onboarding imports require a fresh OpenClaw setup. If you already have local OpenClaw state, reset config, credentials, sessions, and the workspace first, or use `openclaw migrate` directly with `--overwrite` after reviewing the plan. </Note>```bash
openclaw onboard --flow import
```
Or point at a specific source:
```bash
openclaw onboard --import-from claude --import-source ~/.claude
```
```bash
openclaw migrate claude --dry-run
openclaw migrate apply claude --yes
```
Add `--from <path>` to import a specific Claude Code home or project root.
The provider copies these into the migration report for manual review, but does not load them into live OpenClaw config:
CLAUDE.local.md.claude/rules/.claude/agents/ or ~/.claude/agents/OpenClaw refuses to execute hooks, trust permission allowlists, or decode opaque OAuth and Desktop credential state automatically. Move what you need by hand after reviewing the archive.
Without --from, OpenClaw inspects the default Claude Code home at ~/.claude, the sampled Claude Code ~/.claude.json state file, and the Claude Desktop MCP config on macOS.
When --from points at a project root, OpenClaw imports only that project's Claude files such as CLAUDE.md, .claude/settings.json, .claude/commands/, .claude/skills/, and .mcp.json. It does not read your global Claude home during a project-root import.
The plan lists everything that will change, including conflicts, skipped items, and sensitive values redacted from nested MCP `env` or `headers` fields.
OpenClaw creates and verifies a backup before applying.
[Doctor](/gateway/doctor) checks for config or state issues after the import.
Confirm the gateway is healthy and your imported instructions, MCP servers, and skills are loaded.
Apply refuses to continue when the plan reports conflicts (a file or config value already exists at the target).
<Warning> Rerun with `--overwrite` only when replacing the existing target is intentional. Providers may still write item-level backups for overwritten files in the migration report directory. </Warning>For a fresh OpenClaw install, conflicts are unusual. They typically appear when you re-run the import on a setup that already has user edits.
openclaw migrate claude --dry-run --json
openclaw migrate apply claude --json --yes
With --json and no --yes, apply prints the plan and does not mutate state. This is the safest mode for CI and shared scripts.
openclaw migrate: full CLI reference, plugin contract, and JSON shapes.AGENTS.md, USER.md, and skills live.