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

feihuo-cli

v2.0.0-beta2

Published

飞伙 CLI

Readme

feihuo-cli

飞伙 CLI,用于在命令行中搜索航班、酒店、火车票、签证、旅行保险、欧铁通票、欧铁点对点车次和船票。

安装

npm install -g feihuo-cli

版本须 >= 2.0.02.0.0-beta1 等 2.x 预发布版同样满足,1.x 不可用)。安装后执行 feihuo --version 确认。

安装后会获得 feihuo 命令:

feihuo --help

认证

CLI 从以下文件读取访问令牌:

~/.openclaw/qclaw/user-info.json

JSON 中需包含 accessToken 字段。请求 API 时自动设置:

Authorization: Bearer <accessToken>

请确保该文件存在且 accessToken 有效。

搜索航班

feihuo flight-search --dep "上海" --arr "东京" --dep-date 2026-03-20

往返搜索:

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

指定舱位:

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

完整示例:

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

搜索酒店

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 "人民广场"

按星级筛选:

feihuo hotel-search --city-name "上海" --check-in-date 2026-03-20 --check-out-date 2026-03-25 --stars 3,4,5

按价格范围筛选:

feihuo hotel-search --city-name "上海" --check-in-date 2026-03-20 --check-out-date 2026-03-25 --min-price 300 --max-price 1000

完整示例:

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

搜索火车票

feihuo train-search --dep "上海" --arr "北京" --dep-date 2026-03-20

筛选高铁/动车:

feihuo train-search --dep "上海" --arr "北京" --dep-date 2026-03-20 --train-type high-speed

按出发/到达小时筛选:

feihuo train-search --dep "上海" --arr "北京" --dep-date 2026-03-20 --dep-hour-start 8 --dep-hour-end 12 --arr-hour-start 13 --arr-hour-end 18

筛选座位并按价格排序:

feihuo train-search --dep "上海" --arr "北京" --dep-date 2026-03-20 --seat-type second-class --sort-type price-low-to-high

指定车次:

feihuo train-search --dep "上海" --arr "北京" --dep-date 2026-03-20 --train-number G2

搜索签证

feihuo visa-search --country "日本"

筛选签证类型:

feihuo visa-search --country "日本" --visa-type tourist

搜索旅行保险

feihuo insurance-search --country "日本" --days 7

搜索欧铁通票

feihuo eur-rail-pass-search

按国家筛选:

feihuo eur-rail-pass-search --country "法国"

搜索欧铁点对点

欧铁 P2P 需先解析地点 code,再搜索

feihuo eur-rail-p2p-resolve-local --query "巴黎"
feihuo eur-rail-p2p-resolve-local --query "伦敦"
feihuo eur-rail-p2p-search --dep "<出发 code>" --arr "<到达 code>" --dep-date 2026-06-01

搜索船票

船票需先解析港口 code,再搜索

feihuo ship-resolve-local --query "琶洲"
feihuo ship-resolve-local --query "香港"
feihuo ship-search --dep "<出发 code>" --arr "<到达 code>" --dep-date 2026-06-01

参数说明

flight-search

| 参数 | 必填 | 说明 | | --- | --- | --- | | --dep <dep> | 是 | 出发地,例如:上海 | | --arr <arr> | 是 | 到达地,例如:东京 | | --dep-date <depDate> | 是 | 出发日期,格式:YYYY-MM-DD | | --back-date <backDate> | 否 | 返程日期,格式:YYYY-MM-DD | | --berth-type <berthType> | 否 | 舱位等级:Y 经济舱,C 公务舱,F 头等舱 |

hotel-search

| 参数 | 必填 | 说明 | | --- | --- | --- | | --city-name <cityName> | 是 | 入住城市名称,例如:上海 | | --check-in-date <checkInDate> | 是 | 入住日期,格式:YYYY-MM-DD | | --check-out-date <checkOutDate> | 是 | 离店日期,格式:YYYY-MM-DD | | --region-name <regionName> | 否 | 商圈、行政区或区域名称 | | --stars <stars> | 否 | 酒店星级,多个星级使用英文逗号分隔,例如:1,2,3 | | --min-price <minPrice> | 否 | 最低价格 | | --max-price <maxPrice> | 否 | 最高价格 |

train-search

