No description
  • TypeScript 99.2%
  • HTML 0.8%
Find a file
2026-07-31 18:44:35 -04:00
packages throw error on bad input 2026-07-31 18:24:27 -04:00
.gitignore scaffolding 2026-07-09 13:22:32 -04:00
.prettierignore Prettier 2026-07-28 11:19:37 -04:00
.prettierrc Prettier 2026-07-28 11:19:37 -04:00
bun.lock Prettier 2026-07-28 11:19:37 -04:00
package.json Prettier 2026-07-28 11:19:37 -04:00
README.md minor edits 2026-07-31 18:44:35 -04:00
tsconfig.json Prettier 2026-07-28 11:19:37 -04:00

🎳 Bowling 🎳

A terminal-based bowling scorekeeper built with Bun, featuring both CLI and TUI interfaces.

Project Structure

This is a monorepo with the following packages:

  • @bowling/core - Core bowling logic and utilities (scoring, rules, validation)
  • @bowling/cli - Command-line interface for recording games
  • @bowling/tui - Terminal user interface built with Ink/React
  • @bowling/web - Web-based interface

Installation

bun install

Usage

CLI

Run the CLI tool with roll values:

bun run cli 5 3 7 2 10 4 6 8 1 9
┌─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│ │5 3│ │7 2│ │X  │ │4 /│ │8 1│ │9  │ │   │ │   │ │   │ │     │
│ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│    8│   17│   37│   55│   64│   73│     │     │     │       │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘

Score multiple games:

bun run cli 10 5 3 7 3 4 6 7 -- 2 8 10 3 4 6 4 5
┌─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│ │X  │ │5 3│ │7 /│ │4 /│ │7  │ │   │ │   │ │   │ │   │ │     │
│ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│   18│   26│   40│   57│   64│     │     │     │     │       │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘
┌─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│ │2 /│ │X  │ │3 4│ │6 /│ │5  │ │   │ │   │ │   │ │   │ │     │
│ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│   20│   37│   44│   59│   64│     │     │     │     │       │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘

Score multiple games:

bun run cli --Alice 10 5 3 7 3 4 6 7 --Bob 2 8 10 3 4 6 4 5
┌─────┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│     │ │X  │ │5 3│ │7 /│ │4 /│ │7  │ │   │ │   │ │   │ │   │ │     │
│     │ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│Alice│   18│   26│   40│   57│   64│     │     │     │     │       │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘
┌─────┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│     │ │2 /│ │X  │ │3 4│ │6 /│ │5  │ │   │ │   │ │   │ │   │ │     │
│     │ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│  Bob│   20│   37│   44│   59│   64│     │     │     │     │       │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘

TUI

Start the terminal user interface:

bun run dev:tui

Development

Run tests:

bun test

Format code:

bun run format

Check formatting:

bun run format:check

Build all packages:

bun run build

Features

  • Accurate bowling scoring with strike and spare handling
  • Frame-by-frame breakdown display
  • Multiple player support via --name flag
  • Clean terminal interface

License

MIT