claude-configs/skills/major-domo/CLI_REFERENCE.md
Cal Corum 43d32e9b9d Update major-domo skill CLI refactor and plugin/config updates
- Refactor major-domo skill: api_client.py, cli.py, and CLI modules (admin, common, injuries, results, schedule, transactions) with significant simplification (-275 lines net)
- Update CLI_REFERENCE.md and SKILL.md docs for major-domo
- Update create-scheduled-task SKILL.md
- Update plugins blocklist.json and known_marketplaces.json
- Add patterns/ directory to repo
- Update CLAUDE.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 02:00:41 -05:00

3.8 KiB

Major Domo - CLI Reference

Invocation

Wrapper: majordomo (alias, uses uv run)

Full path (for Claude Code):

python3 ~/.claude/skills/major-domo/cli.py <command>

Flag Ordering

--env, --json, --verbose are top-level flags (BEFORE subcommand). --season is a subcommand flag (AFTER subcommand).

# Correct:
python3 ~/.claude/skills/major-domo/cli.py --json team get CLS
python3 ~/.claude/skills/major-domo/cli.py --env dev team roster CAN

# Wrong (will error):
python3 ~/.claude/skills/major-domo/cli.py team get CLS --json

Commands

Status

cli.py status                              # Current season/week
cli.py health                              # API health check

Players

cli.py player get "Mike Trout"             # Get player info
cli.py player search "trout"               # Fuzzy search
cli.py player move "Name" TEAM             # Move single player
cli.py player move --batch "N1:T1,N2:T2"   # Batch moves

Teams

cli.py team list [--active]                # List teams
cli.py team get CAR                        # Team details
cli.py team roster CAR                     # Roster breakdown (Active/Injured List/Minor League)

Standings

cli.py standings [--division ALE]          # League standings

Transactions

cli.py transactions --team CLS --week 9                           # Team transactions
cli.py transactions list --week-start 1 --week-end 4              # Week range
cli.py transactions --player "Mike Trout"                         # Player transactions
cli.py transactions simulate CLS "Stott:CLSMiL,Walker:CLS"       # Compliance check (dry run)

Injuries

cli.py injuries list --team CLS --active   # Active injuries for team
cli.py injuries list --sort return-asc     # Sort by return date

Statistics

cli.py stats batting --sort woba --min-pa 100 --limit 25    # Batting leaders
cli.py stats pitching --sort era --min-outs 100 --limit 25  # Pitching leaders
cli.py stats batting --team CLS                              # Team batting

Results & Schedule

cli.py results --team CLS --week 9                            # Team results
cli.py results list --week-start 1 --week-end 4               # Range
cli.py schedule --team CLS --week 10                          # Team schedule
cli.py schedule list --week-start 10 --week-end 12            # Range

Admin (write operations)

cli.py admin recalculate-standings          # Recalculate standings
cli.py admin refresh-batting                # Refresh batting view
cli.py admin refresh-pitching               # Refresh pitching view
cli.py admin refresh-stats                  # Refresh both views
cli.py admin refresh-batting --season 11    # Specific season

Key Notes

  • team get shows salary_cap in formatted output; use --json for all fields
  • team roster shows Active/Injured List/Minor League with WARA values for Active only
  • For individual player lookups, use player get "Name" — bulk queries can timeout
  • transactions simulate validates compliance without making changes
  • stats commands support standard baseball stats sorting (woba, obp, slg, era, whip, fip, etc.)

Transaction Compliance Workflow

# 1. Simulate proposed moves (dry run)
cli.py transactions simulate CLS "Stott:CLSMiL,Walker:CLS,Castellanos:FA,Martin:CLS"

# Validates: roster count = 26, total sWAR <= salary_cap, all players exist

Manual verification (if needed):

  1. cli.py team roster ABBREV → note count and WARA
  2. cli.py --json team get ABBREV → read salary_cap
  3. cli.py player get "Name" for each incoming player
  4. Calculate: current sWAR ± changes <= cap, roster = 26
  5. cli.py player move --batch "Name1:Team1,Name2:Team2"