| 参数 | 必填 | 说明 | | --- | --- | --- | | --dep <dep> | 是 | 出发地,例如:上海 | | --arr <arr> | 是 | 目的地,例如:北京 | | --dep-date <depDate> | 是 | 出发日期,格式:YYYY-MM-DD | | --train-type <trainType> | 否 | 火车类型:high-speed 高铁/动车,normal 普通车 | | --seat-type <seatType> | 否 | 座位类型:second-class 二等座,first-class 一等座,business-class 商务座,hard-sleeper 硬卧,soft-sleeper 软卧 | | --sort-type <sortType> | 否 | 排序:price-high-to-lowprice-low-to-highduration-short-to-longduration-long-to-shortdeparture-early-to-late(默认)、departure-late-to-early | | --dep-hour-start <depHourStart> | 否 | 出发小时开始,0-23 | | --dep-hour-end <depHourEnd> | 否 | 出发小时结束,0-23 | | --arr-hour-start <arrHourStart> | 否 | 到达小时开始,0-23 | | --arr-hour-end <arrHourEnd> | 否 | 到达小时结束,0-23 | | --train-number <trainNumber> | 否 | 车次号,例如:G2 |

visa-search

| 参数 | 必填 | 说明 | | --- | --- | --- | | --country <country> | 是 | 目的地国家,例如:日本 | | --visa-type <visaType> | 否 | 签证类型:tourist 旅游签证,business 商务签证,family-visit 探亲签证 |

insurance-search

| 参数 | 必填 | 说明 | | --- | --- | --- | | --country <country> | 是 | 目的地国家名称或代码,例如:日本 | | --days <days> | 是 | 保障天数,正整数,例如:7 |

eur-rail-pass-search

| 参数 | 必填 | 说明 | | --- | --- | --- | | --country <country> | 否 | 欧洲国家名称或代码,例如:法国;不传入时搜索欧洲通票 |

eur-rail-p2p-resolve-local

| 参数 | 必填 | 说明 | | --- | --- | --- | | --query <query> | 是 | 城市或车站名称/代码,例如:巴黎 | | --type <type> | 否 | 地点类型:city 城市,station 车站 |

返回的 items[].codeeur-rail-p2p-search 使用。

eur-rail-p2p-search

| 参数 | 必填 | 说明 | | --- | --- | --- | | --dep <dep> | 是 | 出发地,当前须为 eur-rail-p2p-resolve-local 返回的 items[].code | | --arr <arr> | 是 | 到达地,当前须为 eur-rail-p2p-resolve-local 返回的 items[].code | | --dep-date <depDate> | 是 | 出发日期,格式:YYYY-MM-DD | | --back-date <backDate> | 否 | 返程日期,格式:YYYY-MM-DD |

ship-resolve-local

| 参数 | 必填 | 说明 | | --- | --- | --- | | --query <query> | 是 | 港口名称、城市名称或代码,例如:琶洲香港 |

返回的 items[].codeship-search 使用。

ship-search

| 参数 | 必填 | 说明 | | --- | --- | --- | | --dep <dep> | 是 | 出发港,当前须为 ship-resolve-local 返回的 items[].code | | --arr <arr> | 是 | 到达港,当前须为 ship-resolve-local 返回的 items[].code | | --dep-date <depDate> | 是 | 出发日期,格式:YYYY-MM-DD | | --back-date <backDate> | 否 | 返程日期,格式:YYYY-MM-DD |

查看帮助

feihuo --help
feihuo flight-search --help
feihuo hotel-search --help
feihuo train-search --help
feihuo visa-search --help
feihuo insurance-search --help
feihuo eur-rail-pass-search --help
feihuo eur-rail-p2p-resolve-local --help
feihuo eur-rail-p2p-search --help
feihuo ship-resolve-local --help
feihuo ship-search --help

本地开发

安装依赖:

npm install

生成 API 客户端:

npm run nswag

构建 CLI:

npm run build

本地运行:

node dist/index.js --help
node dist/index.js flight-search --dep "上海" --arr "东京" --dep-date 2026-03-20
node dist/index.js hotel-search --city-name "上海" --check-in-date 2026-03-20 --check-out-date 2026-03-25
node dist/index.js train-search --dep "上海" --arr "北京" --dep-date 2026-03-20
node dist/index.js visa-search --country "日本" --visa-type tourist
node dist/index.js insurance-search --country "日本" --days 7
node dist/index.js eur-rail-pass-search --country "法国"
node dist/index.js eur-rail-p2p-resolve-local --query "巴黎"
node dist/index.js eur-rail-p2p-search --dep "FR:paris" --arr "GB:london" --dep-date 2026-06-01
node dist/index.js ship-resolve-local --query "琶洲"
node dist/index.js ship-search --dep "PZ" --arr "HKA" --dep-date 2026-06-01

发布

发布前请确认已登录 npm:

npm login

发布:

npm publish

npm publish 前会自动执行构建,最终发布的包只包含 dist 和本文档。npmjs 页面会自动显示本 README.md