travel-planning

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Travel Planning

旅行规划

Orchestrates 3 CLI tools to help users plan domestic and international trips — covering hotels, flights, attractions, destination guides, and user reviews.
协调3款CLI工具帮助用户规划国内外旅行——涵盖酒店、航班、景点、目的地指南以及用户评价。

Prerequisites

前置条件

  1. kimi-webbridge daemon running:
    bash
    ~/.kimi-webbridge/bin/kimi-webbridge status
    If not running: invoke the
    kimi-webbridge
    skill.
  2. CLI binaries on
    $PATH
    :
    • xiaohongshu-cli — install via Homebrew:
      bash
      brew install xpzouying/agent-cli/xiaohongshu-cli
      (One-time tap setup:
      brew tap xpzouying/agent-cli
      . Covers macOS arm64/amd64 and Linux amd64/arm64.)
    • ctrip-cli and booking-cli — build from source:
      bash
      git clone https://github.com/better-world-ai/x-cli
      cd x-cli/ctrip-cli   && go build -o ~/.local/bin/ctrip-cli   . && cd ..
      cd booking-cli       && go build -o ~/.local/bin/booking-cli .
      Ensure
      ~/.local/bin
      is on your
      $PATH
      .
    Sanity check:
    bash
    ctrip-cli --help && booking-cli --help && xiaohongshu-cli --help
  1. 运行kimi-webbridge守护进程:
    bash
    ~/.kimi-webbridge/bin/kimi-webbridge status
    如果未运行:调用
    kimi-webbridge
    技能。
  2. CLI二进制文件已添加至
    $PATH
    • xiaohongshu-cli — 通过Homebrew安装:
      bash
      brew install xpzouying/agent-cli/xiaohongshu-cli
      (一次性tap设置:
      brew tap xpzouying/agent-cli
      。支持macOS arm64/amd64及Linux amd64/arm64。)
    • ctrip-clibooking-cli — 从源码编译:
      bash
      git clone https://github.com/better-world-ai/x-cli
      cd x-cli/ctrip-cli   && go build -o ~/.local/bin/ctrip-cli   . && cd ..
      cd booking-cli       && go build -o ~/.local/bin/booking-cli .
      确保
      ~/.local/bin
      已加入
      $PATH
    完整性检查:
    bash
    ctrip-cli --help && booking-cli --help && xiaohongshu-cli --help

CLI Capabilities

CLI功能

Capabilityctrip-clibooking-clixiaohongshu-cli
Hotel searchDomestic + InternationalInternational only-
Flight searchDomestic + International--
AttractionsYes (with scores, prices)--
Destination guideMust-do lists, travel notes--
User reviews/tips--Travel notes search
Login requiredNo (member prices need login)NoRead: No, Write: Yes
CAPTCHA riskLowLowLow
功能ctrip-clibooking-clixiaohongshu-cli
酒店搜索国内+国际仅国际-
航班搜索国内+国际--
景点查询支持(含评分、价格)--
目的地指南必体验清单、旅行笔记--
用户评价/贴士--旅行笔记搜索
是否需要登录否(会员价需要登录)阅读:否,发布:是
验证码风险

Workflow: Domestic Trip (国内游)

工作流:国内游

Use ctrip + xiaohongshu. Example: planning a trip to Chengdu.
bash
undefined
使用ctrip + xiaohongshu。示例:规划成都之行。
bash
undefined

1. Get destination overview from Ctrip (must-do sights, restaurants, shops, travel notes)

1. 从携程获取目的地概况(必去景点、餐厅、购物场所、旅行笔记)

ctrip-cli destination --name chengdu104
ctrip-cli destination --name chengdu104

2. Search user travel tips on Xiaohongshu

2. 在小红书搜索用户旅行贴士

xiaohongshu-cli search "成都旅游攻略" --limit 10
xiaohongshu-cli search "成都旅游攻略" --limit 10

3. Search hotels on Ctrip

3. 在携程搜索酒店

ctrip-cli search-hotels --keyword "成都" --checkin 2026/07/01 --checkout 2026/07/05 --limit 10
ctrip-cli search-hotels --keyword "成都" --checkin 2026/07/01 --checkout 2026/07/05 --limit 10

4. Search flights

4. 搜索航班

ctrip-cli search-flights --from SHA --to CTU --date 2026-07-01 --limit 10
ctrip-cli search-flights --from SHA --to CTU --date 2026-07-01 --limit 10

5. Browse attractions

5. 浏览景点

ctrip-cli search-attractions --destination chengdu104 --limit 10
undefined
ctrip-cli search-attractions --destination chengdu104 --limit 10
undefined

