Google Flights MCP, CLI and Python Library
Add --sort param
Punit Araniadc716d46fce
diff --git a/fli/cli/commands/cheap.py b/fli/cli/commands/cheap.pyindex 741eff2..0cf7fac 100644--- a/fli/cli/commands/cheap.py+++ b/fli/cli/commands/cheap.py@@ -40,6 +40,13 @@ def cheap(help="Maximum number of stops (ANY, 0 for non-stop, 1 for one stop, 2+ for two stops)",),] = "ANY",+ sort: Annotated[+ bool,+ typer.Option(+ "--sort",+ help="Sort results by price (lowest to highest)",+ ),+ ] = False,monday: Annotated[bool,typer.Option(@@ -164,6 +171,10 @@ def cheap(typer.echo("No flights found for the selected days.")raise typer.Exit(1)+ # Sort dates by price if sort flag is enabled+ if sort:+ dates.sort(key=lambda x: x.price)+# Display resultsdisplay_date_results(dates)