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

@danecodes/roku-registry

v0.1.0

Published

CLI and library for managing Roku device registry state

Downloads

16

Readme

@danecodes/roku-registry

CLI and library for managing Roku device registry state, built on @danecodes/roku-odc.

Define named registry configurations (presets) and activate them with one call — like database fixtures but for Roku app state.

Install

npm install @danecodes/roku-registry

Library Usage

import { RegistryManager } from '@danecodes/roku-registry';

const reg = new RegistryManager('192.168.0.30');

Read

const all = await reg.getAll();              // Record<string, Record<string, string>>
const section = await reg.getSection('auth'); // Record<string, string>
const value = await reg.get('auth', 'token'); // string | undefined

Snapshots

// Save current registry state
await reg.snapshot('./snapshots/logged-in.json');

// Restore from a snapshot (clears existing, then sets)
await reg.restore('./snapshots/logged-in.json');

Snapshot format is plain JSON:

{
  "auth": { "token": "abc123", "refreshToken": "xyz" },
  "settings": { "parentalControls": "true", "maxRating": "PG-13" },
  "onboarding": { "completed": "true" }
}

Diff

// Compare current device state to a snapshot
const diff = await reg.diff('./snapshots/expected.json');

// Compare two snapshots
const diff = await reg.diffSnapshots('./before.json', './after.json');

// Pretty-print
console.log(reg.formatDiff(diff));
// + auth.newKey = "value"
// - settings.removedKey = "old"
// ~ onboarding.step = "3" → "5"

Presets

const reg = new RegistryManager('192.168.0.30', {
  presets: {
    'fresh-install': {},
    'logged-in': {
      auth: { token: 'test-token-123', userId: 'user_abc' },
      onboarding: { completed: 'true' },
    },
    'premium-subscriber': {
      auth: { token: 'test-token-123', userId: 'user_abc' },
      subscription: { tier: 'premium', expires: '2099-01-01' },
      onboarding: { completed: 'true' },
    },
  },
});

// Activate a preset (clears registry first)
await reg.activate('logged-in');

// Activate with overrides (deep-merged into the preset)
await reg.activate('logged-in', {
  auth: { token: 'different-token' },
});

// List available presets
const names = await reg.listPresets(); // string[]

// Get preset data without activating
const data = await reg.getPreset('premium-subscriber');

CLI

Read

roku-registry get                           # full registry as JSON
roku-registry get auth                      # one section
roku-registry get auth.token                # one value

Write

roku-registry set auth.token abc123         # set a single key
roku-registry set auth '{"token":"abc","userId":"u1"}'  # set entire section

Clear

roku-registry clear                         # clear all sections
roku-registry clear auth                    # clear one section
roku-registry clear auth settings           # clear multiple sections

Snapshots

roku-registry snapshot ./state.json         # save current state
roku-registry restore ./state.json          # restore from file

Diff

roku-registry diff ./expected.json          # compare device to file
roku-registry diff ./before.json ./after.json  # compare two files

Presets

roku-registry presets                       # list available presets
roku-registry activate fresh-install        # activate a preset
roku-registry activate logged-in --override auth.token=xyz

Global Options

roku-registry --device 192.168.0.30         # specify device IP
roku-registry --config ./my-presets.json    # specify config file

Environment Variables

| Variable | Description | |---|---| | ROKU_DEVICE_IP | Default device IP when --device is not specified |

Preset Config File

Presets are loaded from the first source found:

  1. --config flag
  2. roku-registry.json in cwd
  3. .roku-registry.json in cwd
  4. roku-registry key in package.json
{
  "presets": {
    "fresh-install": {},
    "logged-in": {
      "auth": { "token": "test-token-123", "userId": "user_abc" },
      "onboarding": { "completed": "true" }
    }
  }
}

License

MIT