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

curlbash

v1.0.9

Published

轻量运维工具箱 — 一键测速 / 换源 / 配镜像

Readme

curlbash

轻量运维工具箱 — 一键测速 / 换源 / 配镜像

安装

npm install -g curlbash

安装完成后自动创建 ~/.curlbash/ 工作目录,包含 scripts/(bash 脚本)、data/(数据库)和 .env

初始化

curlbash init

交互式向导:设置端口、管理员账密。自动建库、注册脚本、生成 systemd 和 Caddy 配置。

启动

# 前台运行
curlbash serve

# systemd 服务
curlbash config systemd
sudo cp curlbash.service /etc/systemd/system/
sudo systemctl enable --now curlbash

浏览器打开 http://<IP>:3000 进入管理后台。

CLI 命令

服务管理

curlbash serve               # 启动服务
curlbash health [host:port]  # 健康检查

用户管理

curlbash user add <用户名> [--role admin|user]   # 创建用户(交互输密码)
curlbash user list                                # 列出用户 + 脚本权限
curlbash user passwd <用户名>                     # 重置密码
curlbash user grant <用户名> <脚本名>...           # 授权脚本
curlbash user revoke <用户名> <脚本名>...          # 撤销权限
curlbash user delete <用户名>                     # 删除用户

脚本管理

curlbash script add <脚本名> "<显示名>" ["描述"] [--grant=用户1,用户2]
curlbash script list                              # 列出所有脚本
curlbash script sync                              # 自动发现 scripts/ 目录新脚本

配置生成

curlbash config                                    # 查看配置
curlbash config caddy [域名] [端口]                 # 生成 Caddy 配置
curlbash config nginx [域名] [端口]                 # 生成 Nginx 配置
curlbash config systemd [域名] [端口]               # 生成 systemd 服务

目录结构

~/.curlbash/
├── scripts/          # bash 脚本
│   ├── login.sh      # 登录包装
│   ├── menu.sh       # 功能菜单
│   └── ...           # 运维脚本
├── data/
│   └── curlbash.db   # SQLite 数据库
└── .env              # 环境变量

工作流程

用户: curl -sL <host>:3000 | bash
  → 下载 login.sh → 输入账密 → POST /api/v1/auth/login → 获取 JWT
  → 下载 menu.sh → 菜单选择脚本
  → 下载脚本内容 → 临时文件 + /dev/tty → bash 执行
  → 脚本在用户本地机器运行(测的是客户端网速)

反向代理(可选)

example.com {
    reverse_proxy localhost:3000
}

卸载

kill $(lsof -ti :3000)      # 先停进程
npm uninstall -g curlbash   # 删包
rm -rf ~/.curlbash           # 删工作目录

字段名对照(CLI ↔ Web)

| CLI | Web 表单 | 说明 | |---|---|---| | <脚本名> | 脚本标识 (name) | 不含 .sh 后缀 | | <显示名> | 显示名称 (displayName) | 菜单中展示 | | <描述> | 描述 (description) | 功能说明 |