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

green-screen-react

v1.1.2

Published

Multi-protocol legacy terminal React component (TN5250, TN3270, VT, HP 6530)

Readme

green-screen-react

Multi-protocol legacy terminal React component. Connects to TN5250 (IBM i / AS/400), TN3270 (z/OS mainframe), VT220 (OpenVMS, Unix), and HP 6530 (NonStop) hosts.

Live Preview

Install

npm install green-screen-react green-screen-proxy

Quick Start

Start the proxy (separate terminal):

npx green-screen-proxy

Or start it programmatically from your app:

import { createProxy } from 'green-screen-proxy';
await createProxy({ port: 3001 });

Render the component:

import { GreenScreenTerminal } from 'green-screen-react';
import 'green-screen-react/styles.css';

function App() {
  return <GreenScreenTerminal />;
}

Connects to localhost:3001 automatically. Use the sign-in form to connect to a real host.

Adapters

WebSocketAdapter (recommended)

Real-time bidirectional WebSocket. Works with both the Node.js proxy and the Cloudflare Worker.

import { WebSocketAdapter } from 'green-screen-react';

// Local proxy (default)
const adapter = new WebSocketAdapter({ workerUrl: 'http://localhost:3001' });

// Cloudflare Worker
const adapter = new WebSocketAdapter({
  workerUrl: 'https://green-screen-worker.your-subdomain.workers.dev'
});

<GreenScreenTerminal adapter={adapter} />

RestAdapter

For backends that expose a REST API:

import { RestAdapter } from 'green-screen-react';

const adapter = new RestAdapter({
  baseUrl: 'https://your-server.com/api/terminal',
  headers: { Authorization: 'Bearer your-token' },
});

Custom Adapter

Implement TerminalAdapter to connect to any backend:

import type { TerminalAdapter } from 'green-screen-react';

class MyAdapter implements TerminalAdapter {
  async getScreen() { /* ... */ }
  async getStatus() { /* ... */ }
  async sendText(text: string) { /* ... */ }
  async sendKey(key: string) { /* ... */ }
  async connect(config?) { /* ... */ }
  async disconnect() { /* ... */ }
  async reconnect() { /* ... */ }
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | adapter | TerminalAdapter | auto | Backend adapter | | protocol | 'tn5250' \| 'tn3270' \| 'vt' \| 'hp6530' | 'tn5250' | Terminal protocol | | inlineSignIn | boolean | true | Show sign-in form when disconnected | | defaultProtocol | TerminalProtocol | 'tn5250' | Pre-selected protocol in sign-in | | readOnly | boolean | false | Disable keyboard input | | pollInterval | number | 2000 | Screen polling interval (ms) | | autoReconnect | boolean | true | Auto-reconnect on disconnect | | embedded | boolean | false | Compact embedded mode | | showHeader | boolean | true | Show header bar | | typingAnimation | boolean | true | Enable typing animation | | bootLoader | ReactNode \| false | default | Custom boot loader | | onSignIn | (config) => void | - | Sign-in callback | | onScreenChange | (screen) => void | - | Screen change callback | | className | string | - | CSS class | | style | CSSProperties | - | Inline styles |

Theming

:root {
  --terminal-green: #10b981;
  --terminal-white: #FFFFFF;
  --terminal-blue: #7B93FF;
  --terminal-bg: #000000;
  --terminal-card-bg: #0e1422;
  --terminal-card-border: #1e293b;
  --terminal-header-bg: #090e1a;
  --terminal-font: 'JetBrains Mono', 'Courier New', monospace;
}

License

MIT