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

@utkarshx/r36-tic80-portal-cli

v1.0.0

Published

CLI for managing TIC-80 game assets in an R2-backed worker.

Readme

R36 TIC-80 Portal CLI (Node.js)

This CLI is the PC-side tool for:

  • uploading .tic / .tic80 files to the R2-backed Worker API
  • listing your stored builds
  • cleaning stale versions from a prefix

It is designed for local use and EmuELEC packaging workflows (upload from Windows/WSL, download on-device through the port app).

Defaults

  • Built-in worker endpoint: https://r36-tic80-portal-api.arrowai.workers.dev
  • --api is optional and falls back to the built-in default.
  • Upload token can be passed via:
    • --token
    • WORKER_UPLOAD_TOKEN env var
    • interactive prompt (when run in a terminal)

Setup

cd /mnt/d/videogames/r36-tic80-portal/tools/portal-cli
npm install

Authentication behavior

For upload and clean, token is required.

  • If --token is omitted, CLI checks WORKER_UPLOAD_TOKEN.
  • If neither exists, it prompts:
Upload token:

--token always takes precedence over env and prompt.

Commands

1) List

List all supported game files in a prefix (default: games):

node cli.js list --path games --exts tic,tic80

Optional:

  • --api <url> override default worker URL
  • --cursor <next-cursor> for pagination
  • --limit <n> max items per page

You can also pass --prefix instead of --path for list.

2) Upload one file

node cli.js upload --file ./mygame.tic --token 123456

Optional key override:

node cli.js upload --file ./mygame.tic --key games/mygame.tic80

--api is optional in all upload cases.

3) Upload folder

node cli.js upload \
  --dir ./rom-folder \
  --path games \
  --exts "tic,tic80,zip" \
  --token 123456

4) Sync mode (directory upload behavior)

--sync-mode controls how local paths map into object keys:

  • preserve (default): keep local folders
    • zone/game.tic -> games/zone/game.tic
  • flat: only upload by filename
    • zone/game.tic -> games/game.tic
  • per-folder: keep only first folder under upload root in key structure
    • games/zone/game.tic -> games/zone/game.tic
    • game.tic -> games/misc/game.tic
node cli.js upload --dir ./rom-folder --sync-mode per-folder --path games --token 123456

5) Clean old versions

List matching keys for deletion (dry-run by default):

node cli.js clean --prefix games --older-than-days 30 --keep-latest 5 --exts tic,tic80

Perform deletion:

node cli.js clean --prefix games --older-than-days 30 --keep-latest 5 --exts tic,tic80 --execute

Force dry-run explicitly:

node cli.js clean --prefix games --dry-run

Package scripts

  • npm run list
  • npm run upload
  • npm run clean
  • node cli.js ... for all custom usage.

Notes

  • list does not require a token.
  • upload and clean require token input or token-like auth.
  • Use --api only when you want to point to another worker.