Skip to content
On this page

CLI Examples

This page shows copyable examples for the customer-facing sfs command-line interface.

CLI access is included with Scottfree Sports Premium.

Install And Configure

Install:

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

Configure with your Scottfree Sports API key:

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

Use the system keyring:

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

Show the active profile:

bash
sfs config show

List profiles:

bash
sfs config profiles

Daily Brief

Daily model research brief:

bash
sfs brief get mlb

JSON output for scripts:

bash
sfs brief get mlb --output json

Predictions

Moneyline:

bash
sfs predictions get mlb moneyline
sfs predictions get mlb ml

Spread:

bash
sfs predictions get nba spread

Over/under:

bash
sfs predictions get nhl over_under
sfs predictions get nhl ou

JSON:

bash
sfs predictions get mlb ml --output json

CSV:

bash
sfs predictions get mlb spread --output csv

No terminal color:

bash
sfs predictions get mlb moneyline --no-color

List sports and model types:

bash
sfs predictions list-sports

Results

Recent results:

bash
sfs results get mlb moneyline

Limit rows:

bash
sfs results get nba spread --limit 25

Short market aliases work:

bash
sfs results get nhl ou -l 50

Summary

Moneyline summary:

bash
sfs summary get mlb moneyline

Spread summary:

bash
sfs summary get nba spread

Over/under summary:

bash
sfs summary get nhl over_under

Odds

Current odds:

bash
sfs odds get mlb
sfs odds get nba

Public Consensus

Table output:

bash
sfs consensus get mlb

JSON:

bash
sfs consensus get nba -o json

CSV:

bash
sfs consensus get nfl -o csv

Weather

Weather is most useful for outdoor sports:

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

Live Scores

Scores use BALLDONTLIE. If your account has no BALLDONTLIE key configured, the command returns a clear setup message.

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

Configure BALLDONTLIE:

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

Injuries

Injury data requires BALLDONTLIE's GOAT tier:

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

Players

Rosters and player search:

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

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 Scottfree model data with available prediction-market data:

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

Account And Usage

Account:

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 "Desktop App"
sfs account revoke-key sk_alphapysports_abcd*****

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

Example Research Session

Research an MLB moneyline slate:

bash
sfs account usage
sfs brief get mlb
sfs predictions get mlb ml
sfs odds get mlb
sfs summary get mlb ml
sfs results get mlb ml --limit 50
sfs consensus get mlb
sfs weather get mlb

Research an NBA spread slate:

bash
sfs brief get nba
sfs predictions get nba spread
sfs odds get nba
sfs summary get nba spread
sfs results get nba spread --limit 50
sfs consensus get nba
sfs scores injuries nba

For assistant workflows using the same data, see MCP Workflows.

Sports model data and research tools