A Go CLI for The Odds API v4 with table output, JSON mode, historical queries, and a live watch TUI.
- Sports, events, odds, event-odds, markets, participants, scores, and credits commands
- Historical snapshots for odds/events/event-odds
watchmode for live polling odds or scores- Local response caching with configurable TTL/mode
- Player prop key discovery workflow
- Verbose API request logging via
--verbose
go install github.com/mgm702/odds-api-cli@latestbrew tap mgm702/tap
brew install oddsSet your API key:
export ODDS_API_KEY="your_key_here"Global flags:
--api-key--json--verbose--cache--cache-mode(smart|off|refresh)--cache-ttl(for example60s,5m)--cache-dir--no-color--date-format--odds-format(decimal|american)
odds sports
odds events basketball_nba
odds lines basketball_nba --regions us --markets h2h,spreads
odds scores basketball_nba --days-from 1
odds credits
odds watch basketball_nba --regions us
odds discover player-props basketball_nba --regions usodds sportsodds events <sport>odds lines <sport> --regions ...odds event-odds <sport> <event-id> --regions ... --markets ...odds markets <sport> <event-id>odds participants <sport>odds scores <sport>odds creditsodds watch <sport>odds discover player-props <sport>odds historical odds <sport> --date ... --regions ...odds historical events <sport> --date ...odds historical event-odds <sport> <event-id> --date ... --regions ... --markets ...
- Cache is enabled by default in CLI execution.
- Use
--cache-mode offto disable cache reads/writes. - Use
--cache-mode refreshto force network fetches while refreshing cache entries. - Watch mode disables cache reads by default; pass
--use-cacheto enable.
docs/configuration.mddocs/commands/