Skip to main content

Fpl Autopilot

@aaronge/fpl-autopilotv2026.08.20.1· 2d agoMODELSWORKFLOWS
01README

Manage a Fantasy Premier League team end to end: sync game data and your squad, draft a legal squad from scratch, get fixture-difficulty outlooks, injury-aware lineups and hit-aware transfer and captaincy advice, track mini-leagues and price moves, then write transfers and lineups back to FPL.

02Models1
@aaronge/fpl/managerv2026.08.19.1fpl_manager.ts

Global Arguments

ArgumentTypeDescription
entryId?number
refreshToken?string
bearerToken?string
tokenEndpointstring
clientIdstring
authorizeEndpointstring
redirectUristring
scopestring
cookie?string
leagueIdsarray
horizonnumber
watchlistarray
excludeTeamsarray
excludePlayersarray
transferSuggestionsnumber
userAgentstring
fn sync_game()
Fetch bootstrap-static and the fixture list: gameweeks, teams, all
fn login_start(open: boolean)
Begin an interactive login. Opens your browser at the sign-in page;
ArgumentTypeDescription
openboolean
fn login_finish(code: string)
Complete an interactive login by exchanging the authorization code
ArgumentTypeDescription
codestring
fn refresh_auth()
Exchange the stored refresh token for a fresh access token and cache
fn whoami()
Resolve your entry ID and team name from the authenticated session
fn sync_squad(gameweek?: number, publicOnly: boolean)
Fetch your 15-player squad — the live pre-deadline team when a
ArgumentTypeDescription
gameweek?number
publicOnlyboolean
fn fixture_outlook(fromEvent?: number, horizon?: number)
Rank every club by fixture difficulty over the next N gameweeks,
ArgumentTypeDescription
fromEvent?number
horizon?number
fn advise()
Recommend a captain, vice-captain and transfers by combining player
fn build_squad(budget: number, passes: number, excludeTeams?: array)
Build a legal 15-player squad from scratch within budget, maximising
ArgumentTypeDescription
budgetnumber
passesnumber
excludeTeams?array
fn apply_transfers(transfers: array, fromAdvice: boolean, limit: number, chip?: string, dryRun: boolean, allowUnavailable: boolean)
Write transfers back to FPL. Validates positions, budget and the
ArgumentTypeDescription
transfersarray
fromAdviceboolean
limitnumber
chip?string
dryRunboolean
allowUnavailableboolean
fn set_lineup(starters: array, captain?: number, viceCaptain?: number, benchOrder: array, fromAdvice: boolean, chip?: string, cancelChip: boolean, dryRun: boolean)
Write a starting eleven, bench order and armband back to FPL.
ArgumentTypeDescription
startersarray
captain?number
viceCaptain?number
benchOrderarray
fromAdviceboolean
chip?string
cancelChipboolean
dryRunboolean
fn sync_leagues(leagueIds?: array, limit: number)
Fetch standings for every configured classic mini-league in one
ArgumentTypeDescription
leagueIds?array
limitnumber
fn price_watch()
Compare the two most recent player syncs and report every price

Resources

game(infinite)— Gameweek calendar, teams and game settings
players(infinite)— All FPL players with prices, form and underlying stats
fixtures(infinite)— Season fixture list with difficulty ratings
pendingLogin(1h)— PKCE state for an in-progress interactive login
session(infinite)— Cached OAuth session — access and refresh tokens
identity(infinite)— Authenticated manager identity and entry ID
squad(infinite)— Your current 15-player squad
draft(infinite)— A squad built from scratch within budget
applied(infinite)— Record of transfers and lineups written back to FPL
outlook(infinite)— Per-team fixture difficulty over the coming gameweeks
advice(infinite)— Captain pick, transfer suggestions and injury flags
league(infinite)— Classic mini-league standings
priceMoves(infinite)— Price rises and falls since the previous player sync
03Workflows2
@aaronge/fpl-draft92dcd18b-259d-4125-85ac-bfe96e3ab3e2

Cold start for a brand-new Fantasy Premier League manager: sync the game data, build the fixture outlook, then draft a legal 15-player squad within budget that maximises the projected points of the starting eleven. Requires no credentials — every step uses public endpoints. Steps run sequentially because they all target the `fpl` model and would otherwise contend on its per-model lock.

mainSync, analyse and draft a squad
1.sync-gamefpl.sync_game— Fetch gameweeks, teams, all players and the fixture list
2.fixture-outlookfpl.fixture_outlook— Rank clubs by fixture difficulty over the coming gameweeks
3.build-squadfpl.build_squad— Draft a legal 15-player squad within budget
4.assert-within-budget— Confirm the drafted squad does not exceed the budget
5.assert-squad-complete— Confirm the draft filled all fifteen places
@aaronge/fpl-weekly2d35c6fc-a2ad-4340-af80-5c5bd369dbd5

Weekly Fantasy Premier League routine: refresh game data, rebuild the fixture outlook, pull your squad, then produce captain and transfer advice, mini-league standings and price-movement alerts. Steps run sequentially because they all target the `fpl` model and would otherwise contend on its per-model lock.

mainSync, analyse and advise
1.refresh-authfpl.refresh_auth— Exchange the refresh token for a fresh access token
2.whoamifpl.whoami— Discover the FPL entry ID from the bearer token
3.sync-gamefpl.sync_game— Refresh gameweeks, teams, all players and the fixture list
4.fixture-outlookfpl.fixture_outlook— Rank clubs by fixture difficulty over the coming gameweeks
5.sync-squadfpl.sync_squad— Pull your current 15-player squad
6.advisefpl.advise— Recommend a captain, vice-captain and transfers
7.sync-leaguesfpl.sync_leagues— Refresh classic mini-league standings
8.price-watchfpl.price_watch— Report price rises and falls since the previous sync
9.assert-advice— Confirm advice was produced for a real gameweek
04Stats
A
100 / 100
Downloads
0
Archive size
86.6 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms