f1-tui

command module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2025 License: MIT Imports: 4 Imported by: 0

README

🏎️ F1 TUI

F1 TUI is a terminal-based application providing a rich interactive user interface to view the current Formula 1 season schedule, session details, and race results. It features live race position updates also!


Inspiration

Saw this post on Nothing's community playground, which sparked this idea!


Features

  • Displays current season race calendar with local session start and end times.
  • Session list per GP showing Practice, Qualifying, Sprint, and Race events.
  • Detailed session results including driver position, team, time, status, and points.
  • Live race leaderboard refreshes every 5 seconds during live races.
  • Keyboard shortcuts:
    • ←/→ Switch between different GPs (race rounds)
    • ↑/↓ Navigate session list or scroll results
    • Enter Show results for the selected session
    • c Toggle circuit ASCII art
    • r Refresh race schedule and results
    • q or Ctrl+C Quit the application
    • ESC or Backspace Go back from results view

Installation

Ensure you have Go 1.20+ installed. Clone the repo and use go run to start:

git clone https://github.com/kashifulhaque/f1-tui.git
cd f1-tui
go run .

Screenshots

Main Schedule View with Flags and Sessions

Schedule View

Detailed Race Results with Points

Race Results


Code Structure

  • main.go — Entry point, starts the TUI program.
  • internal/api/ergast.go — Interacts with the Ergast F1 API for schedule and session data.
  • internal/models/types.go — Data models for races, sessions, and driver results.
  • internal/ui/ — UI components including model, view, update, styles, and commands.
  • internal/utils/ — Utility functions including flag emoji generation and time parsing.

Contribution

Contributions are welcome! Feel free to submit issues or pull requests to enhance functionality or improve UX.


Release

To create a release:

git tag v1.0.0
git push origin v1.0.0

License

MIT License © 2025

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
api
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL