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

tmpbox.me

v1.0.5

Published

Official TmpBox.me uploader SDK and CLI for Node.js.

Downloads

588

Readme

tmpbox.me

Official Node.js SDK and CLI for uploading files to TmpBox.me.

  • No account required for guest uploads
  • Guest uploads up to 100MB
  • Logged-in users upload up to 500MB
  • Default expiration is 30 days
  • Supports CommonJS, ES Module, TypeScript and CLI

Installation

npm install tmpbox.me

Node.js 18+ is required.


Upload Limits

| Mode | Authentication | Max file size | Available TTL | | ----- | ---------------------------- | ------------: | ---------------------------------------------------- | | Guest | None | 100 MB | 1d, 7d, 30d (default) | | User | Username & Password or Token | 500 MB | 1d, 7d, 30d (default), 0 (Never expires) |


Quick Start (Guest)

No account or token is required.

If no authentication is provided, uploads automatically use Guest Mode.

import { uploadFile } from "tmpbox.me";

const result = await uploadFile("./video.mp4");

console.log(result.fullUrl);

CommonJS

const { uploadFile } = require("tmpbox.me");

const result = await uploadFile("./video.mp4");

console.log(result.fullUrl);

Guest uploads:

  • Maximum file size: 100MB
  • Default TTL: 30 days
  • Supported TTL:
    • 1d
    • 7d
    • 30d

Example:

import { uploadFile } from "tmpbox.me";

const result = await uploadFile("./photo.png", {
  ttl: "7d",
});

Login with Username & Password

Logged-in users can upload files up to 500MB.

import { uploadFile } from "tmpbox.me";

const result = await uploadFile("./movie.mp4", {
  username: "your_username",
  password: "your_password",
});

console.log(result.fullUrl);

Default TTL:

30d

Supported TTL:

  • 1d
  • 7d
  • 30d
  • 0 (Never expires)

Example:

import { uploadFile } from "tmpbox.me";

const result = await uploadFile("./backup.zip", {
  username: "your_username",
  password: "your_password",
  ttl: "0",
});

Upload with Access Token

If you already have an access token:

import { uploadFile } from "tmpbox.me";

const result = await uploadFile("./video.mp4", {
  token: "YOUR_ACCESS_TOKEN",
});

Upload Multiple Files

import { uploadFiles } from "tmpbox.me";

const results = await uploadFiles([
  "./image.png",
  "./video.mp4",
  "./archive.zip",
]);

console.log(results);

Upload Progress

import { uploadFile } from "tmpbox.me";

const result = await uploadFile("./video.mp4", {
  onProgress(progress) {
    console.log(progress.status);
    console.log(progress.progress + "%");
  },
});

Default Behavior

If ttl is omitted, the SDK automatically uses:

ttl: "30d";

If authentication is omitted, the SDK automatically uploads as a Guest.


CLI

Guest upload

tmpbox-upload ./video.mp4

Login upload

tmpbox-upload ./video.mp4 -u username -p password

Token upload

tmpbox-upload ./video.mp4 -t YOUR_TOKEN

Multiple files

tmpbox-upload ./a.zip ./b.mp4 ./c.pdf

JSON output

tmpbox-upload ./video.mp4 --json

Environment Variables

Username & Password

TMPBOX_USERNAME=your_username
TMPBOX_PASSWORD=your_password

Token

TMPBOX_TOKEN=your_access_token

Legacy variables are also supported:

FILESTORAGE_TOKEN=your_token
UPLOAD_TOKEN=your_token

API

uploadFile()

uploadFile(filePath: string, options?: UploadOptions): Promise<UploadResult>

Uploads a single file.


uploadFiles()

uploadFiles(files: string[], options?: UploadOptions): Promise<UploadResult[]>

Uploads multiple files.


login()

login(username: string, password: string): Promise<LoginResult>

Logs in and returns an access token.


Options

interface UploadOptions {
  token?: string;

  username?: string;

  password?: string;

  /**
   * Default: "30d"
   *
   * Guest:
   *  - "1d"
   *  - "7d"
   *  - "30d"
   *
   * User:
   *  - "1d"
   *  - "7d"
   *  - "30d"
   *  - "0" (Never expires)
   */
  ttl?: "1d" | "7d" | "30d" | "0";

  filename?: string;

  mimetype?: string;

  chunkSize?: number;

  wait?: boolean;

  timeoutMs?: number;

  pollIntervalMs?: number;

  onProgress?: (progress: UploadProgress) => void;
}

Features

  • Guest uploads without registration
  • Username & password authentication
  • Token authentication
  • Automatic retry
  • Automatic polling
  • Upload progress callback
  • CommonJS support
  • ES Module support
  • TypeScript definitions
  • CLI included

License

MIT