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

tttui-axi

v1.0.0

Published

Terminal TUI Tic-Tac-Toe and Agent eXperience Interface (AXI) adhering to axi.md

Readme

tttui-axi (Terminal TUI Tic-Tac-Toe & AXI)

A high-performance, cross-platform terminal (TUI) Tic-Tac-Toe game and AXI (Agent eXperience Interface) adhering to axi.md. Written in modern Node.js (ESM) with zero runtime dependencies.

Designed for instant interactive play by humans while waiting for LLM tasks, and token-optimized programmatic control by AI agents.

Dependencies Node.js Test AXI Compliant


⚡ Instant Run (Zero Install via NPX)

Run directly with zero manual installation:

npx -y tttui-axi

Or install/link globally:

npm link
# Then launch anytime:
tttui
# (Aliases: tttui-axi, ttt)

🤖 AXI: Agent eXperience Interface (axi.md)

tttui-axi adheres to the 10 AXI design principles for agent-ergonomic CLI design:

  1. Token-efficient output: Compact TOON format saves ~40% tokens compared to raw JSON.
  2. Minimal default schemas: Emits only actionable fields (board, turn, game_state, available_moves, scores).
  3. Content truncation & escape hatch: Concise summary by default; use --json or --full for raw data.
  4. Pre-computed aggregates: Eliminates round-trips by pre-calculating remaining available moves, winning triplets, and turn counters.
  5. Definitive empty states: Reports available_moves: 0 (game finished) rather than ambiguous empty collections.
  6. Structured errors & exit codes: Loud failures (exit code 1) on illegal moves or unknown flags; never hangs waiting for interactive input in AXI mode.
  7. Ambient context: Full integration guide in AGENTS.md and docs/specs/0003-tttui-axi.md.
  8. Content first: Running with no arguments in a terminal launches the interactive TUI; in non-TTY environments it displays live game state TOON.
  9. Contextual disclosure: Every response concludes with a next[N]: block containing runnable follow-up suggestions.
  10. Consistent help: Concise command reference via tttui --help.

Agent Command Reference

# View board status in TOON format
tttui status

# Place a mark at grid cell 0-8
tttui move 4

# Trigger AI opponent move (easy, medium, unbeatable)
tttui ai unbeatable

# Reset board for next round
tttui reset

# Raw JSON escape hatch
tttui status --json

Sample AXI TOON output:

status:
  action: Player placed mark at cell 4
  board: ". . . / . X . / . . ."
  turn: O
  mode: pve
  difficulty: unbeatable
  round: 1
  game_state: playing
  available_moves: [0, 1, 2, 3, 5, 6, 7, 8] (8 remaining)
  scores: X:0 O:0 ties:0
next[3]:
  Run `tttui move <0-8>` to place mark (choices: 0, 1, 2, 3, 5, 6, 7, 8)
  Run `tttui ai` to trigger computer move
  Run `tttui reset` to restart game

🎮 Interactive TUI Features (For Humans)

  • Zero Runtime Dependencies: Standard Node.js library only.
  • Flicker-Free ANSI TUI: Clean Unicode box-drawing (┌─┬─┐) with vibrant color accents.
  • Terminal Audio Effects: Native ANSI bell acoustic cues for move placement, invalid moves, win fanfare, and ties—with an instant mute toggle (V).
  • Unbeatable Minimax AI: Complete minimax game tree evaluation guaranteed to play optimally (or choose Easy / Medium).
  • Multiple Navigation Schemes:
    • Arrow Keys (↑, ↓, ←, →)
    • WASD (W, A, S, D)
    • Vim Keys (H, J, K, L)
    • Direct Numeric Cell Jump (1 through 9)
  • Game Modes:
    • Single Player vs AI (Easy, Medium, Unbeatable)
    • 2-Player Local (Pass & Play)
  • Scoreboard: Tracks X wins, O wins, and Ties across rounds.

Interactive Controls Reference

| Key(s) | Action | |---|---| | ↑ ↓ ← → / W A S D / H J K L | Move cursor between grid cells | | 1 - 9 | Direct quick-pick jump to grid cell | | Space / Enter | Place mark in selected cell | | R | Restart round (preserves score counters) | | M | Toggle Mode (Player vs AI ↔ 2-Player Local) | | T / Tab | Toggle AI Difficulty (Easy ↔ Medium ↔ Unbeatable) | | V / B | Toggle Audio Effects (ON 🔊 ↔ OFF 🔇) | | Q / Ctrl+C | Quit game cleanly |


🧪 Testing

Run the automated test suite powered by Node's built-in node:test runner:

npm test
# or
node --test

All 35 unit and integration tests across 6 test suites execute in ~130ms.


📐 Architecture & SDLC Artifacts