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

1panel-rocket-cli-fork

v1.0.1

Published

A CLI tool for deploy static website to 1Panel.

Readme

1Panel Rocket CLI Fork

🚀 一个用于将静态网站部署到 1Panel 的命令行工具。

功能特性

  • 🚀 快速部署静态网站到 1Panel
  • 🔐 支持 API 密钥认证
  • 📁 递归上传目录和文件
  • 🔄 自动重试机制
  • 🌐 支持多域名网站
  • 📊 详细的部署统计信息
  • 🔧 支持 1Panel API v1 和 v2 版本

安装

npm install -g 1panel-rocket-cli-fork

或者使用 pnpm:

pnpm add -g 1panel-rocket-cli-fork

使用方法

基本用法

1panel-rocket-fork -p ./dist -d example.com

命令行选项

Options:
  -e, --baseUrl <baseUrl>       1Panel API 的基础 URL
  -a, --apiKey <apiKey>         1Panel API 的 API 密钥
  -v, --apiVersion <version>    API 版本 (v1 或 v2,默认: v1)
  -p, --path <path>             静态网站构建目录的路径 (必需)
  -d, --domain <domain>         网站域名
  -y, --yes                     跳过所有提示并使用默认值
  -h, --help                    显示帮助信息
  -V, --version                 显示版本信息

环境变量

你也可以通过环境变量来配置:

export ONEPANEL_BASE_URL="https://your-1panel-server.com"
export ONEPANEL_API_KEY="your-api-key"
export ONEPANEL_API_VERSION="v2"  # 可选,默认为 v1

API 版本支持

1Panel Rocket CLI 现在支持 1Panel API 的 v1 和 v2 版本:

  • v1: 原始 API 版本,向后兼容
  • v2: 新版本 API,可能包含新的功能和改进

选择 API 版本

# 使用 v1 API (默认)
1panel-rocket-fork -p ./dist -d example.com

# 使用 v2 API
1panel-rocket-fork -p ./dist -d example.com -v v2

# 通过环境变量设置
export ONEPANEL_API_VERSION="v2"
1panel-rocket-fork -p ./dist -d example.com

版本差异

| 功能 | v1 | v2 | |------|----|----| | 网站创建 | ✅ | ✅ | | 网站列表 | ✅ | ✅ | | 文件上传 | ✅ | ✅ | | 响应格式 | 标准格式 | 兼容格式 |

示例

部署到现有网站

1panel-rocket-fork -p ./dist -d example.com

创建新网站并部署

1panel-rocket-fork -p ./dist -d new-example.com

使用 v2 API 部署

1panel-rocket-fork -p ./dist -d example.com -v v2

跳过确认提示

1panel-rocket-fork -p ./dist -d example.com -y

配置

1Panel 服务器配置

  1. 在 1Panel 中启用 API 功能
  2. 生成 API 密钥
  3. 确保服务器可以通过网络访问

API 密钥权限

API 密钥需要以下权限:

  • 网站管理
  • 文件管理
  • 系统访问

故障排除

常见问题

  1. 认证失败: 检查 API 密钥是否正确
  2. 网络错误: 确认 1Panel 服务器地址可访问
  3. 权限不足: 检查 API 密钥权限设置
  4. API 版本不兼容: 确认使用的 API 版本与服务器版本匹配

调试模式

启用详细日志:

DEBUG=* 1panel-rocket -p ./dist -d example.com

开发

本地开发

git clone https://github.com/your-repo/1panel-rocket-cli.git
cd 1panel-rocket-cli
pnpm install
pnpm dev

构建

pnpm build

贡献

欢迎提交 Issue 和 Pull Request!

许可证

MIT License