tif1 CLI provides quick access to F1 data without writing Python code.
Installation
The CLI is included with tif1. Verify installation:Global Options
These options work with all commands.Commands
events
List all events (Grand Prix) for a given year.- Example
- Output
sessions
List available sessions for a specific event.- Example
- Output
laps
Fetch and display lap data.- Example
- Output
Examples:
telemetry
Fetch telemetry data for a specific lap.- Example
- Output
Examples:
drivers
List drivers in a session.- Example
- Output
weather
Display weather data for a session.- Example
- Output
compare
Compare lap times between drivers.- Example
- Output
cache
Manage the local cache.
Examples:
config
Display or modify configuration.
Examples:
Output Formats
Most commands support multiple output formats.JSON
CSV
Parquet
Piping and Scripting
The CLI is designed to work well in shell scripts.Environment Variables
The CLI respects all tif1 environment variables.Shell Completion
Enable tab completion in the shell.- Bash
- Zsh
- Fish
Error Handling
The CLI provides clear error messages and exit codes.Best Practices
Use Quotes
Always quote event names with spaces, for example
"Monaco Grand Prix".Export Large Data
Use
--export instead of printing large datasets to the terminal.Enable Caching
Keep the cache enabled for repeated queries.
Check Availability
Use
events and sessions to verify that data exists first.