📦 surreal-sync — 技能工具

v1.2.1

[自动翻译] Data migration and synchronization to SurrealDB from MongoDB, PostgreSQL, MySQL, Neo4j, Kafka, and JSONL. Full and incremental CDC sync. Part of the s...

2· 575·0 当前·0 累计
by @24601 (Basit Mustafa)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/13
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's description, examples, and requirements are internally consistent with a CLI data-sync tool; it is instruction-only, asks for no unrelated environment credentials, and does not request elevated persistence — but exercise normal caution around how you install and pass database passwords.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.2.12026/2/22

surreal-sync v1.2.1 - No code or documentation changes detected in this release. - Version bump only; functionality remains the same as previous version.

无害

安装命令

点击复制
官方npx clawhub@latest install surreal-sync
🇨🇳 镜像加速npx clawhub@latest install surreal-sync --registry https://cn.longxiaskill.com

技能文档

Surreal-Sync is a CLI tool for migrating data from various database sources to SurrealDB with full and incremental synchronization via Change Data Capture (CDC).

Supported Sources

SourceFull SyncIncremental CDCMethod
MongoDBYesYesChange streams
MySQLYesYesTrigger-based CDC + sequence checkpoints
PostgreSQL (triggers)YesYesTrigger-based CDC + sequence checkpoints
PostgreSQL (wal2json)YesYesLogical replication with wal2json plugin
Neo4jYesYesTimestamp-based tracking
JSONL FilesYesN/ABatch import from JSON Lines
Apache KafkaYesYesConsumer subscriptions with deduplication

Quick Start

# Install surreal-sync (Rust binary)
cargo install surreal-sync

# Full sync from PostgreSQL (trigger-based) surreal-sync from postgres trigger-full \ --connection-string "postgresql://user:pass@localhost/mydb" \ --surreal-endpoint "http://localhost:8000" \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

# Incremental CDC from PostgreSQL (wal2json) surreal-sync from postgres wal2json \ --connection-string "postgresql://user:pass@localhost/mydb" \ --surreal-endpoint "http://localhost:8000" \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

# Full sync from MongoDB surreal-sync from mongo full \ --connection-string "mongodb://localhost:27017/mydb" \ --surreal-endpoint "http://localhost:8000" \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

# Batch import from JSONL surreal-sync from jsonl import \ --file data.jsonl \ --surreal-endpoint "http://localhost:8000" \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

# Consume from Kafka surreal-sync from kafka consume \ --bootstrap-servers "localhost:9092" \ --topic my-events \ --surreal-endpoint "http://localhost:8000" \ --surreal-username root \ --surreal-password root \ --to-namespace prod \ --to-database main

CLI Pattern

surreal-sync from   \
  --connection-string [CONNECTION STRING] \
  --surreal-endpoint [SURREAL ENDPOINT] \
  --surreal-username [SURREAL USERNAME] \
  --surreal-password [SURREAL PASSWORD] \
  --to-namespace  \
  --to-database 

Key Features

  • Automatic schema inference and SurrealDB table creation
  • Record ID mapping from source primary keys
  • Relationship extraction and graph edge creation
  • Configurable batch sizes and parallelism
  • Resumable sync with checkpoint tracking
  • Deduplication for Kafka consumers

Full Documentation

See the main skill's rule file for complete guidance:

数据来源:ClawHub ↗ · 中文优化:龙虾技能库