Follow any MLB game in your shell - the utility player for baseball fans
Project description
Utilityman
Follow your favorite MLB teams with live play-by-play in the terminal.
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
- Specific game (
gamePkid from BaseballSavant)
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>.jsonto 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
utilityman-0.3.0.tar.gz
(950.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file utilityman-0.3.0.tar.gz.
File metadata
- Download URL: utilityman-0.3.0.tar.gz
- Upload date:
- Size: 950.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a42c3b65ec3ac224b4ed87a8195fa79eba0565590fd3eb348f796b3acbbd91f2
|
|
| MD5 |
5ab3397a6e5f2e68dcaa9e42fed049f7
|
|
| BLAKE2b-256 |
cff4bc35a1abe45d883a42e2abd4d7e535d9488e3663d78eda34f4c3222e2775
|
File details
Details for the file utilityman-0.3.0-py3-none-any.whl.
File metadata
- Download URL: utilityman-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5dc280f101d806c1c4fe2cea8c7abdddbd7e5570b50272e3c6f1c2bd5c5fb15
|
|
| MD5 |
dc811868c8602de4328aa4aff5a08e68
|
|
| BLAKE2b-256 |
3087186260429a48b14a6566c9e7203cc30949f1c48c6449cf8a4634422168ad
|