Skip to content

feat(migrate): add picoclaw migrate command for OpenClaw workspace migration#33

Merged
yinwm merged 2 commits intosipeed:mainfrom
corylanou:issue-27-feat-add-picoclaw-migrate-command-for-openclaw-workspace-migration
Feb 12, 2026
Merged

feat(migrate): add picoclaw migrate command for OpenClaw workspace migration#33
yinwm merged 2 commits intosipeed:mainfrom
corylanou:issue-27-feat-add-picoclaw-migrate-command-for-openclaw-workspace-migration

Conversation

@corylanou
Copy link
Contributor

Summary

  • Add picoclaw migrate CLI command that detects and migrates OpenClaw workspace files and configuration to PicoClaw
  • Workspace markdown files (SOUL.md, AGENTS.md, USER.md, TOOLS.md, HEARTBEAT.md, memory/, skills/) are copied 1:1
  • Config keys are mapped from OpenClaw's camelCase JSON format to PicoClaw's snake_case format with provider/channel field mapping
  • Supports --dry-run, --refresh, --config-only, --workspace-only, --force flags
  • Existing PicoClaw files are never silently overwritten; .bak backups are created before overwrites
  • Supports OPENCLAW_HOME / PICOCLAW_HOME environment variable overrides

New Files

  • pkg/migrate/config.go — OpenClaw config parsing, camelCase-to-snake_case conversion, config field mapping
  • pkg/migrate/workspace.go — Workspace file migration planning (files + directories)
  • pkg/migrate/migrate.go — Core orchestration: Run, Plan, Execute, Confirm, PrintSummary
  • pkg/migrate/migrate_test.go — 15 table-driven tests covering config conversion, workspace planning, full migration, dry-run, edge cases

Test plan

  • go build ./... compiles cleanly
  • go test ./... — all 15 new tests pass, no regressions in existing tests
  • Security review: no hardcoded secrets, no path traversal, no exec.Command
  • Manual: create mock ~/.openclaw/ structure, run picoclaw migrate --dry-run
  • Manual: run picoclaw migrate --force and verify files copied correctly

Closes #27

🤖 Generated with Claude Code

corylanou and others added 2 commits February 11, 2026 12:48
…gration

Add a new `picoclaw migrate` CLI command that detects an existing OpenClaw
installation and migrates workspace files and configuration to PicoClaw.

Workspace markdown files (SOUL.md, AGENTS.md, USER.md, TOOLS.md, HEARTBEAT.md,
memory/, skills/) are copied 1:1. Config keys are mapped from OpenClaw's
camelCase JSON format to PicoClaw's snake_case format with provider and channel
field mapping.

Supports --dry-run, --refresh, --config-only, --workspace-only, --force flags.
Existing PicoClaw files are never silently overwritten; backups are created.

Closes sipeed#27

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@yinwm yinwm merged commit 167efc5 into sipeed:main Feb 12, 2026
emadomedher pushed a commit to emadomedher/picoclaw that referenced this pull request Feb 17, 2026
…w-migrate-command-for-openclaw-workspace-migration

feat(migrate): add picoclaw migrate command for OpenClaw workspace migration

Adds migrate command to migrate workspace and config from OpenClaw to PicoClaw.

- Migrates workspace files (SOUL.md, AGENTS.md, USER.md, TOOLS.md, HEARTBEAT.md, memory/, skills/)
- Converts config from camelCase (OpenClaw) to snake_case (PicoClaw) format
- Supports --dry-run, --refresh, --config-only, --workspace-only, --force flags
- Safety: backups (.bak), confirmation prompts, no silent overwrites

Closes sipeed#27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add picoclaw migrate command for OpenClaw workspace migration

2 participants