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

vplist-node

v1.0.0

Published

Video list parser

Readme

vplist

TypeScript 编写的 AList API 客户端,支持登录认证、文件列表、上传下载、搜索及基本文件操作。

功能

  • 登录认证(支持账号密码或直接传入 Token)
  • 列出目录文件
  • 获取文件信息与下载地址
  • 上传文件(带进度回调)
  • 创建/删除/重命名/移动/复制文件
  • 搜索文件
  • TypeScript 类型定义完整

安装

npm install vplist
# 或
pnpm add vplist

快速开始

import { AListClient } from 'vplist'

const alist = new AListClient({
  baseURL: 'http://localhost:5244',
  username: 'admin',
  password: 'your-password',
})

// 登录(会自动保存 token)
await alist.login()

// 列出目录
const result = await alist.list('/')
console.log(result.content)

// 获取文件下载地址
const url = await alist.downloadUrl('/video/test.mp4')
console.log(url)

// 上传文件
await alist.upload('./local.mp4', '/alist/test.mp4', (progress) => {
  console.log(`上传进度:${(progress * 100).toFixed(1)}%`)
})

API

new AListClient(options)

interface AListClientOptions {
  baseURL: string           // AList 服务地址,如 http://localhost:5244
  username?: string         // 登录用户名
  password?: string         // 登录密码
  clientId?: string         // 稳定的客户端 ID(可选)
  timeout?: number          // 请求超时时间,默认 30000ms
  token?: string            // 已有的 token,跳过登录
}

方法列表

| 方法 | 说明 | |------|------| | login() | 使用配置的用户名密码登录 | | setToken(token) | 手动设置 token | | getToken() | 获取当前 token | | me() | 获取当前登录用户信息 | | list(path \| options) | 获取目录文件列表,支持分页 | | get(filePath) | 获取单个文件/目录信息 | | mkdir(dirPath) | 创建目录 | | remove(dir, names) | 删除目录下的多个文件 | | removeFile(filePath) | 删除单个文件(便捷方法) | | rename(filePath, name) | 重命名文件/目录 | | move(srcDir, dstDir, names) | 移动文件 | | copy(srcDir, dstDir, names) | 复制文件 | | upload(localFile, remotePath, onProgress?) | 上传文件,可选进度回调 | | downloadInfo(filePath) | 获取文件下载详情 | | downloadUrl(filePath) | 获取文件下载直链 | | search(parent, keywords, options?) | 搜索文件 |

AListError

所有请求失败会抛出 AListError,包含 code(AList 返回的错误码)和 response(原始响应体)。

开发

# 安装依赖
npm install

# 运行示例(需要本地有运行中的 AList 服务)
npm run dev

# 构建(输出 dist/,含 CJS 和 ESM)
npm run build

许可证

ISC