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 🙏

© 2025 – Pkg Stats / Ryan Hefner

minitel.ts

v0.1.1

Published

A port to typescript and extension of https://github.com/cquest/pynitel

Readme

minitel.ts

Starting with a port of https://github.com/cquest/pynitel to TypeScript.

  • Minimum NodeJS 23 (for direct typescript)
  • Some basic routing, inspired by next.js

Basic usage

This example creates two screens which are saved in two .ts files under /app, demonstrates simple routing and state-management.

NPM install

npm install minitel.ts

Create a .env file, and set path & baudrate

MINITEL_PATH=/dev/tty.usbserial-0001 # MacOS
MINITEL_BAUDRATE=1200
MINITEL_SILENT=false # disable beeps

Create a app.ts file


import MinitelTS from 'minitel.ts'; 

// Example usage:
const minitel = new MinitelTS();
await minitel.init();
await minitel.loop('./app');

Create a app/index.ts file

import MinitelTS from 'minitel.ts'; 
import type { MinitelTSRoute } from "minitel.ts/types";

export const initialState =  {userInput: '...'};

export default async function screen(minitel:MinitelTS, route:MinitelTSRoute) {
  // shortcut
  const { input, output } = minitel;

  // global and local store/state
  const { store, setStore } = minitel.store;
  const { state, setState} = route.state;

  // clear screen
  output.cls();

  // set position and welcome
  output.pos(3, 5);
  output.print(`Welcome to Minitel TS! ${store.loop || 0}`);

  // if store, show to user
  if (store.userInput) {
      output.pos(7, 5);
      output.foreColor(minitel.colors.vert);
      output.print(`Minitel store.userInput: ${store.userInput}`);    
  }
  // if state, show to user
  if (state.userInput) {
      output.pos(9, 5);
      output.foreColor(minitel.colors.vert);
      output.print(`Route state.userInput: ${state.userInput}`);    
  }

  // set position and wait for input
  output.pos(5, 5);
  output.foreColor(minitel.colors.bleu);
  output.print("Type something:");
  let userInput = await input.line(6, 5, 10);

  // set input into store & state
  setStore({ userInput });
  setState({ userInput });

  // beep
  minitel.bip();

  // if DETAIL is entered, route to `detail.ts`
  if (userInput === 'DETAIL') {
      minitel.router.goto('detail');
  }
}

Create a app/detail.ts file

import MinitelTS from 'minitel.ts'; 

export default async function screen(minitel:MinitelTS) {
  // shortcut
  const { output } = minitel;

  // get store
  const { store, setStore } = minitel.store;

  // show welcome
  output.cls();
  output.pos(3, 5);
  output.print(`Welcome to Minitel TS! ${store.loop || 0}`);

  // wait for key (any input)
  await minitel.input.waitForKey();

  // reset userInput in store
  setStore({userInput: ''});

  // beep
  minitel.bip();

  // go back to index
  minitel.router.goto('index');
}

Run it! (remember NodeJS > 23 for direct typescript)

node app.ts