mlbt

April 27, 2026 · View on GitHub

CI dependency status Built With Ratatui

mlb.com in your terminal. Gameday, scores, stats, standings, teams, and player profiles. Powered by MLB's Stats API, check today's games or dig through decades of historical information. Go beyond the broadcast and nerd out with win probability, leverage index, exit velo, and more.

Demo showing the Schedule, Gameday, Stats, and Standings.

Table of Contents

Installation

Cargo

Install a pre-built binary using cargo-binstall:

cargo binstall mlbt

Or build from source:

cargo install mlbt

Homebrew

brew install mlb-rs/mlbt/mlbt

To update to the latest version:

brew upgrade mlbt

Binaries

macOS, Linux, and Windows binaries are available on the releases page.

PlatformTarget
macOS (Apple Silicon)aarch64-apple-darwin
macOS (Intel)x86_64-apple-darwin
Linux (x86_64)x86_64-unknown-linux-gnu
Linux (x86_64, static)x86_64-unknown-linux-musl
Linux (ARM64)aarch64-unknown-linux-gnu
Linux (ARM64, static)aarch64-unknown-linux-musl
Linux (ARMv7)armv7-unknown-linux-gnueabihf
Windows (x86_64)x86_64-pc-windows-msvc

.deb and .rpm packages are also available for Linux x86_64 and ARM64.

Docker

mlbt publishes docker images on ghcr.

docker run -it --rm --name mlbt ghcr.io/mlb-rs/mlbt

mlbt follows semver practices. You can execute individual releases explicitly.

docker run -it --rm --name mlbt ghcr.io/mlb-rs/mlbt:v0.2.0

Alternatively build the mlbt image with:

docker build -t mlbt .

Execute mlbt within the container with:

docker run -it --rm --name mlbt mlbt:latest

Features

  • scoreboard and box score

    • sorted by favorite team
    • full box score
    • probable pitchers for upcoming games
    • win probability graph
    • selectable date
  • gameday

    • pitch display
    • batter strike zone with heat map coloring
    • selectable at bats (view the pitches and outcome of any at bat in the game)
    • hit stats: exit velocity, launch angle, distance
    • ABS challenge information for 2026+ games
    • leverage index and win probability change per at bat
  • pitching and hitting stats

    • player stats
    • team stats
    • sorting
    • fuzzy search for players and teams
    • selectable date
  • standings

    • sorted by favorite team
    • division/league view
    • selectable date
  • team page

    • roster (active and 40-man)
    • schedule with calendar view
    • recent transactions
  • player profile

    • player bio
    • career stats
    • recent games
  • configuration

    • favorite team
    • time zone

Usage

After installing, run mlbt from your terminal to open the program.

Press q to exit at any time.

Tabs

There are four main tabs.

  • Scoreboard
  • Gameday
  • Stats
  • Standings

Press f for full screen mode to hide the tab bar.

Scoreboard

Press 1 to activate this tab.

KeyDescription
j / move down
k / move up
Enterview current game in Gameday
:activate date picker (see Date Picker)
wtoggle win probability graph
hswitch to home team in box score
aswitch to away team in box score
Shift + j/ scroll box score down
Shift + k/ scroll box score up

Gameday

Press 2 to activate this tab.

By default, the info and pitches panes are shown. However, each pane can be toggled on and off using:

KeyDescription
iinfo pane
ppitches pane
bbox score pane
wtoggle win probability graph

To view different at bats in the game, use:

KeyDescription
j / move to previous at bat
k / move to next at bat
lmove to the "live" at bat, or latest available
smove to first at bat of the game

To interact with the box score, use:

KeyDescription
hswitch to home team in box score
aswitch to away team in box score
Shift + j/ scroll box score down
Shift + k/ scroll box score up

Stats

Press 3 to activate this tab.

Inside the stats tab there are two panes: stats table and options. The stats table is used for selecting players/teams and searching. The options pane is used for sorting the stats and toggling columns on/off.

