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

sfe-api-doc-generator

v1.0.4

Published

一个从 Sunlands 接口平台自动生成 API 接口文档的工具,支持提取接口的详细规范信息

Readme

接口文档生成器 (Sunlands API Doc Generator)

一个从 Sunlands 接口平台自动生成 API 接口文档的工具,支持提取接口的详细规范信息

🎯 项目目标

自动从 Sunlands 接口平台抓取接口信息,生成包含请求方式、入参、出参规范的 Markdown 格式文档

功能特性

  • 📝 API文档自动生成 (包含入参、出参规范)
  • 🔗 命令行参数支持 (直接指定模块URL)
  • 🏗️ Sunlands平台集成 (智能爬取接口数据)
  • 📋 Markdown格式文档 (完整接口规范)

快速开始

安装依赖

方式一: 最直接 (项目内使用)

npx sfe-api-doc-generator generate https://mars.sunlands.com/\#/project/745/module/4899

方式二:本地安装 (项目内使用)

# 在项目中本地安装
npm install sfe-api-doc-generator --save-dev

# npm scripts 配置docs指令
"docs": "sfe-api-docs",

# 使用 npm scripts
npm run docs generate https://mars.sunlands.com/\#/project/745/module/4899

🏗️ 项目架构

sfe-interface-tool/
├── config/                 # 配置文件目录
│   └── mock.config.json    # 模块URL配置
├── api-docs/               # 生成的API文档
├── utils/                  # 工具模块
│   ├── apiClient.js        # 平台API客户端
│   └── puppeteerLogin.js   # 自动登录认证
├── generateDocs.js         # API文档生成脚本
└── package.json            # 项目配置

🔧 核心技术栈

  • Puppeteer - 自动化登录和数据爬取
  • Axios - HTTP 客户端
  • Markdown - 文档格式输出

📋 使用场景

  1. API文档: 自动生成接口规范文档供团队查阅
  2. 接口联调: 生成标准化的接口文档规范

🔐 认证说明

系统使用企业微信扫码登录方式进行身份认证,支持会话缓存避免重复登录。

📄 许可证

MIT License - 可用于商业和个人项目