Skip to content

Scores Domain

magmacrunchmedia edited this page Aug 9, 2026 · 3 revisions

Scores Domain

Direct SSH access to game high scores on the Raspberry Pi.

Commands

List all games

magmascript scores list

Output:

game                   game_id            entries  top
---------------------  -----------------  -------  --------------------------
2^N                    2n                 1        rank=1, initials=JAM, score=4
George Boole           george-boole       79       rank=1, initials=JAM, score=137
...

Get leaderboard for a game

magmascript scores get tetris              # top 20 (default)
magmascript scores get tetris 5            # top 5

Generate full report

magmascript scores report

Output:

# Weekly High Scores — August 09, 2026

## Leaderboards

### Tetris

| Rank | Player | Score |
|------|--------|-------|
| 1 | KC | 65486 · L10 |
| 2 | JAM | 19901 · L6 |

## Stats

- **Games tracked**: 7
- **Total scores**: 107
- **Most active player**: JAM (101 scores across 7 games)

Reset scores

magmascript scores reset tetris             # reset one game (creates backup)
magmascript scores reset-all                # reset all games

Both commands prompt for confirmation before resetting. A timestamped backup is created in scores/backup/ before clearing.

How It Works

The scores domain SSHes directly to the Pi and reads/writes JSON files from ~/arcade/admin/scores/.

Your Mac ──SSH──> Pi ──cat──> scores/tetris.json

No MCP server in the middle — faster, structured data.

Output Formats

magmascript scores list --table    # default table
magmascript scores list --json    # JSON output

Clone this wiki locally