KeyDescription
/ / Tabswitch between stats table and options pane
j / move down in active pane
k / move up in active pane
Shift + j / page down in stats table
Shift + k / page up in stats table
:activate date picker (see Date Picker)

Switch between pitching and hitting stats, filter by team or player, and choose to view all or just qualified players.

KeyDescription
ppitching
hhitting
tteam
lplayer
aall players
uqualified

You can fuzzy search for a player or team in the stats table using:

KeyDescription
Ctrl + factivate fuzzy search
Enterfinish fuzzy search
Escclear fuzzy search results

While the stats table is active, press Enter to view a player profile or a team page.

Stats Options

The stats options pane can be turned on/off with o.

Within each stat group (pitching or hitting) you can toggle the display of individual stat columns by selecting the stat with Enter. To sort the stats by a column, you can press s. To flip the sort order from ascending to descending or vice versa press s again.

KeyDescription
Entertoggle stat column
ssort by the currently selected column
otoggle options pane

If your terminal is too small to display all columns, they will be turned off starting from the right side.

Standings

Press 4 to activate this tab.

KeyDescription
j / move down
k / move up
Enterview team page
:activate date picker (see Date Picker)
ltoggle division/league view

Player Profile

The player profile shows a player's career stats and recent games. It can be opened from Stats or from a team page roster by pressing Enter.

KeyDescription
stoggle stat category
j / scroll down
k / scroll up
Shift + j / page down
Shift + k / page up
Escclose profile

Team Page

The team page shows a team's roster, schedule, and recent transactions. It can be opened from Standings or from Stats by pressing Enter.

KeyDescription
/ / Tabswitch section
j / move down
k / move up
Shift + j / page down
Shift + k / page up
ctoggle calendar
rtoggle roster type
Enterview player profile from roster
Escclose team page

Date Picker

With the date picker active, input a date in the form of YYYY-MM-DD, or use the left/right arrow keys, and press Enter.

KeyDescription
/ use arrow keys to navigate date
Enterconfirm the selected date
Esccancel selection
today / tgo back to the current day

Note that each tab has its own date, i.e. if you're viewing older stats or standings, the schedule can be the current date.

Help

Press ? from any tab to open the help page.

KeyDescription
j / move down
k / move up
Shift + j / page down
Shift + k / page up
Escclose help box
"display logs

Config

The TUI can be configured two ways:

  1. TUI editor (recommended): open the help page with ?, press Tab to focus the settings panel on the right, and use j/k to pick a field. Press Enter to open the picker and then Enter again to save the setting.
  2. Manually editing the config file: edit the toml file directly. Useful for timezones outside the curated options in the TUI.

The config file is located at:

  • Linux: ~/.config/mlbt/mlbt.toml
  • Windows: ~\AppData\Roaming\mlbt\mlbt.toml
  • macOS: ~/Library/Application Support/mlbt/mlbt.toml

The path is also shown at the bottom of the Help page.

Available settings

  • favorite_team: team to highlight in standings and surface first in the schedule. TUI: picker shows all 30 current teams. Manually: use the full name (e.g. "Chicago Cubs"). See the full list.
  • timezone: time zone for the start time of the games in the schedule. The default is US/Pacific. In app picker covers common zones: Pacific, Arizona, Mountain, Central, Eastern, London, Central Europe, Tokyo, Seoul, Sydney, UTC. For anything else, edit the toml file with any value from the tz database.
  • log_level: one of off, error, warn, info, debug, trace. Default is error.

Example config

# See https://github.com/mlb-rs/mlbt#config for options
favorite_team = "Chicago Cubs"
timezone = "US/Pacific"
log_level = "error"

Shout out

This was originally built with the wonderful tui-rs. It is now using the also wonderful fork, ratatui.

These TUIs were extremely helpful: spotify-tui, tickrs, bottom.

A reference MLB stats API client by toddrob99 helped make up for the lack of API documentation.

The data used in this application is supplied by the MLB's Stats API. Use of this data is subject to the license posted here: http://gdx.mlb.com/components/copyright.txt.

This application and its author are not affiliated with the MLB.

License

This project is under the MIT License.