flyai

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

flyai

flyai

通过
flyai-cli
调用飞猪 MCP 服务,提供多种旅行查询、预订能力所有命令输出为单行 JSON(stdout),错误/提示在 stderr所有命令统一输出单行 JSON 到 stdout,错误与提示输出到 stderr,便于与
jq
python
等工具管道组合,实现筛选、排序和二次处理
Call the Fliggy MCP service via
flyai-cli
to provide various travel inquiry and reservation capabilities. All command outputs are single-line JSON (stdout), and errors/prompts are output to stderr. All commands uniformly output single-line JSON to stdout, and errors and prompts are output to stderr, facilitating pipeline combination with tools like
jq
and
python
to achieve filtering, sorting, and secondary processing

快速入门(Quick start)

Quick start

  1. 配置环境变量:设置
    FLYAI_MCP_URL
    (可选) 和
    FLYAI_API_KEY
    (必选)
  2. 安装 CLI
    npm i -g @fly-ai/flyai-cli
  3. 验证:执行
    flyai fliggy-fast-search --query "三亚怎么玩"
    ,若返回 JSON 则说明配置正确
  4. 获取帮助:运行
    flyai --help
    查看所有命令和选项
  5. 详细指南:各子命令的必填/可选参数及输出格式见下方
    References
  1. Configure environment variables: Set
    FLYAI_MCP_URL
    (optional) and
    FLYAI_API_KEY
    (required)
  2. Install CLI:
    npm i -g @fly-ai/flyai-cli
  3. Verification: Execute
    flyai fliggy-fast-search --query "How to play in Sanya"
    , if JSON is returned, the configuration is correct
  4. Get help: Run
    flyai --help
    to view all commands and options
  5. Detailed guide: Required/optional parameters and output formats for each sub-command are available in
    References
    below

主要功能

Main Features

时空查询

Spatiotemporal Query

  • 时间查询 通过
    date +%Y-%m-%d
    获取准确的当前时间
  • Time Query: Obtain the accurate current time via
    date +%Y-%m-%d

综合查询

Comprehensive Query

  • 旅行综合搜索 (
    fliggy-fast-search
    ):通过自然语言或关键词,一次性获取跨品类智能推荐,帮助用户快速发现旅行灵感与打包方案
    酒店套餐
    ,将住宿与其他服务打包以一个相对优惠的价格出售
    机票套餐
    ,将机票与其他服务打包以一个相对优惠的价格出售
  • Travel Comprehensive Search (
    fliggy-fast-search
    ): Obtain cross-category intelligent recommendations through natural language or keywords to help users quickly discover travel inspirations and package solutions
    Hotel packages
    , which bundle accommodation with other services and sell at a relatively favorable price
    Flight packages
    , which bundle flight tickets with other services and sell at a relatively favorable price

专业查询

Professional Query

通过专业筛选条件,获取某一品类的完整、精准结果,满足用户对航班、酒店或景点的深度对比需求
  • 机票搜索 (
    search-flight
    ):提供丰富的航班选择
  • 酒店搜索 (
    search-hotels
    ):提供丰富的酒店选择
  • 景点搜索 (
    search-poi
    ):提供丰富的景点选择
Obtain complete and accurate results for a certain category through professional filtering conditions to meet users' needs for in-depth comparison of flights, hotels, or scenic spots
  • Flight Search (
    search-flight
    ): Provide a wide range of flight options
  • Hotel Search (
    search-hotels
    ): Provide a wide range of hotel options
  • Scenic Spot Search (
    search-poi
    ): Provide a wide range of scenic spot options

References

References

  • 旅行综合搜索
    references/fliggy-fast-search.md
  • 酒店搜索
    references/search-hotels.md
  • 机票搜索
    references/search-flight.md
  • 景点搜索
    references/search-poi.md
  • Travel Comprehensive Search
    references/fliggy-fast-search.md
  • Hotel Search
    references/search-hotels.md
  • Flight Search
    references/search-flight.md
  • Scenic Spot Search
    references/search-poi.md

展示要求(Friendly display)

Display Requirements (Friendly display)

  • 总体原则:严格按
    markdown
    正确格式输出,通过图文并貌的方式展示信息有
    jumpUrl
    必须展示
    预定链接
    ,有
    picUrl
    mainPic
    必须展示图片
  • 预定链接:单独输出一行
    [点击购买]({jumpUrl})
    jumpUrl
    从返回数据中获取
    机票搜索
    时,单独输出一行
    [点击购买]({jumpUrl})
    jumpUrl
    从返回数据中获取
    酒店搜索
    时,单独输出一行
    [点击购买]({jumpUrl})
    jumpUrl
    通过
    references/fliggy-fast-search.md
    酒店预定链接输出规则
    生成
    景点搜索
    时,单独输出一行
    [点击购买]({jumpUrl})
    jumpUrl
    通过
    references/search-flight.md
    景点预定链接输出规则
    生成
  • 图片展示:单独输出一行
    ![](picUrl)
    picUrl
    从返回数据中获取,友好的展示图片
    酒店搜索
    时,单独输出一行
    ![](mainPic)
    mainPic
    从返回数据中获取,友好的展示预定地址
  • 层级结构:层次分明,使用标题(
    # 
    ,
    ## 
    ,
    ### 
    等)来区分不同的部分和子部分简洁明了,每个条目尽量简短,避免冗长的句子时间顺序,行程安排按时间顺序排列,每天的活动也按时间顺序列出重要信息突出,使用加粗 (
    ** 文本 ** 
    ) 或斜体 (
    * 文本 * 
    ) 来强调重要的信息,如日期、地点、费用等
  • 表格展示:使用
    markdown
    表格正确展示
严格按展示要求输出
  • General Principle: Output strictly in correct
    markdown
    format, display information in a combination of text and images. Must display the
    Booking Link
    if there is a
    jumpUrl
    , and must display images if there is
    picUrl
    or
    mainPic
  • Booking Link: Output a separate line
    [Book Now]({jumpUrl})
    , where
    jumpUrl
    is obtained from the returned data
    For
    Flight Search
    , output a separate line
    [Book Now]({jumpUrl})
    , where
    jumpUrl
    is obtained from the returned data For
    Hotel Search
    , output a separate line
    [Book Now]({jumpUrl})
    , where
    jumpUrl
    is generated according to the "Hotel Reservation Link Output Rules" in
    references/fliggy-fast-search.md
    For
    Scenic Spot Search
    , output a separate line
    [Book Now]({jumpUrl})
    , where
    jumpUrl
    is generated according to the "Scenic Spot Reservation Link Output Rules" in
    references/search-flight.md
  • Image Display: Output a separate line
    ![](picUrl)
    , where
    picUrl
    is obtained from the returned data to display images in a user-friendly manner
    For
    Hotel Search
    , output a separate line
    ![](mainPic)
    , where
    mainPic
    is obtained from the returned data to display the reservation address in a user-friendly manner
  • Hierarchical Structure: Clear hierarchy, use headings (
    # 
    ,
    ## 
    ,
    ### 
    , etc.) to distinguish different sections and sub-sections. Concise and clear, each entry should be as short as possible to avoid lengthy sentences. Chronological order, travel arrangements should be listed in chronological order, and daily activities should also be listed in chronological order. Highlight important information, use bold (
    ** Text ** 
    ) or italic (
    * Text * 
    ) to emphasize important information such as dates, locations, costs, etc.
  • Table Display: Display correctly using
    markdown
    tables
Output strictly in accordance with the display requirements