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

@engelde/tetris-cli

v1.0.0

Published

A CLI recreation of Tetris — right in your terminal

Readme

A CLI recreation of Tetris — right in your terminal. 🎮

npm version license node

"The classic puzzle game, rebuilt for the terminal."

🚀 Quick Start

npx @engelde/tetris-cli

One command. No install. Just play.

Want it installed? Run npm install -g @engelde/tetris-cli then just type tetris.

🕹️ What Is This?

A terminal recreation of Tetris — the puzzle game that defined a genre. Seven pieces, one board, infinite challenge. Built with TypeScript, React, and Ink for smooth 60 FPS terminal rendering.

✨ Features

  • 🏃 Marathon — Classic score chase with increasing speed
  • 🤖 vs CPU — Battle an AI opponent on Easy, Normal, or Hard
  • 👥 2-Player — Same-keyboard duel with garbage attacks
  • 🎲 7-Bag Randomizer — Fair piece distribution every game
  • 🔄 SRS Rotation — Full wall kicks and spin detection
  • 📦 Hold Piece — Swap and strategize
  • 👻 Ghost Piece — See exactly where you'll land
  • 🔥 Combos & Back-to-Back — Advanced scoring for pros
  • 🗑️ Garbage System — Send lines to your opponent
  • 🏆 Local High Scores — Persisted in ~/.tetris-cli-scores.json
  • 🔔 Sound Effects — Native chiptune-style game cues (disable with --no-sound)

🎮 Controls

Player 1

| Action | Keys | |--------|------| | Move left | A / Left Arrow | | Move right | D / Right Arrow | | Soft drop | S / Down Arrow | | Hard drop | W / Up Arrow | | Rotate clockwise | K / Z / Space | | Rotate counter-clockwise | J / X | | Hold | H / C | | Pause | P / Escape | | Quit | Q / Ctrl+C |

Player 2

| Action | Keys | |--------|------| | Move left | Left Arrow | | Move right | Right Arrow | | Soft drop | Down Arrow | | Hard drop | Up Arrow / Space | | Rotate clockwise | , / . | | Rotate counter-clockwise | / / > | | Hold | ; / L |

⚙️ Options

| Flag | Description | Default | |------|-------------|---------| | --mode <mode> | marathon, cpu, or 2p | Interactive menu | | --difficulty <level> | easy, normal, or hard | normal | | --no-sound | Disable sound effects | Sound enabled | | --help, -h | Show help | — | | --version, -v | Show version | — |

# Examples
npx @engelde/tetris-cli --mode marathon --difficulty easy --no-sound
npx @engelde/tetris-cli --mode cpu --difficulty hard
npx @engelde/tetris-cli --mode 2p

💡 Pro Tips

🎯 Master the hold — Save an I-piece for the perfect Tetris setup.

🔄 Learn SRS wall kicks — A well-timed rotation can save a piece from a tight spot.

Combos add up — Clearing lines back-to-back sends massive garbage in versus modes.

🏓 Watch the ghost — The ghost piece shows your landing spot. Use it to plan ahead.

🛠️ Development

git clone https://github.com/engelde/tetris-cli.git
cd tetris-cli
npm install

| Command | Description | |---------|-------------| | npm start | Run the game | | npm test | Run tests | | npm run build | Compile TypeScript | | npm run lint | Lint with Biome | | npm run format | Format with Biome |

Husky runs linting + tests on pre-commit and enforces Conventional Commits. CI runs on Node 22 / 24. npm publishing is triggered from a published GitHub Release using NPM_TOKEN and provenance.

📜 Credits

Inspired by the original Tetris created by Alexey Pajitnov in 1984. This is an independent, open-source recreation with no affiliation with The Tetris Company.

📄 License

MIT