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

@volley/vwr-s3-cli

v1.0.0

Published

CLI tool to manage VWR config files in S3

Downloads

134

Readme

@volley/vwr-s3-cli

CLI tool to manage VWR config files in S3.

Quick Start

Register your TV device for local development:

npx @volley/vwr-s3-cli setup --device-id <YOUR_DEVICE_ID> --platform SAMSUNG_TV --env dev --launch-url https://your-game.ngrok.io

This creates a device config with dev defaults, uploads it to S3, and invalidates the CloudFront cache — fully non-interactive. Your TV will load VWR pointed at your local game.

Prerequisites

You need AWS SSO access via the TVDevelopers role (SSO account 375633680607).

# Log in with your AWS profile that maps to TVDevelopers
aws sso login --profile <your-profile-name>

# Either export it for the session:
export AWS_PROFILE=<your-profile-name>

# Or pass it per-command:
npx @volley/vwr-s3-cli --profile <your-profile-name> setup ...

Interactive mode

If you omit flags, the CLI prompts for them:

npx @volley/vwr-s3-cli setup
# > Select platform: [Samsung TV / LG TV / Fire TV / ...]
# > Enter device ID: TZBLDTKPZHWVX
# > Select environment: [Development / Staging / Production]
# > Launch URL (optional): https://your-game.ngrok.io
# > Additional trusted domains: (press Enter to skip)

Global Options

| Flag | Description | | --- | --- | | --profile <profile> | AWS profile to use (uses default credential chain if not set) | | --region <region> | AWS region (default: us-east-1) |

All Commands

| Command | Description | | ------------ | ---------------------------------------------------- | | setup | Create a device config with env defaults (see above) | | generate | Create a config interactively with full control | | get | Download and display a config from S3 | | edit | Edit an existing config in S3 interactively | | put | Upload a config file to S3 | | delete | Delete a config from S3 | | invalidate | Invalidate CloudFront cache for a config path |

setup

Create a device config with environment defaults and upload to S3.

# Fully non-interactive (all flags provided, trusted domains auto-detected)
vwr-config setup --device-id TZBLDTKPZHWVX --platform SAMSUNG_TV --env dev --launch-url https://abc.ngrok.io

# Different environment
vwr-config setup --device-id TZBLDTKPZHWVX --platform SAMSUNG_TV --env staging --launch-url https://abc.ngrok.io

# Interactive — prompts for missing values and trusted domains
vwr-config setup --platform SAMSUNG_TV

Flags:

  • --platform <platform> — SAMSUNG_TV, LG_TV, FIRE_TV, IOS_MOBILE, ANDROID_MOBILE, WEB
  • --device-id <id> — Your TV's device ID
  • --launch-url <url> — URL for VWR to launch in an iframe (include full path and query params). When provided, trusted domains are auto-detected and the command runs non-interactively.
  • --env <env> — dev (default), staging, or prod

generate

Interactively create a config with step-by-step prompts and full control over every field. Supports outputting to S3, local file, or console.

vwr-config generate

get

Download and display a config from S3:

vwr-config get device --platform SAMSUNG_TV --device-id TZBLDTKPZHWVX
vwr-config get environment --env dev
vwr-config get device --platform SAMSUNG_TV --device-id TZBLDTKPZHWVX -o config.json

edit

Edit an existing config in S3 interactively. Select fields to change, review a diff, then confirm upload.

vwr-config edit device --platform SAMSUNG_TV --device-id TZBLDTKPZHWVX
vwr-config edit environment --env dev

Trusted domains are auto-updated when URL fields change. You can also select trustedDomains directly to add or remove individual domains.

put

Upload a config file to S3 (validates JSON schema before upload):

vwr-config put device ./my-config.json --platform SAMSUNG_TV --device-id TZBLDTKPZHWVX
vwr-config put device ./my-config.json --platform LG_TV --device-id ABC --no-invalidate

delete

Delete a config from S3:

vwr-config delete device --platform SAMSUNG_TV --device-id TZBLDTKPZHWVX
vwr-config delete device --platform SAMSUNG_TV --device-id TZBLDTKPZHWVX -f  # skip confirmation

invalidate

Invalidate CloudFront cache:

vwr-config invalidate device --platform SAMSUNG_TV --device-id TZBLDTKPZHWVX
vwr-config invalidate --paths /config/device/SAMSUNG_TV/*/vwrConfig.json

Shared flags for get, edit, put, delete, invalidate

| Flag | Description | | --- | --- | | [type] | device, shell-version, or environment (prompted if omitted) | | --platform <platform> | Platform (for device/shell-version) | | --device-id <id> | Device ID (for device) | | --env <env> | Environment (for shell-version/environment) | | --version <version> | Shell version (for shell-version) |

Config Types

| Type | S3 Path | Required Options | | --------------- | --------------------------------------------------------------- | ---------------------- | | device | config/device/{platform}/{deviceId}/vwrConfig.json | platform, device-id | | shell-version | config/shellVersion/{env}/{platform}/{version}/vwrConfig.json | env, platform, version | | environment | config/environments/{env}/vwrConfig.json | env |

AWS Authentication

The CLI uses the AWS SDK's default credential chain. You need access to the volley-vwr S3 bucket in account 375633680607.

Roles with access:

  • TVDevelopers — Can read all configs, write/delete device configs, invalidate cache
  • PlatformFoundations — Full config access (internal team)
# Option 1: Export profile for session
export AWS_PROFILE=<your-profile-name>
vwr-config setup ...

# Option 2: Pass profile per-command
vwr-config --profile <your-profile-name> setup ...

VWR Config Schema

{
    "hubUrl": "https://game-clients-dev.volley.tv/hub",
    "vwrUrl": "https://vwr.volley.tv/v1/1.0.0/vwr.js",
    "launchUrl": "https://your-game.ngrok.io",
    "platformApiUrl": "https://platform-api.volley.tv",
    "platformAuthApiUrl": "https://platform-auth-api.volley.tv",
    "trustedDomains": [
        "https://game-clients-dev.volley.tv",
        "https://vwr.volley.tv",
        "https://your-game.ngrok.io"
    ]
}

Required fields

  • hubUrl - Hub URL (non-empty string)
  • vwrUrl - VWR URL (non-empty string)
  • trustedDomains - Array of trusted domain strings (non-empty array)

Optional fields

  • launchUrl - Launch URL for VWR to load in an iframe
  • platformApiUrl - Platform API URL
  • platformAuthApiUrl - Platform Auth API URL

Local Development

Prerequisites

  • Node.js >= 22
  • pnpm >= 10.18.1
  • AWS credentials with access to the volley-vwr S3 bucket

Setup

pnpm install
pnpm build
./dist/cli.js --help

Project structure

src/
├── index.ts              # CLI entry point
├── types.ts              # TypeScript types
├── prompts.ts            # Interactive prompts
├── constants.ts          # Shared constants (platforms, environments)
├── config-utils.ts       # URL origin extraction, trusted domain helpers
├── commands/
│   ├── setup.ts          # Setup command (quick device config)
│   ├── generate.ts       # Generate command
│   ├── get.ts            # Get command
│   ├── put.ts            # Put command
│   ├── edit.ts           # Edit command
│   ├── delete.ts         # Delete command
│   └── invalidate.ts     # Invalidate command
├── s3/
│   └── client.ts         # S3 client and operations
├── cloudfront/
│   └── client.ts         # CloudFront client and cache invalidation
└── validation/
    └── schema.ts         # JSON schema validation