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

trip-optimizer

v0.1.3

Published

Autonomously optimize travel plans using the autoresearch pattern

Downloads

359

Readme

trip-optimizer

If you love travel like I do, you know the pain: before every trip you're deep in Google, TripAdvisor, 小红书, 携程, reading strangers' tips, comparing restaurants, checking transit schedules. You easily spend days, sometimes weeks, on research. Travel is supposed to be leisure and relaxation, not a second job.

trip-optimizer autonomously optimizes travel plans using Andrej Kaparthy's autoresearch pattern — an AI-powered CLI that researches, scores, and iteratively improves your itinerary.

支持 English中文(简体中文) -- 在初始化时选择语言,整个体验随之适配:提示语、生成的行程、研究搜索、评分系统全部使用您选择的语言。

Install

npm install -g trip-optimizer

Or run directly:

npx trip-optimizer

Quick Start

trip-optimizer init "Japan 2027"
cd japan-2027
trip-optimizer run              # agent mode (default, interactive Claude Code)
trip-optimizer run --standalone  # direct API calls
trip-optimizer run --headless    # agent mode, non-interactive
trip-optimizer dashboard --watch
trip-optimizer plan --pdf        # generate a formatted PDF itinerary

Commands

| Command | Description | |---------|-------------| | init <name> | Create a new trip project | | config | Manage API keys and settings | | profile | View travel profile | | score | One-off absolute scoring | | research [city] | Research sprint | | run | Start optimization loop (agent mode) | | run --standalone | Optimization via direct API calls | | run --headless | Agent mode, non-interactive | | status | Show progress | | dashboard | Live optimization dashboard | | chart | ASCII score chart | | plan | Pretty-print travel plan | | plan --pdf | Generate a PDF document | | debrief | Post-trip feedback | | history | View past trips |

How It Works

Travel CLI screenshot

Trip-optimizer follows the autoresearch pattern: it autonomously researches destinations, generates plan mutations, scores results, and keeps only improvements. Each optimization iteration proposes targeted changes -- swapping a restaurant, adjusting timing, adding a hidden-gem activity -- then evaluates whether the change improved the overall plan. Bad mutations are discarded; good ones accumulate.

Scoring uses a 3-pass pipeline. First, the plan is evaluated across seven weighted dimensions (experience, logistics, food, time management, budget, accommodation, and transit). Then an adversarial critic searches for concrete flaws -- unconfirmed bookings, chain restaurants, vague transit -- and applies penalties. Finally, a holistic adjustment reconciles the dimension scores with the critic's findings into a single composite score.

The system builds persistent memory across trips. After each trip, a debrief captures what worked and what didn't. These learnings are stored in learned.json and feed back into scoring rubrics and research priorities for future trips, so the optimizer gets smarter over time.

语言与本地化

init 的第一个问题是语言选择。选择 中文 后:

  • 所有命令行提示和消息以中文显示
  • 生成的行程、评分标准和计划均以简体中文撰写
  • 研究优先使用中文平台(小红书、大众点评、马蜂窝、携程),而非英文来源
  • 搜索关键词使用中文(本地人推荐、避雷指南、苍蝇馆子),同时辅以英文补充搜索
  • PDF 输出正确渲染中文内容

Custom Model Support

During init, you can optionally configure a custom LLM instead of the default Anthropic/Vertex provider. Any OpenAI-compatible API works -- Kimi (Moonshot), DeepSeek, and others. Custom models run in --standalone mode; agent mode always uses Claude Code.

Requirements

  • Node.js 22+
  • One of:
    • Anthropic API key (via trip-optimizer config or ANTHROPIC_API_KEY)
    • Google Cloud Vertex AI (CLAUDE_CODE_USE_VERTEX=1 + GOOGLE_CLOUD_PROJECT)
    • Custom OpenAI-compatible API (configured during init)

License

MIT