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.
Two ways to import
```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.
What gets imported
What stays archive-only
The provider copies these into the migration report for manual review, but does not load them into live OpenClaw config:
- Claude hooks
- Claude permissions and broad tool allowlists
- Claude environment defaults
CLAUDE.local.md.claude/rules/- Claude subagents under
.claude/agents/or~/.claude/agents/ - Claude Code caches, plans, and project history directories
- Claude Desktop extensions and OS-stored credentials
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.
Source selection
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.
Recommended flow
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](/docs/openclaw-docs/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.
Conflict handling
Apply refuses to continue when the plan reports conflicts (a file or config value already exists at the target).
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.
JSON output for automation
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.
Troubleshooting
Related
- [
openclaw migrate](/docs/openclaw-docs/cli/migrate: full CLI reference, plugin contract, and JSON shapes. - [Migration guide](/docs/openclaw-docs/install/migrating: all migration paths.
- [Migrating from Hermes](/docs/openclaw-docs/install/migrating-hermes: the other cross-system import path.
- [Onboarding](/docs/openclaw-docs/cli/onboard: wizard flow and non-interactive flags.
- [Doctor](/docs/openclaw-docs/gateway/doctor: post-migration health check.
- [Agent workspace](/docs/openclaw-docs/concepts/agent-workspace: where
AGENTS.md,USER.md, and skills live.