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

roku-ts-cli

v1.1.3

Published

CLI and library for controlling Roku devices.

Readme

Roku CLI

Fast TypeScript CLI and library for controlling Roku devices via the ECP API.

Highlights

  • Full ECP control (keys, text, search, apps, device info, media state).
  • Interactive mode for remote-like control from the terminal.
  • Local bridge mode for other apps to send commands over HTTP.
  • SSDP discovery, emulator server, and proxy tools.
  • Strong typing, retries, timeouts, and better error handling.

Requirements

  • Node 18+ (Node 20+ recommended)

Install (recommended)

npm install -g roku-ts-cli@latest
# or install locally for development
npm install
npm run build
npm link

Quick Start

# Discover devices and save an alias
roku discover --save livingroom --index 1

# Use the alias
roku --host livingroom device-info
roku --host livingroom apps

CLI Usage

# Direct host (fast, no SSDP)
roku 192.168.1.118

# Commands
roku --host livingroom command home
roku --host livingroom literal "hello"
roku --host livingroom search --title "Stargate"

# App lookup / aliases
roku --host livingroom search --app plex
roku alias set plex 13535
roku --host livingroom launch plex

Interactive Mode

# Interactive control
roku livingroom

# With local command port
roku --host livingroom interactive --listen 19839 --token secret

Bridge Mode (Local HTTP)

roku --host livingroom bridge --listen 19839 --token secret

Send commands from other apps:

curl -X POST http://127.0.0.1:19839/key \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer secret" \
  -d '{"key":"home"}'

curl -X POST http://127.0.0.1:19839/text \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer secret" \
  -d '{"text":"hello"}'

Endpoints:

  • POST /key { "key": "home" }
  • POST /text { "text": "hello" }
  • POST /search { "title": "Stargate" }
  • POST /launch { "app": "plex" }
  • GET /health
  • GET /stats

Run Bridge as a Service

You can run the bridge in the background using your OS service manager.

macOS + Linux (user service)

Install and manage the service entirely through the CLI (no manual plist/unit edits needed):

# Install service file
roku bridge install-service --port 19839 --token YOUR_TOKEN --host YOUR_HOST_OR_ALIAS --user

# Start/stop/restart
roku bridge start --port 19839 --token YOUR_TOKEN --host YOUR_HOST_OR_ALIAS --user
roku bridge stop --user
roku bridge restart --port 19839 --token YOUR_TOKEN --host YOUR_HOST_OR_ALIAS --user

# Status + logs (+ optional health probe if port/token provided)
roku bridge status --user
roku bridge status --port 19839 --token YOUR_TOKEN

# Diagnose service issues (shows paths + logs, token redacted)
roku bridge diagnose --user

# Uninstall
roku bridge uninstall --user

Emulator & Proxy

# Local emulator (HTTP + SSDP)
roku server --port 8060

# Forward requests to a real Roku
roku proxy --remote-host 192.168.1.10 --local-port 8061

Library Usage

import { Roku } from "roku-ts-cli";

const roku = new Roku("192.168.1.10");
const apps = await roku.getApps();
await roku.home();

Tests

npm run build
npm test

License

MIT