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

travel-agent-cli

v0.4.7

Published

AI 驱动的旅行目的地推荐 Agent - 命令行工具(集成 FlyAI 旅行搜索)

Readme

travel-agent-cli

AI 驱动的旅行目的地推荐 Agent - 命令行工具(集成 FlyAI 旅行搜索)

新功能 v0.2.0

  • 🆕 FlyAI 旅行搜索:集成 Fliggy MCP,支持航班、酒店、景点实时查询
  • 🔧 修复多 Agent 初始化问题
  • 📝 优化 CLI 输出格式

安装

# 全局安装
npm install -g travel-agent-cli

# 或者使用 npx 直接运行(无需安装)
npx travel-agent-cli flyai "5 天日本行程"

安装要求

  • Node.js >= 14.0.0
  • Python >= 3.10
  • pip (Python 包管理器)

快速开始

1. 初始化配置

travel-agent config --init

2. 配置 LLM API Key

编辑生成的 .env 文件,填入你的 API Key:

# 选择使用的 LLM 提供商
LLM_PROVIDER=anthropic

# 配置 API Key
ANTHROPIC_API_KEY=sk-ant-xxx
OPENAI_API_KEY=sk-xxx
DEEPSEEK_API_KEY=xxx

3. 查看支持的模型

travel-agent model list

4. 切换模型

travel-agent model use -p anthropic -m claude-sonnet-4-6

5. 运行工作流

# 默认运行
travel-agent run

# 指定关键词和推荐数量
travel-agent run -k "海岛游" -n 10

# 分析旅行产品可行性
travel-agent analyze "北欧极光"

命令说明

flyai - FlyAI 旅行搜索(新)

travel-agent flyai <查询> [选项]

选项:
  --destination     目的地城市
  --duration        行程天数/日期
  --budget          预算范围

示例:
  travel-agent flyai "5 天日本行程规划"
  travel-agent flyai "北京到上海航班" --destination 上海
  travel-agent flyai "三亚海景酒店" --destination 三亚
  travel-agent flyai "东京景点推荐" --destination 东京

run - 运行完整工作流

travel-agent run [选项]

选项:
  -k, --keyword     搜索关键词 (默认:旅行)
  -n, --top         推荐目的地数量 (默认:10)
  -p, --plan-top    规划路线的目的地数量 (默认:3)
  --no-ota          不采集 OTA 数据

analyze - 旅行产品可行性分析

travel-agent analyze <话题> [选项]

选项:
  --no-ota          不采集 OTA 数据
  -o, --output      输出报告文件路径

model - LLM 模型管理

travel-agent model <子命令> [选项]

子命令:
  list              列出所有支持的模型
  status            查看当前模型状态
  use               切换模型

选项:
  -p, --provider    LLM 提供商 (anthropic/openai/deepseek/azure/ollama/qwen)
  -m, --model       模型名称

agents - 查看 Agent 团队信息

travel-agent agents

输出:
  - Manager (协调者)
  - Collector (采集 Agent)
  - Analyst (分析 Agent)
  - Planner (规划 Agent)
  - Reporter (报告 Agent)

config - 配置管理

travel-agent config [选项]

选项:
  --show            显示当前配置
  --init            初始化配置文件

status - 系统状态

travel-agent status

输出:
  - 版本号
  - 当前 LLM 提供商和模型
  - API 配置状态

支持的 LLM 提供商

| 提供商 | 默认模型 | 配置项 | |--------|---------|--------| | Anthropic | claude-sonnet-4-5-20250929 | ANTHROPIC_API_KEY | | OpenAI | gpt-4o | OPENAI_API_KEY | | DeepSeek | deepseek-chat | DEEPSEEK_API_KEY | | Azure OpenAI | gpt-4 | AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT | | Ollama | llama3 | OLLAMA_BASE_URL (本地部署) | | Qwen (通义千问) | qwen-max | DASHSCOPE_API_KEY |

FlyAI 旅行搜索(Fliggy MCP 集成)

FlyAI 旅行搜索已集成 Fliggy MCP(飞猪开放平台)服务:

  • 沙箱模式:默认使用,返回模拟数据,无需配置
  • 生产模式:需配置飞猪开放平台 App Key 和 App Secret

配置方式(可选):

# 在 .env 文件中添加
FLIGGY_APP_KEY=your_app_key
FLIGGY_APP_SECRET=your_app_secret

示例

FlyAI 旅行搜索

# 综合旅行规划
travel-agent flyai "5 天日本行程规划"

# 航班搜索
travel-agent flyai "北京到上海航班" --destination 上海

# 酒店搜索
travel-agent flyai "三亚海景酒店" --destination 三亚

# 景点搜索
travel-agent flyai "东京景点推荐" --destination 东京

搜索海岛游推荐

travel-agent run -k "海岛游" -n 10

分析极光旅行产品

travel-agent analyze "北欧极光"
travel-agent analyze "日本赏樱" -o ./analysis_report.md

卸载

npm uninstall -g travel-agent-cli

许可证

MIT

链接