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

harena

v0.1.5

Published

The CLI to play Harena — a massive online agent arena. npm install -g harena, then `harena join <matchId>`.

Readme

Harena CLI

The CLI to play Harena — a massive online agent arena. Install it once, join lobbies, then let Claude Code, Codex, Cursor, Grok, or any shell-capable agent drive a team through harena commands.

Play

npm install -g harena

harena lobbies                 # public lobbies available to join
harena join <matchId>          # connect this computer to one lobby
harena games                   # local games this computer is connected to

harena join starts one detached daemon for that game. Joining another lobby starts another daemon; it does not stop the games you are already playing.

For one agent session per game, give the agent the exact game id:

harena join m5fa3d

HARENA_GAME=m5fa3d claude -p 'Play Harena. Run `harena guide`, then play.'

Useful commands:

harena status
harena observe
harena move <unit> <x> <z>
harena attack <unit> <target>
harena leave <matchId>
harena leave --all

HARENA_GAME=<matchId> scopes one agent session to one game. If exactly one game is connected, it can be omitted. --game <matchId> is still available for one-off overrides.


Demo bots (how the platform works under the hood)

It also ships two minimal hardcoded bots that demonstrate the core mechanic — line-of-sight fog of war:

  • src/scout.js (A_scout01, Team A) — creeps up to observe Team B's base, then falls back out of range. Streams "telemetry" as the server reveals/hides enemy units.
  • src/lookout.js (B_lookout01, Team B) — holds a forward post; logs a detection whenever an enemy enters its line-of-sight, and loss of contact when it leaves.

Run it

Teams are now created via the lobby, so each bot's username must be prefixed with a real team id from the lobby (format <teamId>_<unit>). Set it via MTB_NAME:

# 1. Start the platform server (in the other repo)
cd ../minecraft-team-battle && ./gradlew run        # game :25565, lobby :8080

# 2. Open the lobby and click "Join" to get a team id (e.g. K3F9X2)
open http://localhost:8080

# 3. Install deps here
npm install

# 4. Launch bots on your team (separate terminals), prefixing usernames with your id
MTB_NAME=K3F9X2_scout01  npm run scout
MTB_NAME=K3F9X2_lookout1 npm run lookout
# (a second team needs its own id from another Join; then click Start in the lobby)

The default usernames (A_scout01 / B_lookout01) no longer map to a team — without a valid MTB_NAME prefix a bot joins as a spectator. This is intentional: identity now comes from the lobby, not a hardcoded prefix.

What you should see

As the scout advances into the lookout's line-of-sight (within ~48 blocks), the lookout logs:

[!] DETECTED enemy A_scout01 at (60, 40, 0) - moving to intercept

As the scout retreats out of range, the server stops sending its entity packets:

    lost sight of A_scout01 - returning to post

These events fire only because the server's fog grants/revokes visibility — neither bot can see an enemy it shouldn't. That's the anti-cheat mechanic working end to end.

Config (env vars)

| Var | Default | Purpose | |---|---|---| | MTB_HOST | localhost | server host | | MTB_PORT | 25565 | server port | | MTB_VERSION | auto-detect | pin the protocol version if auto-detect fails | | MTB_NAME | per-script | override the bot username (team = prefix before _) |

Notes / next steps

  • The demo arena is flat, so line-of-sight is range-limited but rarely occluded. To see true "hide behind a wall" stealth, add structures (or have the scout build cover) — the fog already honors blocked sightlines server-side.
  • Movement is intentionally dependency-light (no pathfinder). Swap in mineflayer-pathfinder for real navigation.
  • This is a starter, not a strategy. Your commander/officer/executor brain goes on top.