> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/nullclaw/nullclaw/llms.txt
> Use this file to discover all available pages before exploring further.

# nullclaw migrate

> Migrate memory and configuration from other AI assistant systems

The `nullclaw migrate` command imports data from other AI assistant systems, preserving your memory, conversations, and configuration.

## Supported Sources

### OpenClaw

Migrate from [OpenClaw](https://github.com/openclaw/openclaw) (TypeScript implementation):

```bash theme={null}
nullclaw migrate openclaw
```

## Usage

```bash theme={null}
# Dry run (show what would be imported)
nullclaw migrate openclaw --dry-run

# Import with custom source path
nullclaw migrate openclaw --source ~/openclaw-data

# Full import
nullclaw migrate openclaw
```

## Options

<ParamField path="--dry-run" type="boolean">
  Preview migration without making changes
</ParamField>

<ParamField path="--source" type="string">
  Custom source directory (default: `~/.openclaw`)
</ParamField>

## What Gets Migrated

### From OpenClaw

<Steps>
  <Step title="Configuration">
    * Provider credentials (API keys)
    * Model selection
    * Channel configuration
    * Security settings

    OpenClaw and NullClaw use the same config structure, so migration is 1:1.
  </Step>

  <Step title="Memory">
    * All stored memories
    * Conversation history
    * Memory categories (core, daily, conversation)
    * Timestamps and metadata

    Converted from OpenClaw's format to NullClaw's SQLite or markdown backend.
  </Step>

  <Step title="Identity">
    * IDENTITY.md (OpenClaw format)
    * Converted to NullClaw's identity format
  </Step>
</Steps>

## Migration Process

### Step 1: Dry Run

First, run a dry run to see what will be migrated:

```bash theme={null}
nullclaw migrate openclaw --dry-run
```

**Example output:**

```
Migration Preview (Dry Run)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Source: /Users/alice/.openclaw
Destination: /Users/alice/.nullclaw

Configuration:
  ✓ models.providers.openrouter
  ✓ agents.defaults.model
  ✓ channels.telegram (1 account)
  ✓ channels.discord (1 account)

Memory:
  ✓ 147 memories
  ✓ 23 conversations
  ✓ 5 core facts
  Total size: 2.3 MB

Identity:
  ✓ IDENTITY.md (1.2 KB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
No changes made (dry run)
Run without --dry-run to perform migration
```

### Step 2: Backup

Before migrating, back up your existing NullClaw data:

```bash theme={null}
cp -r ~/.nullclaw ~/.nullclaw.backup
```

### Step 3: Migrate

Run the migration:

```bash theme={null}
nullclaw migrate openclaw
```

**Example output:**

```
Migrating from OpenClaw...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[1/3] Migrating configuration...
  ✓ Imported provider config
  ✓ Imported channel config
  ✓ Merged with existing config

[2/3] Migrating memory...
  ✓ Converted 147 memories to SQLite
  ✓ Preserved timestamps and categories
  ✓ Created vector embeddings (147/147)

[3/3] Migrating identity...
  ✓ Converted IDENTITY.md

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Migration complete! ✓

Next steps:
  1. Verify: nullclaw doctor
  2. Test: nullclaw agent -m "Recall recent memories"
  3. Check: nullclaw status
```

### Step 4: Verify

Verify the migration:

```bash theme={null}
# Check configuration
nullclaw doctor

# Test memory recall
nullclaw agent -m "What do you remember about me?"

# Check status
nullclaw status
```

## Memory Format Conversion

OpenClaw stores memories in markdown files:

```markdown theme={null}
# Memory: core/name.md

Alice prefers to be called by her full name.

---
Timestamp: 2024-01-15T10:30:00Z
Category: core
```

NullClaw converts to SQLite:

```sql theme={null}
INSERT INTO memories (content, category, timestamp) VALUES (
  'Alice prefers to be called by her full name.',
  'core',
  '2024-01-15T10:30:00Z'
);
```

With vector embeddings:

```sql theme={null}
INSERT INTO memory_embeddings (memory_id, embedding) VALUES (
  1,
  BLOB(...) -- 1536-dim vector
);
```

## Config Merging

If you already have a NullClaw config, the migration:

1. Preserves your existing providers
2. Adds new providers from OpenClaw
3. Merges channel configurations
4. Does not overwrite existing channels

**Example:**

Existing NullClaw config:

```json theme={null}
{
  "models": {
    "providers": {
      "anthropic": {"api_key": "sk-ant-..."}
    }
  }
}
```

OpenClaw config:

```json theme={null}
{
  "models": {
    "providers": {
      "openrouter": {"api_key": "sk-or-..."}
    }
  }
}
```

Merged result:

```json theme={null}
{
  "models": {
    "providers": {
      "anthropic": {"api_key": "sk-ant-..."},
      "openrouter": {"api_key": "sk-or-..."}
    }
  }
}
```

## Troubleshooting

### Source directory not found

```
Error: Source directory not found: /Users/alice/.openclaw
```

**Fix**: Specify custom path:

```bash theme={null}
nullclaw migrate openclaw --source ~/path/to/openclaw
```

### Memory conversion failed

```
Error: Failed to convert memory: invalid timestamp
```

**Fix**: Check OpenClaw memory files for invalid data:

```bash theme={null}
# Find problematic files
grep -r "Timestamp:" ~/.openclaw/memory/
```

### Config merge conflict

```
Warning: Channel 'telegram.main' already exists, skipping
```

This is expected. The migration preserves your existing channels.

## Examples

### Full OpenClaw migration

```bash theme={null}
# 1. Dry run
nullclaw migrate openclaw --dry-run

# 2. Backup
cp -r ~/.nullclaw ~/.nullclaw.backup

# 3. Migrate
nullclaw migrate openclaw

# 4. Verify
nullclaw doctor
nullclaw agent -m "What memories do you have?"
```

### Migrate from custom location

```bash theme={null}
nullclaw migrate openclaw --source ~/backups/openclaw-2024-01-15
```

### Preview before migrating

```bash theme={null}
# See what would be imported
nullclaw migrate openclaw --dry-run > migration-preview.txt

# Review
cat migration-preview.txt

# Proceed if satisfied
nullclaw migrate openclaw
```

## See Also

* [Memory Configuration](/configuration/memory) - Configure memory backend
* [Doctor](/cli/doctor) - Verify migration
* [Onboard](/cli/onboard) - Initial setup
