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

ali-oss-upload-cli

v2.3.0

Published

A command line tool for transferring local files to Ali OSS, supports integration into CI environments.

Readme

Ali OSS Upload CLI

A simple and robust CLI for uploading files or directories to Alibaba Cloud OSS.

Features

  • Upload entire directories or specific files.
  • Filter files using glob patterns.
  • Configure via CLI flags or ".env" file.
  • Atomic uploads for entry files (like index.html) to prevent deployment inconsistencies.
  • Adjustable request timeout for large files.

Installation

Install locally as a development dependency:

npm install --save-dev ali-oss-upload-cli

Or install globally to use from anywhere:

npm install -g ali-oss-upload-cli

Configuration

Create a .env file in your project root:

# .env
OSS_REGION=your-oss-region
OSS_BUCKET=your-bucket-name
OSS_KEY=your-access-key-id
OSS_SECRET=your-access-key-secret

Remember to add .env to your .gitignore file.

Usage

oss-upload <local-path> -o <remote-path> [options]
  • <local-path>: The local file or directory to upload.
  • -o, --output <remote-path>: Required. The destination path (prefix) in your OSS bucket.

Options

| Flag | Description | Default | |---|---|---| | -o, --output <path> | Required. Remote destination path (prefix). | — | | --atomic-entry <glob> | Glob pattern for entry files to upload atomically. | null | | --filter <pattern> | Glob pattern to filter which files to upload. | **/* | | --region <region> | OSS region. Overrides .env. | OSS_REGION | | --bucket <name> | OSS bucket name. Overrides .env. | OSS_BUCKET | | --key <id> | Access Key ID. Overrides .env. | OSS_KEY | | --secret <secret> | Access Key Secret. Overrides .env. | OSS_SECRET | | --timeout <ms> | Request timeout in milliseconds. | 60000 | | --envfile <path> | Path to a custom environment file. | .env | | -h, --help | Display the help menu. | — | | -v, --version | Display the tool version. | — |


Examples

1. Upload a build directory

# Uploads the entire 'dist' directory to the '/static' folder in your bucket
oss-upload dist -o /static

2. Upload only specific file types

# Upload only .js files from the 'dist' directory
oss-upload dist -o /assets/js --filter "**/*.js"

3. Atomic Upload for a Single-Page App (SPA)

To prevent users from experiencing a broken site during deployment, you can use atomic uploads. This ensures that your index.html is only updated after all its new JS and CSS assets have been successfully uploaded.

# All assets are uploaded first, then index.html is updated atomically.
oss-upload dist -o / --atomic-entry "index.html"

This is the recommended way to deploy web applications.

4. Use with CI/CD

Provide credentials directly as flags, ignoring any .env file.

oss-upload dist -o / \
  --region oss-cn-hangzhou \
  --bucket my-app-bucket \
  --key $OSS_ACCESS_KEY_ID \
  --secret $OSS_ACCESS_KEY_SECRET

Environment Variables

The tool will automatically use the following variables from your .env file:

  • OSS_REGION
  • OSS_BUCKET
  • OSS_KEY
  • OSS_SECRET

CLI flags always take precedence over environment variables.

License

MIT