飞伙

使用 feihuo 命令行工具配置 API Key,并搜索航班或酒店。适用于用户要查询机票、比较航班、搜索酒店、查看航班/酒店搜索参数、执行 feihuo search-flight、feihuo hotel-search 或管理 feihuo config 的场景。

Audits

Pass

Install

openclaw skills install feihuo

飞伙

使用 feihuo 命令行工具搜索航班和酒店。命令输出 JSON 到 stdout,错误信息输出到 stderr

快速开始

  1. 安装 CLI:npm install -g feihuo-cli
  2. 配置 API Key:feihuo config set api-key xxxxxx
  3. 查看帮助:feihuo --help
  4. 搜索航班:feihuo search-flight --dep "上海" --arr "东京" --dep-date 2026-03-20
  5. 搜索酒店:feihuo hotel-search --city-name "上海" --check-in-date 2026-03-20 --check-out-date 2026-03-25

配置

首次使用前必须配置 API Key:

feihuo config set api-key xxxxxx

配置文件保存位置:

~/.config/feihuo/config.json

请求服务时 CLI 会自动读取配置,并设置:

Authorization: Bearer <api-key>

命令能力

config

管理本地配置。目前支持:

feihuo config set api-key xxxxxx

search-flight

搜索航班,支持单程和往返。

feihuo search-flight --dep "上海" --arr "东京" --dep-date 2026-03-20
feihuo search-flight --dep "上海" --arr "东京" --dep-date 2026-03-20 --back-date 2026-03-25 --berth-type Y

详细参数见 references/search-flight.md

hotel-search

搜索酒店,支持按城市、入住/离店日期、区域、星级和价格筛选。

feihuo hotel-search --city-name "上海" --check-in-date 2026-03-20 --check-out-date 2026-03-25
feihuo hotel-search --city-name "上海" --check-in-date 2026-03-20 --check-out-date 2026-03-25 --region-name "人民广场" --stars 3,4,5 --min-price 300 --max-price 1000

详细参数见 references/search-hotel.md

日期规则

  • --dep-date 格式为 YYYY-MM-DD,且不能早于今天。
  • --back-date 格式为 YYYY-MM-DD,且不能早于 --dep-date
  • --check-in-date 格式为 YYYY-MM-DD,且不能早于今天。
  • --check-out-date 格式为 YYYY-MM-DD,且必须晚于 --check-in-date

需要当前日期时,先运行:

date +%Y-%m-%d

舱位等级

  • Y:经济舱
  • C:公务舱
  • F:头等舱

结果展示要求

当把 search-flighthotel-search 返回结果展示给用户时:

  • 使用中文 Markdown。
  • 优先展示价格、航程、航段、起降时间、航空公司和航班号。
  • 如果结果包含 jumpUrl,使用独立一行展示预订链接:[点击预订]({jumpUrl})
  • 酒店结果优先展示酒店名称、品牌、类型、地址、区域、最低价格、星级、评分和主图。
  • 如果酒店结果包含 mainPic,使用独立一行展示图片:![]({mainPic})
  • 多个方案适合用 Markdown 表格比较。
  • 不要把原始 JSON 原封不动贴给最终用户,除非用户明确要求。