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

qnbot

v1.0.5

Published

七牛云上传文件命令行工具,部署静态资源工具

Downloads

15

Readme

qnbot

轻量的七牛云命令行工具

可用于简单的文件上传、部署前端开发静态资源。

安装

全局安装

npm install -g qnbot

配置

配置文件为如下格式

| 参数 | 说明 | 类型 | | ---------- | -------------------------------------- | ------ | | accessKey | 七牛后台获取的 accessKey | String | | secretKey | 七牛后台获取的 secretKey | String | | bucketList | 需要管理的桶的列表 | Array | | name | 桶名称,需要和七牛桶名称一样 | String | | baseUrl | 上传成功后输出在命令行的链接前缀,可选 | String | | cmdName | 命令行桶名称别名,用于缩短上传命令 | String |

{
  "accessKey": "",
  "secretKey": "",
  "bucketList": [
    {
      "name": "name",
      "baseUrl": "http://test.com/",
      "cmdName": "test"
    }
  ]
}

配置文件分为全局配置与本地配置,可通过

qnbot config

获取配置信息

The path of global config:
/home/ghost/.config/qnbot.json

The path of current config:
Current config not found

qn bot will use current config first

qnbot 配置文件名为qnbot.json

可通过修改 global config 路径下的文件添加全局配置,也可在当前目录下建立配置文件

当前目录的配置会被优先使用

上传文件

qnbot upload main dir

将 dir 目录下的文件递归上传到名称或者别名为 main 的桶中,dir 目录对应桶的根目录

文件上传前会做 hash 运算判断桶中文件是否一致,不一致或桶中无该文件才上传,并会覆盖已有文件

上传文件钩子

qnbot 会在当前目录寻找 qn.hook.js

function before() {
  console.log('before')
}

function after(res) {
  console.log('after')
  console.log(res)
}

module.exports = {
  before,
  after
}

after 参数为成功上传的文件列表对象数组,对象含有参数

  • file 文件路径
  • url 成功上传后的下载路径(配置 baseUrl 后有效)

文件 hash 重命名

上传的文件根据文件内容哈希值命名,可以解决一些缓存问题,qnbot 可以生成简单的 hash 文件名

qnbot hash dir

将会递归把 dir 目录中所有文件按文件内容计算 sh1 并取前 10 位作为文件名

比如 mian.js -> cbf30b51f4.js