npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fliggy-cli

v1.0.5

Published

飞猪 PC 端机票/酒店/门票/度假搜索 CLI 工具,支持智能 headless 模式和登录状态保存

Downloads

57

Readme

Fliggy CLI

飞猪 PC 端机票/酒店/门票/度假搜索 CLI 工具。

特性

  • 🎫 门票搜索 - 搜索景点门票,自动获取详情页信息
  • 🎒 度假搜索 - 搜索跟团游、一日游等度假产品
  • 🏨 酒店搜索 - 搜索酒店信息
  • ✈️ 机票搜索 - 搜索航班信息
  • 🤖 智能 Headless - 有登录状态时后台运行,需要登录时自动打开浏览器
  • 💾 登录状态保存 - 登录一次,后续自动使用保存的状态

安装

npm install -g fliggy-cli

或直接使用:

npx fliggy-cli ticket --keyword "香港迪士尼"

使用

登录飞猪账号(首次使用)

fliggy login

登录成功后,状态会自动保存,后续搜索无需重复登录。

清除登录状态:

fliggy login --clear

门票搜索

# 搜索门票
fliggy ticket --keyword "故宫门票"

# 使用 headless 模式(后台运行,不显示浏览器)
fliggy ticket --keyword "香港迪士尼" --headless

度假搜索

# 搜索跟团游/一日游
fliggy holiday --keyword "三亚跟团游"

# 使用 headless 模式
fliggy holiday --keyword "香港一日游" --headless

酒店搜索

fliggy hotel --city 北京 --check-in 2026-05-10 --check-out 2026-05-12

酒店详情

fliggy hotel-detail --name "亚奥国际" --city 北京 --check-in 2026-05-10 --check-out 2026-05-12

机票搜索

# 单程
fliggy flight --type oneway --from 北京 --to 上海 --date 2026-05-10

# 往返
fliggy flight --type round --from 北京 --to 上海 --date 2026-05-10 --return-date 2026-05-15

机票详情

fliggy flight-detail --keyword "东航" --from 北京 --to 上海 --date 2026-05-10

智能 Headless 模式

使用 --headless 参数时:

| 场景 | 行为 | |-----|------| | 有登录状态 | 🤖 后台运行,不显示浏览器 | | 需要登录 | 🖥️ 自动打开浏览器窗口,等待用户登录 | | 登录成功 | 自动保存状态,继续运行 |

示例输出:

✔ 使用已保存的登录状态
🤖 使用后台模式(headless)

✅ 找到最匹配的景点门票:故宫鼓浪屿外国文物馆
景点名称:故宫鼓浪屿外国文物馆
价格:¥12
销量:已售5

输出信息

门票搜索

景点名称:香港迪士尼乐园
价格:¥89
评分:4.8分
销量:已售1000+
特色标签:免预约, 随买随用

度假搜索

产品名称:三亚南山寺天涯海角一日游
价格:¥112
行程天数:1天0晚
出发城市:三亚出发
评分:4.7分
销量:已售58786
特色标签:无购物, 纯玩, 含餐, 含接送
酒店舒适度:准四星

帮助

查看所有命令:

fliggy --help

查看具体命令帮助:

fliggy ticket --help
fliggy holiday --help

注意事项

  • 需要安装 Chromium(Playwright 会自动安装)
  • 登录状态有效期约 7-30 天(取决于淘宝安全策略)
  • 部分搜索可能需要登录飞猪账号
  • 建议首次使用前执行 fliggy login 登录

License

MIT

作者

wanghengfei