Workflow: International Trip (出境游)

工作流:出境游

Use all 3 CLIs. Example: planning a trip to Kyoto.
bash
undefined
使用全部3款CLI。示例:规划京都之行。
bash
undefined

1. Get destination overview from Ctrip

1. 从携程获取目的地概况

ctrip-cli destination --name kyoto430
ctrip-cli destination --name kyoto430

2. Search user travel tips on Xiaohongshu

2. 在小红书搜索用户旅行贴士

xiaohongshu-cli search "京都旅游攻略" --limit 10
xiaohongshu-cli search "京都旅游攻略" --limit 10

3. Compare hotels: Ctrip vs Booking.com

3. 对比酒店:携程 vs Booking.com

ctrip-cli search-hotels --keyword "京都" --city-id 734 --country-id 78 --checkin 2026/07/01 --checkout 2026/07/05 --limit 10 booking-cli search-hotels --destination "Kyoto" --checkin 2026-07-01 --checkout 2026-07-05 --limit 10
ctrip-cli search-hotels --keyword "京都" --city-id 734 --country-id 78 --checkin 2026/07/01 --checkout 2026/07/05 --limit 10 booking-cli search-hotels --destination "Kyoto" --checkin 2026-07-01 --checkout 2026-07-05 --limit 10

4. Search flights

4. 搜索航班

ctrip-cli search-flights --from SHA --to KIX --date 2026-07-01 --limit 10
ctrip-cli search-flights --from SHA --to KIX --date 2026-07-01 --limit 10

5. Browse attractions

5. 浏览景点

ctrip-cli search-attractions --destination kyoto430 --limit 10
undefined
ctrip-cli search-attractions --destination kyoto430 --limit 10
undefined

Quick Command Reference

快速命令参考

ctrip-cli

ctrip-cli

bash
ctrip-cli destination --name SLUG
ctrip-cli search-hotels --keyword "城市" [--city-id N --country-id N] [--checkin YYYY/MM/DD] [--checkout YYYY/MM/DD] [--limit N]
ctrip-cli search-flights --from IATA --to IATA [--date YYYY-MM-DD] [--limit N]
ctrip-cli search-attractions --destination SLUG [--limit N]
bash
ctrip-cli destination --name SLUG
ctrip-cli search-hotels --keyword "城市" [--city-id N --country-id N] [--checkin YYYY/MM/DD] [--checkout YYYY/MM/DD] [--limit N]
ctrip-cli search-flights --from IATA --to IATA [--date YYYY-MM-DD] [--limit N]
ctrip-cli search-attractions --destination SLUG [--limit N]

booking-cli

booking-cli

bash
booking-cli search-hotels --destination "City" [--checkin YYYY-MM-DD] [--checkout YYYY-MM-DD] [--adults N] [--rooms N] [--limit N]
bash
booking-cli search-hotels --destination "City" [--checkin YYYY-MM-DD] [--checkout YYYY-MM-DD] [--adults N] [--rooms N] [--limit N]

xiaohongshu-cli

xiaohongshu-cli

bash
xiaohongshu-cli search "关键词" [--limit N]
xiaohongshu-cli view <note_id> <xsec_token>
xiaohongshu-cli user <user_id>
xiaohongshu-cli feeds [--limit N]
xiaohongshu-cli login-status
xiaohongshu-cli screenshot <note_id> <xsec_token> [-o path.png]
bash
xiaohongshu-cli search "关键词" [--limit N]
xiaohongshu-cli view <note_id> <xsec_token>
xiaohongshu-cli user <user_id>
xiaohongshu-cli feeds [--limit N]
xiaohongshu-cli login-status
xiaohongshu-cli screenshot <note_id> <xsec_token> [-o path.png]

Destination ID Cheat Sheet

目的地ID速查表

Destinationctrip slugbooking name
上海shanghai2Shanghai
北京beijing1Beijing
杭州hangzhou14Hangzhou
成都chengdu104Chengdu
西安xian7Xi'an
三亚sanya61Sanya
厦门xiamen21Xiamen
广州guangzhou152Guangzhou
重庆chongqing158Chongqing
东京tokyo294Tokyo
京都kyoto430Kyoto
大阪osaka293Osaka
首尔seoul234Seoul
曼谷bangkok191Bangkok
新加坡singapore53Singapore
巴黎paris308Paris
伦敦london309London
目的地ctrip 标识booking 名称
上海shanghai2Shanghai
北京beijing1Beijing
杭州hangzhou14Hangzhou
成都chengdu104Chengdu
西安xian7Xi'an
三亚sanya61Sanya
厦门xiamen21Xiamen
广州guangzhou152Guangzhou
重庆chongqing158Chongqing
东京tokyo294Tokyo
京都kyoto430Kyoto
大阪osaka293Osaka
首尔seoul234Seoul
曼谷bangkok191Bangkok
新加坡singapore53Singapore
巴黎paris308Paris
伦敦london309London

