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

nodebbs

v0.4.1

Published

NodeBBS 论坛系统专业运维工具

Readme

NodeBBS CLI

NodeBBS 论坛系统专业运维工具

oclif Version

📖 简介

NodeBBS CLI 是一个专为全栈开发者设计的命令行工具,用于简化 NodeBBS 项目的开发、部署和管理流程。它能够自动识别 源码项目纯净镜像部署 两种场景,并提供开箱即用的 Docker 容器管理能力。

特性

  • 交互式菜单 - 支持键盘导航的可视化命令选择
  • 🧠 智能识别 - 自动检测源码模式或镜像模式
  • 🔄 平滑升级 - 一个命令完成更新(自动选择重建或拉取镜像)
  • 🎯 全栈友好 - 命令设计贴近开发者思维
  • 📊 实时日志 - 方便查看各服务日志
  • 💾 数据库管理 - 内置数据库迁移和管理工具
  • 🌐 内置模板 - 无需本地配置文件即可使用

📦 安装

# 使用 npm
npm install -g nodebbs

# 使用 pnpm
pnpm add -g nodebbs

# 使用 yarn
yarn global add nodebbs

或者直接使用 npx(推荐):

# 进入交互式菜单(推荐)
npx nodebbs

# 运行特定命令
npx nodebbs [command]

🚀 快速开始

npx nodebbs
  • start: 开始部署(首次使用推荐选择此项)
  • upgrade: 升级并重启(自动检测更新策略)

📚 部署模式

CLI 会自动根据当前目录内容判断部署模式:

  1. 源码模式 (Source Mode)

    • 检测到 package.json
    • 行为:使用本地源码执行 docker build 构建镜像。
    • 适用:开发环境、二次开发。
  2. 镜像模式 (Image Mode)

    • 未检测到源码。
    • 行为:直接从远程仓库拉取预构建镜像。
    • 适用:生产环境部署、快速体验。
    • 配置:首次启动时会提示输入镜像版本(默认为 latest),并自动写入 .env

🛠️ 常用命令

$ nodebbs
? 选择命令:
❯ start         启动服务
  stop          停止服务
  restart       重启服务
  upgrade       升级服务
  status        查看服务状态
  logs          查看服务日志  [+]
  db            数据库操作 (种子数据, 重置等)  [+]
  backup        备份数据 (数据库, 上传文件等)  [+]
  import        导入/恢复数据  [+]
  clean         清理 Docker 缓存和残留资源
  shell         进入容器终端  [+]
  pack          生成离线部署包
  ❌ 退出

命令说明

| 命令 | 说明 | |------|---------| | start | 启动服务(根据当前配置环境)| | stop | 停止所有服务 | | restart | 重启服务(相当于 docker compose up --force-recreate)| | upgrade | 升级服务(拉取最新 Docker 镜像或重新构建本地镜像)| | status | 查看所有容器的运行状态和健康检查结果 | | logs | 查看服务日志(支持选择特定服务 API/Web/DB/Redis)| | db | 数据库操作:种子数据 (seed)、重置 (reset) 等 | | backup | 备份数据:• 数据库 (db)• 上传文件 (uploads)• 一键全部备份 (all) | | import | 恢复数据:• 数据库 (db)• 上传文件 (uploads)• 一键全部恢复 (all) | | pack | 生成离线部署包(仅限源码模式),方便在无网环境部署 | | clean | 清理工具(删除未使用镜像、容器、卷,释放磁盘空间)| | shell | 进入容器终端进行调试(支持选择特定服务)|

离线服务器部署

  1. 在开发机打包

    注意:此命令需要在 源码模式 下运行(项目根目录包含 package.json)。

# 生成离线包
npx nodebbs pack
  1. 上传到服务器: 将 nodebbs-offline.tar.gz 上传到目标服务器。

  2. 在服务器部署

# 解压
tar -xzf nodebbs-offline.tar.gz

# 配置环境变量
cp .env.example .env
vi .env

# 一键安装启动
./install.sh

⚙️ 环境配置

支持的环境

  • production - 生产环境(推荐,启用资源限制与安全配置)
  • lowmem - 低配环境(适用于 1C2G 服务器)
  • default - 默认环境(无资源限制,适用于开发或高配服务器)

环境变量

CLI 首次运行时会引导生成 .env 文件。 在 镜像模式 下,会额外生成:

API_IMAGE=ghcr.io/aiprojecthub/nodebbs-api:latest
WEB_IMAGE=ghcr.io/aiprojecthub/nodebbs-web:latest

如需升级至特定版本,修改 .env 中的版本号后运行 nodebbs upgrade 即可。

🔗 相关链接


Made with ❤️ by NodeBBS Team