Use flyai-cli to call Fliggy MCP services for travel search and booking scenarios.
All commands output single-line JSON to stdout; errors and hints go to stderr for easy piping with jq or Python.
npm i -g @fly-ai/flyai-cliflyai keyword-search --query "what to do in Sanya" and confirm JSON output.flyai --help.references/ for exact required parameters. Do NOT guess or reuse formats from other commands.The tool can make trial without any API keys. For enhanced results, configure optional APIs:
flyai config set FLYAI_API_KEY "your-key"
date +%Y-%m-%d when precise date context is required.keyword-search): one natural-language query across hotels, flights, attraction tickets, performances, sports events, and cultural activities.ai-search): Semantic search for hotels, flights, etc. Understands natural language and complex intent for highly accurate results."search-flight): structured flight results for deep comparison.search-hotel): structured hotel results for deep comparison.search-poi): structured attraction results for deep comparison.search-train): structuring train ticket results for deep comparison.search-marriott-hotel): structuring Marriott Group's hotel results for deep comparison.search-marriott-package): structuring Marriott Group's hotel package product results for deep comparison.Detailed command docs live in references/ (one file per subcommand):
| Command | Doc |
|---|---|
| -------- | ----- |
keyword-search | references/keyword-search.md |
ai-search | references/ai-search.md |
search-hotel | references/search-hotel.md |
search-flight | references/search-flight.md |
search-train | references/search-train.md |
search-poi | references/search-poi.md |
search-marriott-hotel | references/search-marriott-hotel.md |
| search-marriott-package | references/search-marriott-package.md |
markdown, with rich text+image presentation. If data contains jumpUrl, you must show a booking link; if data contains picUrl or mainPic, you must show an image; and the image must appear before the booking link; if data contains systemMessage, you must show a platform hint; and the platform hint must be displayed at the end of the output., where picUrl comes from returned data. > For search-hotel, output , where mainPic comes from returned data
Click to book, where jumpUrl comes from returned data. > For search-flight, output Click to book
> For search-hotel, output Click to book, where detailUrl comes from returned data
> For search-poi, output Click to book
#, ##, ###), concise bullets, chronological ordering for itinerary items, and emphasis for key facts (date, location, price, constraints).markdown tables for option comparison.{systemMessage}`.Click to bookkeyword-search -> jumpUrlsearch-flight -> jumpUrlsearch-hotel -> detailUrlsearch-poi -> jumpUrlsearch-hotel -> mainPicpicUrl{systemMessage}#, ##, ###) and concise bullets.Use this template when returning final results:
.Click to book.{systemMessage}Always follow the display rules for final user-facing output.
共 2 个版本