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

openclaw-csdn-restore

v1.0.0

Published

恢复 OpenClaw 配置 - 撤销 CSDN API 配置或恢复备份

Readme

openclaw-csdn-restore

恢复 OpenClaw 配置工具 - 撤销 CSDN API 配置或恢复备份

功能说明

当你使用 openclaw-csdn-apikey 配置了 CSDN 模型后,可以使用这个工具来:

  1. 恢复备份 - 将配置恢复到使用 openclaw-csdn-apikey 之前的状态
  2. 清理配置 - 仅删除 CSDN 相关配置,不恢复备份

快速开始

恢复最新备份

npx openclaw-csdn-restore

这会自动找到最新的备份文件并恢复。

仅清理 CSDN 配置

npx openclaw-csdn-restore clean

只删除 CSDN provider 配置,不恢复备份文件。

使用场景

场景 1: 测试后想恢复原配置

# 1. 配置 CSDN
npx openclaw-csdn-apikey sk-your-api-key

# 2. 测试使用...

# 3. 恢复原配置
npx openclaw-csdn-restore

场景 2: 只想移除 CSDN 配置

# 清理 CSDN 配置但保持其他修改
npx openclaw-csdn-restore clean

工作原理

恢复模式(默认)

  1. 扫描 ~/.openclaw/ 目录查找备份文件(*.backup-*
  2. 自动选择最新的备份
  3. 恢复以下文件:
    • openclaw.json
    • agents/main/agent/models.json

清理模式

  1. 从配置文件中删除 custom-models-csdn-net provider
  2. 清除相关的默认模型设置
  3. 保留其他所有配置不变

命令选项

| 命令 | 说明 | |------|------| | openclaw-csdn-restore | 恢复最新备份(默认) | | openclaw-csdn-restore clean | 只清理 CSDN 配置 |

输出示例

恢复备份

$ npx openclaw-csdn-restore

🔄 OpenClaw CSDN 配置恢复工具

模式: 恢复最新备份

📦 找到以下备份文件:

✓ openclaw.json 最新备份:
  /Users/username/.openclaw/openclaw.json.backup-1710308765432
  时间: 2026/3/13 11:06:05

✓ 已恢复 openclaw.json

✓ models.json 最新备份:
  /Users/username/.openclaw/agents/main/agent/models.json.backup-1710308765432
  时间: 2026/3/13 11:06:05

✓ 已恢复 models.json

✅ 配置已恢复到备份版本!

清理配置

$ npx openclaw-csdn-restore clean

🔄 OpenClaw CSDN 配置恢复工具

模式: 清理 CSDN 配置(不恢复备份)

✓ 从 openclaw.json 删除 CSDN provider
✓ 清除 CSDN 默认模型设置

✅ CSDN 配置已清理!

安全说明

  • ✅ 自动查找最新备份,无需手动指定
  • ✅ 只处理由 openclaw-csdn-apikey 创建的备份
  • ✅ 恢复前会显示备份文件信息
  • ✅ 清理模式只删除 CSDN 相关配置,不影响其他 provider

系统要求

  • Node.js >= 14.0.0
  • 已安装并配置 OpenClaw
  • 使用过 openclaw-csdn-apikey 创建了备份

相关工具

License

MIT