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

@kattebak/sterk

v2.0.2

Published

Touch-friendly terminal emulator for the web — Ace renderer + clean-room VT core. OSC 133 first-class.

Readme

@kattebak/sterk

Node.js CI License: MIT

Sterk is a terminal emulator for the web, built with ❤️ on top of Ace. It pairs Ace's mature text-rendering engine with a clean-room VT core, and treats shell-integration (OSC 133) as a first-class primitive rather than an extension.

Touch-friendly. Mobile-first. MIT.

Status

  • M0 — Public API contract (src/types.ts)
  • M1 — Foundation utilities (256-color palette, scrollback buffer, EventEmitter shim)
  • M2 — Clean-room VT core (Paul Williams parser, SGR, OSC 133, Terminal factory)
  • 🚧 M3 — Ace renderer glue (input, mouse, links, theme, DOM)
  • M4 — Polish, alt-screen buffer, demo page, 1.0 release

See docs/ROADMAP.md.

Installation

npm install @kattebak/sterk

Size

Sterk is lightweight — under 53 kB packed (including Ace as a peer dependency).

Run npm run size to verify the current bundle size against the 75 kB budget.

Demo

A standalone demo is available in demo/index.html. To run it:

npm run build
npm run demo

Then open http://localhost:3000 in your browser.

Usage

Headless mode (parser + buffer only)

import { createTerminal } from '@kattebak/sterk';

const term = createTerminal({ cols: 80, rows: 24 });

term.write('Hello, world!\r\n');
term.write('\x1b[1;31mBold red text\x1b[0m\r\n');

term.onData((data) => {
  console.log('User input:', data);
  // Forward to backend (WebSocket, pty, etc.)
});

// Access buffer for rendering
const line = term.buffer.active.getLine(0);
console.log(line?.translateToString());

DOM mode (with Ace renderer)

import { createTerminal } from '@kattebak/sterk';

const term = createTerminal({
  cols: 80,
  rows: 24,
  theme: {
    foreground: '#f0f0f0',
    background: '#1e1e1e',
  },
});

// Attach to DOM
const container = document.getElementById('terminal');
term.open(container);

term.write('Welcome to sterk!\r\n');

// Register OSC 133 handler for shell integration
term.parser.registerOscHandler(133, (data) => {
  const kind = data.charAt(0); // 'A', 'B', 'C', 'D'
  if (kind === 'A') {
    console.log('Prompt start');
  }
  return false; // Allow other handlers
});

See demo/ for a complete standalone example.

Public API

  • createTerminal(options?: TerminalOptions): Terminal — Create a terminal instance
  • Terminal — Main terminal interface (write, resize, open, dispose)
  • Parser.registerOscHandler(id, handler) — Register OSC sequence handlers
  • Buffer / BufferLine / BufferCell — Read-only buffer access with full SGR attributes
  • Theme — Color theme definition (foreground, background, ANSI palette)

See src/types.ts for full API documentation with JSDoc comments and examples.

Design principles

  • Clean-room core. The VT parser is written from public specs (Paul Williams' state machine, XTerm Control Sequences, ECMA-48). No code lifted from other emulators.
  • Ace does what Ace does well. Text layout, scrolling, theming — we don't reinvent it.
  • OSC 133 first-class. Shell integration (prompt markers, command boundaries) is a built-in concept, not a bolt-on.
  • Pragmatic feature scope. Feature parity with xterm.js is aspirational. We build what real consumers need and skip the rest.

License

MIT © 2026 Matthijs van Henten / kattebak