Skip to main content

Utilityman

Follow your favorite MLB teams with live play-by-play in the terminal.

Scorebug example

Example output

⚾ Game On! ⚾
Teams: Los Angeles Dodgers at Baltimore Orioles  
Pitchers: Clayton Kershaw vs. Tomoyuki Sugano
📍 Oriole Park at Camden Yards
🕐 Sun 10:35 AM PDT

▲1  Shohei Ohtani homers (47) on a fly ball to center field. (1 RBI) (1-0) ○○○
▲1  Mookie Betts strikes out swinging. (3-3) ○○○
────────────────────────────────────────────────
🏟️  ▲ Top 1
     ⚾ LAD  1  (H: 1 E:0)
     ⚾ BAL  0  (H: 0 E:0)

Install

  • From PyPI

    pip install utilityman
    
  • Local checkout (editable)

    • Clone this repo
    • pip install -e .

Requires Python 3.9+.

Usage

  • Positional team or prompt
utilityman dodgers
# or just run `utilityman` and enter a team when prompted
utilityman --gamepk 776443
  • Show every pitch and start from the first at-bat
utilityman yankees --pitches --from-start

What it does

  • Finds today's game for a team (or uses --gamepk)
  • Streams new at-bats and optionally every pitch as the game unfolds
  • Prints a compact scoreboard on change or inning transitions
  • Highlights scoring plays in real time
  • If no game is live, prints the last final and the next scheduled game

Outputs

  • Uses team abbreviations in the scoreboard
  • Shows ▲ for top and ▼ for bottom of the inning
  • Reprints a play if its description updates
  • Prints the scoreboard at start of halves and on End/Middle of innings
  • Prints an inning banner on half-inning transitions for readability
  • Colors: cyan for away, magenta for home, green for scoring plays
  • Disable color with --no-color
  • Includes ball-strike count and approximate pitch count per at-bat
  • Shows base runners when available (◉ occupied, ○ empty)
  • Pre-game shows probable pitchers and local start time
  • If a team has multiple games today, you can select which one to follow

CLI reference

  • team: team id, abbr, or name (e.g., 119, LAD, Dodgers)
  • --team: same as positional team
  • --date YYYY-MM-DD: date to search (default: today in Los Angeles)
  • --gamepk: MLB gamePk to stream directly
  • --interval: poll seconds (default 2.5)
  • --pitches: print each pitch
  • --from-start: print all prior at-bats on first fetch
  • --no-color: disable ANSI color
  • --scoring-only: only print scoring plays and inning transitions
  • --opponent TEAM: disambiguate doubleheaders by opponent (id, abbr, or name)
  • --log FILE: append the live stream to a file
  • --dump FILE: write full game log for the selected game and exit
  • --tz ZONE: override local timezone (e.g., America/New_York)
  • --line-score: print inning-by-inning linescore under the scoreboard
  • --box-interval N: every N minutes, reprint the scoreboard even if unchanged
  • --quiet: only scoreboard and inning banners
  • --verbose: extra details (pitches and runners)

Notes

  • Data comes from MLB StatsAPI schedule and the v1.1 live feed
  • Uses If-None-Match to avoid reprinting unchanged states
  • Team IDs are cached in ~/.utilityman/teams-<season>.json to reduce API calls

Config (optional)

Create ~/.utilityman/config.toml to set defaults:

team = "Dodgers"          # default team
tz = "America/Los_Angeles" # IANA timezone
interval = 2.5             # poll seconds
no_color = false           # disable ANSI color
line_score = true          # show inning-by-inning line score
box_interval = 5           # minutes between forced scoreboard prints

Metadata

Release files for utilityman 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for utilityman 0.4.0
File Size Uploaded Provenance Actions
utilityman-0.4.0.tar.gz 949.5 kB Without provenance Details for utilityman-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for utilityman 0.4.0
File Interpreter ABI Platform Actions
utilityman-0.4.0-py3-none-any.whl Python 3 none any Details for utilityman-0.4.0-py3-none-any.whl

Total release size: 964.1 kB

Release files / utilityman-0.4.0.tar.gz

Download URL utilityman-0.4.0.tar.gz
Size 949.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2611bba06ac73d1b8a585a82bdaa04a1d2a4d1b1383348560a111d0a20c779a2
BLAKE2b-256 checksum
How to use checksums
b7a275b398b3a00629a6aa58311bdc11c2faa91d78a2f8dc8ce62895009ed3c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release files / utilityman-0.4.0-py3-none-any.whl

Download URL utilityman-0.4.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cff08424b14c9603e07f21fe6cf0c409e20bc204b12082625100c014735e10a
BLAKE2b-256 checksum
How to use checksums
e2ec833ae994bc6cf444d12c89530ba53b36793c23eb3bf0f243f1aaaa2c9320
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Security for utilityman 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page