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

@flyingrobots/bijou-node

v5.0.0

Published

Node.js adapter for bijou — chalk styling, readline I/O, process runtime.

Readme

@flyingrobots/bijou-node

Node.js adapters and runtime utilities for Bijou.

@flyingrobots/bijou-node bridges the pure core and the TUI runtime to the Node.js environment. It owns platform detection, terminal I/O, Chalk-backed styling, and worker-thread helpers.

Role

  • Port Implementation: Maps Node.js APIs to the Bijou port interfaces.
  • Worker Runtime: Offloads heavy TEA logic to worker threads while maintaining main-thread responsiveness.
  • Bootstrapping: One-call hosted app startup with startApp().

Install

npm install @flyingrobots/bijou @flyingrobots/bijou-node

Quick Start

import { stringToSurface } from '@flyingrobots/bijou';
import { startApp } from '@flyingrobots/bijou-node';
import { isKeyMsg, quit, type App } from '@flyingrobots/bijou-tui';

const app: App<{ count: number }> = {
  init: () => [{ count: 0 }, []],
  update: (msg, model) => {
    if (isKeyMsg(msg) && msg.key === 'q') return [model, [quit()]];
    return [model, []];
  },
  view: (model) => stringToSurface(`Count: ${model.count}\\nPress q to quit`, 16, 2),
};

await startApp(app);

Port Mapping

| Port | Node.js Implementation | Responsibility | | :--- | :--- | :--- | | RuntimePort | nodeRuntime() | process.env, TTY detection, dimensions | | IOPort | nodeIO() | stdout/stdin, readline, resize events | | StylePort | chalkStyle() | RGB/hex styling, NO_COLOR support |

API

  • createNodeContext(): Returns a wired BijouContext without setting it as the global default.
  • createNodeContext({ theme }): The explicit programmatic path for a custom theme on a Node-owned context.
  • createNodeContext({ themes, themeMode, themeOverride }): Picks from a named theme set with automatic light/dark selection and optional app-owned override state.
  • initDefaultContext(): Registers the first context as the global default for all Bijou components.
  • startApp(): Initializes a default Node context when needed and runs a TUI app through the hosted runtime. Pass startApp(app, { theme }) for the one-line programmatic custom-theme path, or startApp(app, { themes, themeMode, themeOverride }) for automatic light/dark selection plus override support. When the app is a self-running framed shell, startApp() delegates to that hosted runner instead of bypassing it.
  • Ambient default initializer: Importing @flyingrobots/bijou-node registers a lazy Node default-context initializer so low-level run(app) flows can still resolve ctx without a separate initDefaultContext() call.
  • scopedNodeIO(): Wraps the Node file adapter in a rooted filesystem boundary for app-level reads and guarded path resolution.
  • runInWorker(): Starts a TEA app inside a worker thread.
  • recordDemoGif(): Captures surface frames and rasterizes them to GIF for documentation.

Scoped File Access

Prefer scopedNodeIO() over raw nodeIO() when the app should only read assets from one project directory.

import { scopedNodeIO } from '@flyingrobots/bijou-node';

const io = scopedNodeIO({ root: process.cwd() });

const theme = io.readFile('themes/app.json');
const outputPath = io.resolvePath('captures/demo.gif');

readFile(), readDir(), and joinPath() now stay inside the declared root. resolvePath() gives hosts the same boundary check before they hand a path to raw Node writes such as fs.writeFileSync().

Documentation


Built with 💎 by FLYING ROBOTS