A full-featured Formula 1 terminal UI built with Go and Charm
Real race analysis, live standings, circuit track maps, pit stop insights, AI chat, and a growing deep-dive Race Analysis mode β all in your terminal.
A dedicated deep-dive view for any completed session β navigate to any race weekend and explore 9 interactive charts:
| # | Chart | What you see |
|---|---|---|
| β | Strategy | Per-driver tyre stint timeline β compound colours, lap counts, undercut/overcut windows |
| β‘ | Sparklines | Per-driver lap-time sparklines across the full race β identify degradation and purple laps at a glance |
| β’ | Pace | Box-plot style pace distribution per driver β median, spread, outlier laps |
| β£ | Sectors | Sector-by-sector time breakdown per driver across all laps |
| β€ | Speed Trap | Top-speed trap readings per driver β straight-line performance comparison |
| β₯ | Positions | Position changes chart β every driver's race trajectory lap-by-lap, right-anchored finish sidebar |
| β¦ | Team Pace | Constructor-level pace comparison β team median vs field |
| β§ | Pit Stops | Ranked pit stop duration bar chart (see below) |
| # | Tab | What you get |
|---|---|---|
| 1 | Dashboard (WIP) | Live timing β being rebuilt on top of the official F1 live-timing protocol |
| 2 | Standings | Driver & Constructor championship standings with team-coloured proportional bar charts |
| 3 | Schedule | Full season calendar grouped by month. Cursor-navigate with j/k. Next race auto-highlighted |
| 4 | Weather | Air temp, track temp, humidity, pressure, wind speed/direction, rainfall + sparkline trend charts |
| 5 | Ask AI | Chat with Groq's compound-beta model (live web search) β race strategy, regulations, history |
| 6 | Track Map | Real circuit outlines rendered from GPS coordinate data. Corner numbers overlaid. s to simulate any GP, along with Heatmaps of driver speed |
| 7 | Driver Stats | Per-driver lap-time sparklines, best/avg/worst laps, sector trends, lap histogram, pit stop counts |
| 8 | Race Analysis | 9-chart deep-dive for any session β strategy, pace, positions, pit stops, sectors, speed |
Speed Heatmap β Full-field speed trace overlaid on circuit
Go to Releases and download the archive for your platform:
| Platform | File |
|---|---|
| macOS (Apple Silicon) | termf1-v2.x.x-darwin-arm64.tar.gz |
| macOS (Intel) | termf1-v2.x.x-darwin-amd64.tar.gz |
| Linux x86-64 | termf1-v2.x.x-linux-amd64.tar.gz |
| Linux ARM64 | termf1-v2.x.x-linux-arm64.tar.gz |
| Windows x86-64 | termf1-v2.x.x-windows-amd64.zip |
# macOS / Linux example
tar xzf termf1-v2.x.x-darwin-arm64.tar.gz
export GROQ_API_KEY=your_key_here
./termf1git clone https://github.com/dk-a-dev/termf1
cd termf1
cp .env.example .env # fill in your GROQ_API_KEY
source .env
make runInstall globally to $GOPATH/bin:
make install # then just: termf1export GROQ_API_KEY=your_key_here
go installgithub.com/dk-a-dev/termf1/v2@latest
termf1- Go 1.22+
- A 256-colour / true-colour terminal (iTerm2, Ghostty, kitty, WezTerm, etc.)
- Groq API key β free tier is sufficient for the Ask AI tab
Copy .env.example to .env and set:
GROQ_API_KEY=your_groq_api_key_here # required for Ask AI
GROQ_MODEL=compound-beta # default; supports any Groq model
REFRESH_RATE=5 # seconds between live-data polls| Key | Action |
|---|---|
1β8 |
Jump to tab |
Tab / Shift+Tab |
Cycle tabs |
β β / j k |
Scroll / move cursor |
r |
Refresh current view |
q / Ctrl+C |
Quit |
| Schedule | |
Enter / Space |
Expand race session detail |
| Track Map | |
s |
Toggle Australian GP simulation |
| Driver Stats | |
β β / h l |
Previous / next driver |
t |
Switch sub-tab (Overview β Lap Analysis β Sectors) |
| Race Analysis | |
β β / h l |
Previous / next chart |
Enter |
Select race from session picker |
| Ask AI | |
Enter |
Send message |
Esc |
Blur input (enables viewport scroll) |
Ctrl+L |
Clear chat history |
| Source | Used for |
|---|---|
| OpenF1 API | Sessions, laps, positions, stints, pit stops, weather, speed trap |
| Jolpica / Ergast API | Championship standings, full season calendar |
| Multiviewer API | Real GPS circuit coordinate data for track maps |
| Groq API | AI chat with live web search (compound-beta) |
A custom Go server that connects to the official F1 live-timing SignalR feed (livetiming.formula1.com) and broadcasts a clean WebSocket/JSON stream that the TUI subscribes to:
- Reverse-engineered SignalR handshake + subscription topics:
TimingData,CarData.z,Position.z,RaceControlMessages,TeamRadio,SessionInfo - Real-time sector splits and mini-sectors per car
- Per-car telemetry: speed, throttle %, brake %, gear, RPM, DRS state
- Race control messages (SC, VSC, red flag, penalties) piped live into the dashboard header
- Live gap tree: delta to leader, delta to car ahead, racing interval
- On-track battle detection β automatic highlight when two cars are within 1 s
Rebuild the dashboard as a unified live race command centre:
- Animated driver dots on the real circuit outline (GPS X/Y positions from
Position.z) - Side-by-side track map + live timing table + mini gap sparklines
- Real tyre age counters ticking per lap
- Weather overlay: real-time track/air temp, rain probability
- Team radio clips β playback URLs streamed from
TeamRadiotopic
- Tyre degradation model β fitted lap-time slope per stint, visualised as a trendline on sparklines
- Undercut/overcut detection β flag when a driver gained/lost position via pit stop timing
- Interactive session picker UI (rather than config flag)
- Head-to-head driver comparison mode across any two drivers
- Animated replay of race positions chart with a lap scrubber
termf1/
βββ main.go
βββ termf1-server β live-timing server binary (v3 WIP)
βββ python/
β βββ analysis.ipynb β data exploration notebook
βββ internal/
β βββ config/ β env var loading
β βββ api/
β β βββ openf1/ β OpenF1 REST client, typed models (Session, Lap, Stint, Position, Pitβ¦)
β β βββ jolpica/ β Jolpica/Ergast client (standings, calendar)
β β βββ groq/ β Groq chat completions client
β β βββ multiviewer/ β Multiviewer circuit coordinate client
β βββ ui/
β βββ app.go β root Bubbletea model, tab navigation, header/footer
β βββ styles/ β Lipgloss colour palette, team/tyre colour helpers
β βββ views/
β βββ dashboard/ β [WIP v3] live timing command centre
β βββ standings/ β championship standings + bar charts
β βββ schedule/ β scrollable calendar with month grouping
β βββ weather/ β weather cards + sparklines
β βββ chat/ β Groq AI chat
β βββ trackmap/ β real circuit renderer + simulation mode
β βββ driverstats/ β per-driver stats, graphs, sector breakdown
β βββ analysis/ β Race Analysis β 9 charts
β βββ model.go chart state, data messages
β βββ fetch.go parallel OpenF1 data fetching
β βββ charts.go chart dispatcher + shared helpers
β βββ strategy.go tyre stint timeline
β βββ laptimes.go lap-time sparklines
β βββ pace.go pace distribution
β βββ sectors.go sector breakdown
β βββ speedtrap.go speed trap comparison
β βββ positions.go position changes chart
β βββ teampace.go constructor pace comparison
β βββ pitstops.go pit stop duration ranked chart














