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-log

v0.1.0

Published

Structured Roku BrightScript log parsing, streaming, and analysis

Readme

@danecodes/roku-log

Structured Roku BrightScript log parsing, streaming, and analysis.

Connects to a Roku device's debug console (port 8085) and turns raw log output into typed, structured data. Zero runtime dependencies.

Install

npm install @danecodes/roku-log

LogParser — structured parsing

import { LogParser } from '@danecodes/roku-log';

const parser = new LogParser();
const entries = parser.parse(rawLogText);

for (const entry of entries) {
  console.log(entry.type, entry.message);
  // type: 'info' | 'error' | 'crash' | 'beacon' | 'compile' | 'debug'
}

The parser is stateful — it handles multi-line blocks like backtraces and variable dumps. You can also feed lines incrementally:

for (const line of lines) {
  const entries = parser.feedLine(line);
  // process entries...
}
const remaining = parser.flush(); // emit any buffered multi-line block

Parsed types

  • BrightScriptErrorBRIGHTSCRIPT: ERROR: and Runtime Error lines with error class, code, and source location
  • BacktraceSTOP/PAUSE blocks with stack frames, current function line, and local variables
  • BeaconEntry[beacon.header]/[beacon.report] lines with event name and optional duration
  • CompileEntry------ Compiling dev ... ------ and ------ Running dev ... ------ markers

LogStream — live TCP streaming

import { LogStream } from '@danecodes/roku-log';

const stream = new LogStream('192.168.0.30');

stream.on('entry', (entry) => console.log(entry.type, entry.message));
stream.on('error', (err) => console.error(err.errorClass, err.source.file));
stream.on('crash', (crash) => console.error(crash.frames));
stream.on('beacon', (beacon) => console.log(beacon.event, beacon.duration));

await stream.connect();

// Send debug commands
await stream.send('bt');
await stream.send('cont');

// Or use as async iterator
for await (const entry of stream) {
  console.log(entry.type, entry.message);
}

stream.disconnect();

Auto-reconnects with exponential backoff by default. Disable with { reconnect: false }.

LogSession — aggregate analysis

import { LogSession } from '@danecodes/roku-log';

const session = new LogSession();
session.addAll(entries);

session.errors;   // BrightScriptError[]
session.crashes;  // Backtrace[]
session.beacons;  // BeaconEntry[]

session.filter({ type: 'error' });
session.filter({ file: 'HomeScene.brs' });
session.filter({ since: timestamp });
session.search('uninitialized');

const summary = session.summary();
// { errorCount, crashCount, beaconCount, launchTime?, uniqueErrors }

session.toJSON();
session.toText();

LogFormatter — terminal output

import { LogFormatter } from '@danecodes/roku-log';

const formatter = new LogFormatter({ color: true });
console.log(formatter.format(entry));
// ANSI-colored: red for errors, red bold for crashes, yellow for beacons, cyan for source locations

Compatibility

Drop-in replacement for roku-ecp's parseConsoleForIssues:

import { parseConsoleForIssues } from '@danecodes/roku-log';

const { errors, crashes, exceptions } = parseConsoleForIssues(rawOutput);

Same signature and return type as @danecodes/roku-ecp's version.