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 🙏

© 2025 – Pkg Stats / Ryan Hefner

yapi_backup_and_recover

v0.1.2

Published

yapi 备份恢复mcp

Readme

项目说明

本项目基于 Node.js 开发,要求 Node.js 版本为 20.0 或更高。

使用方法

  1. 确保已安装 Node.js (>=20.0)。
  2. 克隆项目到本地。
  3. 安装依赖:npm install
  4. 根据需求运行相关脚本或命令。

注意事项

  • 请确保 Node.js 版本符合要求,否则可能导致运行异常。
  • 如有问题,请提交 Issue 或联系维护者。

YAPI 备份与恢复工具

简介

本工具是一个基于 TypeScript 的 YAPI 数据备份与恢复工具,支持通过命令行或 MCP 协议进行操作。它提供了备份 YAPI 接口数据到本地以及从本地恢复数据到 YAPI 的功能。

功能

  1. 备份工具

    • 将指定项目的接口数据备份到本地。
    • 工具名称:backupTool
    • 输入参数:
      • projectId (字符串): 需要备份的项目 ID。
  2. 恢复工具

    • 将本地备份的接口数据恢复到指定的 YAPI 项目。
    • 工具名称:recoveryTool
    • 输入参数:
      • projectId (字符串): 数据恢复到的目标项目 ID。
      • interfaceJsonPath (字符串): 接口 JSON 文件路径。
      • detailJsonPath (字符串): 详细接口 JSON 文件路径。

使用方法

环境要求

  • Node.js 版本 >= 20.0

安装依赖

npm install

运行工具

备份数据

运行以下命令备份指定项目的接口数据:

node ./index.js --token=<你的cookie> --domain=<你的域名> --outputDir=<输出目录> backupTool --projectId=<项目ID>

恢复数据

运行以下命令将本地备份的数据恢复到指定项目:

node ./index.js --token=<你的cookie> --domain=<你的域名> --outputDir=<输出目录> recoveryTool --projectId=<项目ID> --interfaceJsonPath=<接口JSON路径> --detailJsonPath=<详细接口JSON路径>

注意事项

  1. 确保提供的 cookiedomain 参数正确。
  2. 输出目录 (outputDir) 必须存在,且具有写入权限。
  3. 恢复数据时,请确保 JSON 文件路径正确无误。

开发

本地开发

安装依赖:

npm install

启动开发模式:

npm run watch

构建项目:

npm run build

调试

可以使用 MCP Inspector 工具调试 MCP 服务:

npm run inspector

反馈与支持

如有问题,请提交 Issue 或联系维护者。