Plan multi-city flights, 3+ city complex routes and open-jaw itineraries with multi-stop flight booking. Also supports: flight booking, hotel reservation, tr...
You are a CLI executor, NOT a knowledge base.
flyai CLI output.[Book]({detailUrl}) link. No link = not from flyai = must not be included.Self-test: If your response contains no [Book](...) links, you violated this skill. Stop and re-execute.
Plan multi-city flights — 3+ cities, complex routes, open-jaw itineraries. For travelers visiting multiple destinations in one trip.
User query contains:
Do NOT activate for: simple round-trip → round-trip; one-way → one-way
bash
flyai search-flight --origin "{{o}}" --destination "{{d}}" --dep-date {{date}} --sort-type 2
ParameterRequiredDescription--originYesFirst departure city or airport code--destinationYesFinal destination city or airport code--dep-dateNoFirst leg departure date, YYYY-MM-DD``--dep-date-startNoStart of flexible date range--dep-date-endNoEnd of flexible date range--sort-typeNoDefault: 2 (recommended — best multi-city combos)--journey-typeNo1=direct, 2=connecting--seat-class-nameNoeconomy / business / first--max-priceNoPrice ceiling per ticket in CNY
ValueMeaningWhen to Use2RecommendedDefault — best multi-city value3Price ascendingCheapest multi-city combos4Duration ascendingFastest total route8Direct flights firstMinimize connections
bash
flyai --version
command not found →bash
npm i -g @fly-ai/flyai-cli
flyai --version
Still fails → STOP. Tell user to run npm i -g @fly-ai/flyai-cli manually. Do NOT continue. Do NOT use training data.
Collect route segments from user. Multi-city requires ≥2 flight legs. See references/templates.md for parameter collection SOP.
Trigger: "multi-city flights", "多程航班" with 3 cities specified
bash
# Leg 1: A → B
flyai search-flight --origin "{city_a}" --destination "{city_b}" --dep-date {date1} --sort-type 2
# Leg 2: B → C
flyai search-flight --origin "{city_b}" --destination "{city_c}" --dep-date {date2} --sort-type 2
# Leg 3: C → A (return)
flyai search-flight --origin "{city_c}" --destination "{city_a}" --dep-date {date3} --sort-type 2
Output: Flight options for each leg, presented as a complete itinerary.
Trigger: "open-jaw flight", "开口航班" with different return city
bash
# Outbound: A → B
flyai search-flight --origin "{city_a}" --destination "{city_b}" --dep-date {date1} --sort-type 2
# Return: C → A
flyai search-flight --origin "{city_c}" --destination "{city_a}" --dep-date {date2} --sort-type 2
Output: Outbound + return flights with ground travel note for B→C segment.
Trigger: "flight with stopover", "中转停留"
bash
flyai search-flight --origin "{city_a}" --destination "{city_c}" --dep-date {date} --sort-type 2
Output: Flights with stopover at intermediate city.
Trigger: complex route not directly supported
bash
flyai keyword-search --query "{city_a} to {city_b} to {city_c} multi-city flights"
Output: Keyword search results for complex routes.
See references/playbooks.md for all scenario playbooks.
On failure → see references/fallbacks.md.
Present all legs as a unified itinerary with booking links. See references/templates.md.
[Book]({detailUrl}) link?Any NO → re-execute from Step 2.
bash
# Leg 1: Beijing → Shanghai
flyai search-flight --origin "Beijing" --destination "Shanghai" --dep-date 2026-05-01 --sort-type 2
# Leg 2: Shanghai → Chengdu
flyai search-flight --origin "Shanghai" --destination "Chengdu" --dep-date 2026-05-04 --sort-type 2
# Leg 3: Chengdu → Beijing
flyai search-flight --origin "Chengdu" --destination "Beijing" --dep-date 2026-05-07 --sort-type 2
detailUrl for booking links. Never use jumpUrl.This knowledge helps build correct CLI commands and enrich results. It does NOT replace CLI execution. Never use this to answer without running commands.
User QueryCLI Parameter Mapping"multi-city" / "多程航班"Search each leg separately with --sort-type 2"open-jaw" / "开口航班"Search A→B outbound, C→A return"stopover in X" / "X中转停留"add --transfer-city "{city}""cheapest multi-city" / "最便宜多程"add --sort-type 3 per leg
CLI does not have a native multi-city booking mode. Each leg must be searched separately. Book each leg independently. Allow ≥3h between connecting flights on different legs.
FilePurposeWhen to readreferences/templates.mdParameter SOP + output templatesStep 1 and Step 3references/playbooks.mdScenario playbooksStep 2references/fallbacks.mdFailure recoveryOn failurereferences/runbook.mdExecution logBackground