A conversational CLI copilot for Fantasy Premier League, powered by Claude
Project description
FPL Copilot
A conversational CLI copilot for Fantasy Premier League. Chat with Claude to analyze your team, scout players, check fixtures, and execute transfers — all from your terminal.
Think of it like Claude Code, but for FPL.
Installation
pip install fpl-copilot
playwright install chromium
Setup
fpl-copilot init
This will prompt you for:
- Anthropic API key (get one here)
- FPL team ID (find it in the URL when viewing your team:
fantasy.premierleague.com/entry/XXXXXXX/...) - FPL email & password (optional — only needed to execute transfers)
- Firecrawl API key (optional — for enhanced player news from BBC/Sky Sports)
Config is saved to ~/.config/fpl-copilot/config.json.
Usage
fpl-copilot
> who is my captain?
⠋ Checking get_my_team...
Your captain is Erling Haaland (Manchester City, £14.4m).
> any injury concerns?
⠋ Checking get_injury_news...
2 flagged players in your squad:
Salah — Doubtful (hamstring, 50% chance)
Watkins — Injured (knee, expected back GW32)
> who should I replace Watkins with?
⠋ Checking get_transfer_options...
Top 5 replacements for Watkins (FWD, £7.8m budget):
1. Isak (NEW) — £7.5m, form 8.2, score 6.41
...
What you can ask
- "Show me my team" — full squad with form, price, and status
- "How's my budget looking?" — bank balance, free transfers, available chips
- "Any injury news?" — flagged players in your squad
- "Tell me about Palmer" — detailed stats, recent form, upcoming fixtures
- "Who should I replace Salah with?" — top 5 ranked alternatives within budget
- "Is it worth taking a hit for Haaland?" — projected net gain analysis
- "What are Arsenal's next 5 fixtures?" — fixture difficulty ratings
- "Transfer out Salah, bring in Palmer" — stages the transfer for your approval
CLI Reference
fpl-copilot Open the copilot
fpl-copilot init Set up your credentials
fpl-copilot version Show version
fpl-copilot help Show help
In-session commands:
| Command | Description |
|---|---|
/quit |
Exit |
/clear |
Clear conversation history |
/history |
Show conversation history |
/debug |
Toggle verbose tool call logging |
Architecture
cli.py → Chat loop (Rich UI + Anthropic API)
core/fpl.py → Async FPL API wrapper (aiohttp)
core/scoring.py → Player scoring and ranking logic
tools/team.py → Team, budget, and player stat tools
tools/news.py → Injury news and player availability
tools/analysis.py → Transfer recommendations and fixture analysis
tools/browser.py → Playwright-based login and transfer execution
tools/registry.py → Anthropic tool definitions and handler mapping
Claude handles all orchestration — no LangGraph or agent frameworks. The CLI sends your message plus the tool definitions to Claude, which decides what to call based on your question. Transfers require explicit y confirmation before executing.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fpl_copilot-0.1.5.tar.gz.
File metadata
- Download URL: fpl_copilot-0.1.5.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca33e6806a83806473865dec50298e259973fa57715fd12d563d07c44984f94a
|
|
| MD5 |
0ac9432768b7ad9f68474bc70fee5f3a
|
|
| BLAKE2b-256 |
0a06eaad11607470b5c90e9c5e3fa8e92461d852bcc96434f0613158458af9d1
|
File details
Details for the file fpl_copilot-0.1.5-py3-none-any.whl.
File metadata
- Download URL: fpl_copilot-0.1.5-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b539139e1618019437e2b03af836fa15c13d4c0254010fa8b4c3f512de32d915
|
|
| MD5 |
8145165b52c13872077cae11c914d7cb
|
|
| BLAKE2b-256 |
edd489cb40d651ee80a8b2b5d03bf7959142df48f374fcd4eba3eebd2d26ba07
|