Skip to content
On this page

Scottfree Sports CLI

sfs is the command-line interface for Scottfree Sports. It lets Premium subscribers query model predictions, current odds, historical results, summaries, account usage, public consensus, weather, live scores, rosters, injuries, and prediction-market context from a terminal.

The MCP server (sfs-mcp) ships in the same package. See MCP Server Setup for assistant workflows.

Access

ProductCLI access
Scottfree Sports DataNo
Scottfree Sports BasicNo
Scottfree Sports PremiumYes

The CLI uses the same Scottfree Sports API key as the web app and REST API.

Install

Requires Python 3.11 or newer.

bash
python3 --version
python3 -m pip install --upgrade scottfree-sports-cli

Verify:

bash
sfs --version
sfs --help

Configure

Production profile:

bash
sfs config set \
  --api-key sk_alphapysports_PASTE_YOUR_KEY \
  --api-url https://sports-api.scottfreellc.com \
  --env default

Store keys in macOS Keychain or your system keyring:

bash
sfs config set --api-key sk_alphapysports_PASTE_YOUR_KEY --use-keyring

Show the current profile:

bash
sfs config show

List profiles:

bash
sfs config profiles

Config file location:

text
~/.sfs/config.toml

Resolution order:

  1. SFS_API_KEY and SFS_API_URL environment variables.
  2. System keyring value if the profile stores keyring:.
  3. The selected profile in ~/.sfs/config.toml.
  4. Default API URL: https://sports-api.scottfreellc.com.

Sports And Model Types

Sports:

text
mlb, nba, nfl, nhl, ncaaf, ncaab

Model type shorthands:

CLI shorthandREST valueMarket
ou, over_underover_underTotal
ml, moneylinewon_on_pointsMoneyline
spreadwon_on_spreadSpread

List from the API:

bash
sfs predictions list-sports

Command Map

CommandPurpose
sfs brief getDaily model research brief
sfs predictions getCurrent slate model probabilities
sfs predictions list-sportsSupported sports and model types
sfs results getRecent graded results
sfs summary getModel performance summary
sfs odds getCurrent odds
sfs consensus getCovers public betting consensus
sfs weather getOutdoor venue weather
sfs scores scoresLive scores through BALLDONTLIE
sfs scores injuriesInjury reports through BALLDONTLIE GOAT tier
sfs scores playersRosters through BALLDONTLIE
sfs markets kalshiKalshi markets
sfs markets polymarketPolymarket markets
sfs markets compareModel predictions plus market data
sfs account infoAccount record
sfs account usageAPI quota usage
sfs account keysList API keys
sfs account create-keyCreate another key
sfs account rename-keyRename a key
sfs account revoke-keyRevoke a key
sfs config setSave profile settings
sfs config showShow one profile
sfs config profilesList profiles

Daily Brief

The brief combines over/under and spread model data for the slate. It returns:

  • game date and ET game time,
  • teams,
  • current line,
  • ML model pick label,
  • model probability,
  • market-implied probability,
  • signed Delta(Model-Implied) in percentage points,
  • count of individual models above or below market-implied probability.
bash
sfs brief get mlb
sfs brief get nhl --output json
sfs brief get nba -o json

Output modes:

ModeFlagNotes
MarkdowndefaultBest for terminal copy/paste into notes
JSON-o jsonBest for scripts

Important reading rules:

  • Spread is home-relative.
  • Moneyline is home-relative.
  • Over/under is over-relative.
  • Delta(Model-Implied) is model probability minus market-implied probability on that axis.
  • The brief is model research, not a guaranteed betting recommendation.

Predictions

bash
sfs predictions get mlb moneyline
sfs predictions get mlb ml
sfs predictions get nba spread
sfs predictions get nhl over_under
sfs predictions get mlb ou --output json
sfs predictions get mlb spread -o csv
sfs predictions get mlb moneyline --no-color

Output modes:

ModeFlagNotes
Rich tabledefaultHuman terminal view
JSON-o jsonRaw API response
CSV-o csvFlattened team and model probability columns

Prediction output includes the model probability columns:

text
IMPLIED, AI, BLEND, CATB, RF, LGB, LOGR, XGB, XT