Flight City Codes (IATA)

航班城市代码(IATA)

上海: SHA, 北京: BJS, 广州: CAN, 深圳: SZX, 成都: CTU, 杭州: HGH, 西安: SIA, 三亚: SYX, 重庆: CKG, 南京: NKG, 东京: TYO, 大阪: KIX, 首尔: SEL, 曼谷: BKK, 新加坡: SIN
上海: SHA, 北京: BJS, 广州: CAN, 深圳: SZX, 成都: CTU, 杭州: HGH, 西安: SIA, 三亚: SYX, 重庆: CKG, 南京: NKG, 东京: TYO, 大阪: KIX, 首尔: SEL, 曼谷: BKK, 新加坡: SIN

Login & CAPTCHA Notes

登录与验证码说明

PlatformLogin neededWithout loginCAPTCHA risk
CtripRecommendedAll features work, but prices are significantly higher without login (50%+ markup observed on the same hotel). Log in in Chrome for accurate member pricesLow — never triggered during testing
Booking.comRecommendedSearch works, but displayed prices are significantly higher without login (50%+ markup observed on the same hotel). May also show "Verify email" popup — complete in Chrome and retryLow
XiaohongshuRead: No, Write: Yessearch, view, feeds, user all work. like/comment/post require loginLow
平台是否需要登录未登录状态验证码风险
携程推荐登录所有功能可用,但未登录时价格明显偏高(同一酒店观察到50%以上溢价)。在Chrome中登录以获取准确会员价低——测试期间从未触发
Booking.com推荐登录搜索功能可用,但未登录时显示价格明显偏高(同一酒店观察到50%以上溢价)。可能会弹出「验证邮箱」窗口——在Chrome中完成验证后重试
小红书阅读:否,发布:是搜索、查看、信息流、用户主页功能均可用。点赞/评论/发布需要登录

Tips

小贴士

  • Start with destination overview: Run
    ctrip-cli destination
    first to understand the destination, then drill into hotels/flights/attractions.
  • International hotel comparison: Always run both
    ctrip-cli search-hotels
    and
    booking-cli search-hotels
    for international destinations — prices and availability differ significantly.
  • Ctrip international hotels: Use
    ctrip-cli destination
    first to get the
    hotel_url
    , extract
    city-id
    and
    country-id
    from it, then pass to
    search-hotels
    . Keyword-only search may return wrong city for international destinations.
  • Xiaohongshu for real tips: Search Xiaohongshu for first-person travel experiences, restaurant recommendations, and hidden gems that structured platforms miss.
  • Date formats differ: Ctrip hotels use
    YYYY/MM/DD
    , Ctrip flights use
    YYYY-MM-DD
    , Booking uses
    YYYY-MM-DD
    .
  • Xiaohongshu search retry: First search call may fail if no browser tab exists yet — simply retry once.
  • Output format: All 3 CLIs return
    {"ok": true, "data": ...}
    on success and
    {"ok": false, "error": {...}}
    on failure.
  • 从目的地概况开始:先运行
    ctrip-cli destination
    了解目的地,再深入查询酒店/航班/景点。
  • 国际酒店对比:规划国际旅行时,务必同时运行
    ctrip-cli search-hotels
    booking-cli search-hotels
    ——价格和可用情况差异显著。
  • 携程国际酒店查询:先使用
    ctrip-cli destination
    获取
    hotel_url
    ,从中提取
    city-id
    country-id
    ,再传入
    search-hotels
    。仅用关键词搜索国际目的地可能返回错误城市。
  • 小红书获取真实贴士:在小红书搜索第一人称旅行体验、餐厅推荐以及结构化平台遗漏的小众景点。
  • 日期格式差异:携程酒店使用
    YYYY/MM/DD
    ,携程航班使用
    YYYY-MM-DD
    ,Booking使用
    YYYY-MM-DD
  • 小红书搜索重试:如果尚未打开浏览器标签页,首次搜索可能失败——只需重试一次即可。
  • 输出格式:三款CLI成功时均返回
    {"ok": true, "data": ...}
    ,失败时返回
    {"ok": false, "error": {...}}