npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@clawmover/cli

v0.1.0

Published

Backup, restore, and migrate OpenClaw data

Readme

@clawmover/cli

Command-line tool for OpenClaw data backup and recovery.

Features

  • 🔄 Auto Backup: Backup OpenClaw data to remote servers
  • 📥 Data Recovery: Quickly restore data from server to local
  • 🔒 Data Encryption: All backup data encrypted with data-secret-key
  • Incremental Backup: Restic-based incremental backup saves storage
  • 🏷️ Tag Management: Organize and filter backups with tags
  • ⚖️ Conflict Handling: Multiple strategies for file conflicts
  • 📊 Progress Display: Real-time backup and restore progress
  • 🔍 Detailed Logs: Complete operation log records

Installation

npm install -g @clawmover/cli

Or install from source:

git clone https://github.com/clawmover/clawmover-cli.git
cd clawmover-cli
npm install
npm run build
npm link

Configuration

The tool automatically reads OpenClaw config file. You can also override via command-line options:

# Show config file path
openclaw config file

Usage

Backup Data

Basic backup command:

clawmover backup

Specify instance ID and key:

clawmover backup --instance-id your-instance-id --data-secret-key your-secret-key

Advanced options:

clawmover backup \
  --instance-id your-instance-id \
  --data-secret-key your-secret-key \
  --tags production,daily \
  --conflict-strategy smart \
  --skip-temp \
  --skip-cache \
  --log-level debug

Options:

  • --instance-id <id>: Instance ID (override config file)
  • --data-secret-key <key>: Data secret key (override config file)
  • --tags <tags>: Comma-separated tag list
  • --conflict-strategy <strategy>: Conflict strategy (smart|interactive|overwrite), default: smart
  • --skip-temp: Skip temporary files
  • --skip-cache: Skip cache files
  • --storage-path <path>: Custom storage path
  • --log-level <level>: Log level (debug|info|warn|error)

Restore Data

Basic restore command:

clawmover restore

Specify snapshot ID:

clawmover restore --snapshot-id abc123

Filter by tags:

clawmover restore --tags core,imessage-db

Advanced options:

clawmover restore \
  --instance-id your-instance-id \
  --data-secret-key your-secret-key \
  --snapshot-id abc123 \
  --tags core \
  --conflict-strategy interactive \
  --target-path /tmp/restore \
  --log-level info

Options:

  • --instance-id <id>: Instance ID (override config file)
  • --data-secret-key <key>: Data secret key (override config file)
  • --snapshot-id <id>: Snapshot ID to restore (default: latest)
  • --tags <tags>: Comma-separated tags to filter snapshots
  • --conflict-strategy <strategy>: Conflict strategy (smart|interactive|overwrite), default: smart
  • --target-path <path>: Target directory for restoration
  • --log-level <level>: Log level (debug|info|warn|error)

Conflict Handling Strategies

Smart (Recommended)

  • Config files: Ask user for decision
  • Database: Auto backup old version
  • Attachments: Rename local file
  • Regular files: Compare modification time, keep newer

Interactive

Ask user for each conflict:

  • Backup existing file and overwrite
  • Rename existing file
  • Skip this file
  • Overwrite directly

Overwrite

Overwrite all conflicting files without backup

Backup Plan

The tool automatically generates backup plan with these data types:

  1. Core Data (Required)

    • OpenClaw core config and data
    • Tag: core
  2. iMessage Database (Optional)

    • If imessageDb is configured
    • Tags: imessage-db, core
  3. iMessage Attachments (Optional)

    • If imessageAttachments is configured
    • Tags: imessage-attachments, core
  4. Sandbox Data (Optional)

    • Sandbox environment data
    • Tag: sandbox
  5. Cache Data (Optional)

    • Application cache
    • Tag: cache
  6. Temporary Files (Optional)

    • Temporary files
    • Tag: temp

Tag System

Use tags to organize and filter backups:

# Create backup with tags
clawmover backup --tags production,daily

# Restore specific tagged data
clawmover restore --tags production

# List all backups for an instance
clawmover list --instance-id your-instance-id

Auto-added tags:

  • instance:<instanceId>: Instance ID
  • date:<YYYY-MM-DD>: Backup date

Logging and Debugging

Set log level:

# Verbose debug info
clawmover backup --log-level debug

# Errors only
clawmover backup --log-level error

Log file is saved to ./logs/clawmover.log by default.

Development

Project Structure

@clawmover/cli/
├── src/
│   ├── commands/          # Command execution layer
│   ├── services/          # Core service layer
│   ├── integrations/      # External integration layer
│   ├── system/            # System service layer
│   ├── types/             # Type definitions
│   ├── utils/             # Utility functions
│   └── index.ts           # Entry point
├── tests/                 # Test files
├── package.json
├── tsconfig.json
└── README.md

Build

npm run build

Test

# Run all tests
npm test

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage

Code Quality

# Lint
npm run lint

# Auto fix
npm run lint:fix

# Format code
npm run format

Troubleshooting

Backup Failed

  1. Check network connection
  2. Verify data-secret-key is correct
  3. Check log file for detailed error info

Restore Failed

  1. Confirm snapshot ID exists
  2. Check target directory permissions
  3. Verify data-secret-key matches the backup

OpenClaw Config Not Found

Run this command to check config file location:

openclaw config file

License

MIT

Support

For issues or suggestions, visit:

  • GitHub Issues: https://github.com/clawmover/clawmover-cli/issues
  • Documentation: https://github.com/clawmover/clawmover-cli#readme