Skip to content

feat: offer agent migration during install.sh and hermes setup #829

@teknium1

Description

@teknium1

Problem

Users switching from OpenClaw (or other agents) need their config, API keys, platform tokens, etc. migrated to Hermes. Currently this lives as an optional skill that requires a running agent — chicken-and-egg problem since migration brings over the keys needed to run the agent.

The previous proposal (#826) suggested a hermes migrate CLI subcommand, but that still requires Hermes to be installed first.

Proposal

Integrate migration detection into the existing install/setup flows so it happens naturally:

1. install.sh — post-install detection

After installing Hermes, the install script checks for known agent configs:

# At the end of install.sh, after successful install:
if [ -d "$HOME/.openclaw" ]; then
    echo ""
    echo "Detected OpenClaw installation at ~/.openclaw/"
    echo "Would you like to import your settings (API keys, platform configs, memories)?"
    read -p "Import from OpenClaw? [Y/n] " reply
    if [ "$reply" != "n" ] && [ "$reply" != "N" ]; then
        hermes setup --migrate-from openclaw
    fi
fi

Could also detect ~/.claude/, ~/.codex/ etc. for future migration paths.

2. hermes setup — interactive migration step

At the beginning of the setup wizard (before asking for API keys), auto-detect and offer migration:

# In hermes_cli/setup.py, at the start of run_setup_wizard():
from pathlib import Path

openclaw_dir = Path.home() / ".openclaw"
if openclaw_dir.exists():
    print("Detected OpenClaw installation at ~/.openclaw/")
    print("Hermes can import your API keys, platform configs, memories, and skills.")
    reply = input("Import from OpenClaw? [Y/n] ").strip().lower()
    if reply in ('', 'y', 'yes'):
        _run_openclaw_migration()
        print("Migration complete! Continuing with setup...")
        # Skip API key prompts if they were imported

Add a --migrate-from flag to hermes setup so install.sh can trigger it directly:

hermes setup --migrate-from openclaw

3. Migration logic

Reuse the existing migration script at optional-skills/migration/openclaw-migration/scripts/openclaw_to_hermes.py. It already handles 19 categories (API keys, platform tokens, model config, TTS, memories, skills, etc.) with 24 tests.

The setup integration should:

  • Run the migration with sensible defaults (no preset selection needed — just import everything)
  • Show a summary of what was imported
  • Skip API key / platform setup prompts for anything that was successfully migrated
  • Still allow the user to override/change imported values during the rest of setup

Benefits

  • Zero friction: migration happens naturally during first install
  • No chicken-and-egg: no API keys needed to run the migration
  • Extensible: easy to add detection for other agents (~/.claude/, ~/.codex/, etc.)
  • The existing migration script does all the heavy lifting — this is just a wrapper

Supersedes #826.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions