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

@spreading/docuo

v1.3.0

Published

Docuo 文档系统的命令行工具,用于本地开发、预览和管理文档项目。

Readme

Docuo CLI

Docuo 文档系统的命令行工具,用于本地开发、预览和管理文档项目。

本地调试

在文档项目目录中直接使用 Node.js 执行 CLI:

# 进入你的文档项目目录
cd your-docs-project

# 执行 dev 命令
node /path/to/cli/src/index.js dev

# 执行 build 命令
node /path/to/cli/src/index.js build

# 其他命令同理
node /path/to/cli/src/index.js <command> [options]

示例(在 site-template/docs 目录下调试):

cd site-template/docs
node ../../cli/src/index.js dev

全局安装使用

npm install -g @spreading/docuo

安装后可直接使用 docuo 命令。

命令说明

dev - 本地开发预览

启动本地开发服务器,支持热重载。

docuo dev [--port <port>] [--nm] [--en|--zh]

| 参数 | 说明 | |------|------| | --port | 指定端口号(默认自动检测可用端口) | | --nm | 使用官方 npm 源(而非中国镜像) | | --en | 使用英文配置文件 (docuo.config.en.json) | | --zh | 使用中文配置文件 (docuo.config.zh.json) |

build - 本地构建

构建文档站点。

docuo build [--nm] [--en|--zh]

| 参数 | 说明 | |------|------| | --nm | 使用官方 npm 源 | | --en | 使用英文配置构建 (docuo.config.en.json) | | --zh | 使用中文配置构建 (docuo.config.zh.json) |

clear - 清理本地缓存

清理 ~/.docuo 目录下的模板缓存。

docuo clear

instance - 文档实例管理

创建或删除文档实例。

docuo instance --create <instance_id>
docuo instance --delete <instance_id>

version - 版本管理

创建或删除文档版本。

docuo version --create <version> [--instance <instance_id>]
docuo version --delete <version> [--instance <instance_id>]

locale - 语言管理

添加或移除文档语言。

docuo locale --add <locale>
docuo locale --remove <locale>

gen-openapi-docs (god) - 生成 OpenAPI 文档

从 OpenAPI 规范文件生成 MDX 文档。

docuo gen-openapi-docs
# 或使用别名
docuo god

clean-openapi-docs (cod) - 清理 OpenAPI 文档

清理生成的 OpenAPI MDX 文件。

docuo clean-openapi-docs
# 或使用别名
docuo cod

工作原理

CLI 会将模板文件缓存到 ~/.docuo/<项目名>-docuo-template/ 目录,并将你的文档项目复制到该目录下运行。文件变更会自动同步并触发热重载。

发布到 npm

前置条件

  1. 注册 npmjs.com 账号
  2. 确保账号有 @spreading 组织的发布权限

发布步骤

# 进入 cli 目录
cd cli

# 登录 npm(首次发布或 token 过期时需要)
npm login

# 更新版本号(选择其一)
npm version patch  # 修订版本 1.2.0 -> 1.2.1
npm version minor  # 次版本 1.2.0 -> 1.3.0
npm version major  # 主版本 1.2.0 -> 2.0.0

# 发布
npm publish

注意事项

  • 包名为 @spreading/docuo,是 scoped 包,已配置 "access": "public"
  • 发布前确保 package.json 中的版本号已更新
  • 如需使用淘宝镜像安装依赖但发布到官方源,发布时无需额外配置(已在 publishConfig 中指定官方源)