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

balatro-cli

v1.1.0

Published

CLI poker roguelike (Balatro-style) with server-log aesthetic

Readme

Poker Roguelike CLI

Command-line poker roguelike inspired by Balatro (小丑牌). All output is styled as server logs so it looks like monitoring output.

Requirements

  • Node.js 18+

Install & Run

全局安装后一键启动:

npm install -g balatro-cli
balatro-cli

本地开发运行:

node bin/start.js
# or
npm start

How to play

  • Goal: Each round (blind) has a target score. Play 5-card poker hands to reach it before you run out of hands (4) and discards (4).
  • Flow: 8 Antes; each Ante has Small Blind, Big Blind, and Boss Blind. Beat the target in a blind to get money and enter the shop. Win Ante 8 Boss to win.
  • Shop: Buy Jokers (passive effects), Planet cards (upgrade a hand type), Vouchers (+1 joker slot, etc.), or refresh. Jokers apply in order: +chips left, +mult middle, ×mult right.
  • Input:
    • During a round: type 5 card positions (1–8), e.g. 1 3 5 6 8 to play those cards, or discard 2 5 to discard cards 2 and 5.
    • Small/Big blind: f to fight, s to skip (get a tag, no money/shop).
    • Shop: 1/2 buy joker, p planet, v voucher, r refresh, q leave.
  • 关闭提示: 启动时设置环境变量 POKER_HIDE_HINTS=1 可关闭操作提示;或在出牌阶段输入 /hint(或 hint/提示)随时切换提示开关。

Test

npm test

测试覆盖:牌堆与手牌、牌型判定、计分与小丑牌效果(加筹码/加倍率/乘倍率、对子加成、未弃牌、每张小丑)、星球牌等级、商店(购买/出售小丑、星球牌、优惠券、刷新)、盲注配置、回合出牌与弃牌、CLI 解析。塔罗牌/幻灵牌当前未实现,故无对应单测。

Project layout

  • src/logStyle.js – log-style formatter
  • src/deck.js – deck, deal, play, discard
  • src/handRank.js – 5-card hand detection
  • src/scoring.js – score = chips × mult, joker order
  • src/jokers.js – joker definitions and effects
  • src/blinds.js – ante/blind targets and debuffs
  • src/round.js – single blind round loop
  • src/shop.js – shop and purchases
  • src/cli.js – readline input
  • src/index.js – main game loop