The JSON response also includes line fields such as:

text
open_over_under, over_under,
open_home_point_spread, home_point_spread,
open_home_money_line, home_money_line,
open_away_money_line, away_money_line

Results

bash
sfs results get mlb moneyline
sfs results get nba spread --limit 25
sfs results get nhl over_under -l 50

Current CLI behavior: results render as a Rich table. Use the REST API directly for full JSON:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/results/mlb/won_on_points?limit=25"

Summary

bash
sfs summary get mlb moneyline
sfs summary get nba spread
sfs summary get nhl over_under

Current CLI behavior: summary renders as a Rich table. Use the REST API directly for full JSON:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  https://sports-api.scottfreellc.com/api/v1/summary/mlb/won_on_points

Odds

bash
sfs odds get mlb
sfs odds get nba

Current CLI behavior: odds render as a Rich table. Use the REST API directly for full JSON:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  https://sports-api.scottfreellc.com/api/v1/odds/mlb

Consensus

Public betting consensus comes from Covers.

bash
sfs consensus get mlb
sfs consensus get nba -o json
sfs consensus get nfl -o csv

Output modes:

text
table, json, csv

Weather

Weather covers outdoor venue sports where venue mapping is available.

bash
sfs weather get mlb
sfs weather get nfl -o json
sfs weather get ncaaf -o csv

Output modes:

text
table, json, csv

Live Scores, Injuries, And Players

These commands use BALLDONTLIE. Configure your own BALLDONTLIE key:

bash
sfs config set --balldontlie-api-key YOUR_BALLDONTLIE_KEY --use-keyring

Scores:

bash
sfs scores scores nba
sfs scores scores mlb --date 2026-05-23
sfs scores scores nhl -o json

Injuries:

bash
sfs scores injuries nba
sfs scores injuries nfl -o json

BALLDONTLIE player injuries require their GOAT tier. Lower tiers return a clear upgrade-required message.

Players:

bash
sfs scores players nba
sfs scores players nba --search James
sfs scores players nba --team-id 14 --per-page 50
sfs scores players mlb -o csv

Output modes:

text
table, json, csv

Prediction Markets

Kalshi:

bash
sfs markets kalshi nfl
sfs markets kalshi nba -o json

Polymarket:

bash
sfs markets polymarket mlb
sfs markets polymarket nba -o csv

Compare model predictions with market data:

bash
sfs markets compare mlb
sfs markets compare nba -o json

Output modes:

text
table, json, csv

Account

Account info:

bash
sfs account info
sfs account info -o json

Usage:

bash
sfs account usage
sfs account usage -o json

Keys:

bash
sfs account keys
sfs account keys -o json
sfs account create-key --name "Research Laptop"
sfs account rename-key sk_alphapysports_abcd***** --name "Production App"
sfs account revoke-key sk_alphapysports_abcd*****

The API will not let you revoke the key currently being used for the request.

Environment Variables

VariablePurpose
SFS_API_KEYScottfree Sports API key
SFS_API_URLAPI base URL
SFS_CONFIG_DIROverride config directory
BALLDONTLIE_API_KEYBALLDONTLIE key for scores, players, injuries

Shell Completion

Typer can install shell completions:

bash
sfs --install-completion

Print completion script:

bash
sfs --show-completion

Troubleshooting

No API key configured

Run:

bash
sfs config set --api-key sk_alphapysports_PASTE_YOUR_KEY

or set:

bash
export SFS_API_KEY="sk_alphapysports_PASTE_YOUR_KEY"

401 Invalid or expired API key

Check the key in the Account page, then update the CLI profile. If you regenerated or revoked a key, old CLI profiles still point at the old key until changed.

403

Your key is valid but your product does not allow that command. CLI access is Premium only.

BALLDONTLIE errors

Scores and players need a BALLDONTLIE key. Injuries require BALLDONTLIE GOAT tier.

Need raw JSON for a table-only command

Use the REST API directly with curl. The CLI intentionally keeps results, summary, and odds as terminal tables today.

For copyable command examples grouped by task, see CLI Examples.

Sports model data and research tools