pp-hotel-tonight

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- GENERATED FILE — DO NOT EDIT. This file is a verbatim mirror of library/travel/hotel-tonight/SKILL.md, regenerated post-merge by tools/generate-skills/. Hand-edits here are silently overwritten on the next regen. Edit the library/ source instead. See AGENTS.md "Generated artifacts: registry.json, cli-skills/". -->
<!-- 生成文件 — 请勿编辑。 本文件是library/travel/hotel-tonight/SKILL.md的精确镜像, 由tools/generate-skills/在合并后重新生成。此处的手动编辑会在下次重新生成时被静默覆盖。请改为编辑library/源文件。 请参阅AGENTS.md中的“生成产物:registry.json, cli-skills/”。 -->

HotelTonight — Printing Press CLI

HotelTonight — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
hotel-tonight-pp-cli
binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
  1. Install via the Printing Press installer:
    bash
    npx -y @mvanhorn/printing-press-library install hotel-tonight --cli-only
  2. Verify:
    hotel-tonight-pp-cli --version
  3. Ensure
    $GOPATH/bin
    (or
    $HOME/go/bin
    ) is on
    $PATH
    .
If the
npx
install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer):
bash
go install github.com/mvanhorn/printing-press-library/library/travel/hotel-tonight/cmd/hotel-tonight-pp-cli@latest
If
--version
reports "command not found" after install, the install step did not put the binary on
$PATH
. Do not proceed with skill commands until verification succeeds.
本Skill驱动
hotel-tonight-pp-cli
二进制文件。在调用本Skill的任何命令之前,您必须确认CLI已安装。如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装器安装:
    bash
    npx -y @mvanhorn/printing-press-library install hotel-tonight --cli-only
  2. 验证安装:
    hotel-tonight-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果
npx
安装失败(无Node环境、离线等),可回退到直接通过Go安装(要求Go 1.26.3或更高版本):
bash
go install github.com/mvanhorn/printing-press-library/library/travel/hotel-tonight/cmd/hotel-tonight-pp-cli@latest
如果安装后执行
--version
提示“command not found”,说明安装步骤未将二进制文件添加到
$PATH
中。在验证成功前,请不要执行Skill命令。

When to Use This CLI

何时使用本CLI

Use this CLI when an agent or script needs last-minute hotel deal data from HotelTonight that persists and compounds: monitoring a city for price drops, building a price history for a hotel, judging whether a quoted rate is actually cheap, or comparing neighborhoods and dates. It is read-only and anonymous — it never books and never needs a login.
当Agent或脚本需要从HotelTonight获取可持久化、可累积的最后一刻酒店特惠数据时,可使用本CLI:监控某城市的酒店价格下跌、构建某酒店的价格历史、判断报价是否真正划算,或对比不同街区和日期的价格。它是只读且匿名的——从不进行预订,也无需登录。

When Not to Use This CLI

何时不使用本CLI

Do not activate this CLI for requests that require creating, updating, deleting, publishing, commenting, upvoting, inviting, ordering, sending messages, booking, purchasing, or changing remote state. This printed CLI exposes read-only commands for inspection, export, sync, and analysis.
请勿针对需要创建、更新、删除、发布、评论、点赞、邀请、下单、发送消息、预订、购买或修改远程状态的请求激活本CLI。本CLI仅暴露用于查询、导出、同步和分析的只读命令。

Unique Capabilities

独特功能

These capabilities aren't available in any other tool for this API.
这些功能是其他基于该API的工具所不具备的。

Local price intelligence

本地价格智能

  • watch
    — Snapshot a location's deals now and get told which rooms dropped below your threshold or fell since you last looked.
    Reach for this when an agent needs to monitor a city for last-minute hotel price drops over time instead of re-querying blind.
    bash
    hotel-tonight-pp-cli watch --lat 37.7749 --lng -122.4194 --when tonight --below 150 --agent
  • history
    — Show the recorded price and % off history for one hotel from the local store.
    Use when you need the actual price trajectory of a hotel rather than a single ephemeral quote.
    bash
    hotel-tonight-pp-cli history "Argonaut Hotel" --days 30 --agent
  • verdict
    — Classify a hotel's current quoted price against its own observed low/median/high as cheap, typical, or expensive.
    Reach for this to answer 'is this actually cheap?' with a grounded baseline instead of a guess.
    bash
    hotel-tonight-pp-cli verdict "Argonaut Hotel" --agent
  • watch
    — 立即快照某地点的特惠信息,并告知哪些房间价格低于您设定的阈值,或较上次查询有所下降。
    当Agent需要持续监控某城市的最后一刻酒店价格下跌,而非盲目重复查询时,可使用该命令。
    bash
    hotel-tonight-pp-cli watch --lat 37.7749 --lng -122.4194 --when tonight --below 150 --agent
  • history
    — 从本地存储中显示某酒店的记录价格及折扣百分比历史。
    当您需要了解酒店的实际价格走势,而非单一临时报价时,可使用该命令。
    bash
    hotel-tonight-pp-cli history "Argonaut Hotel" --days 30 --agent
  • verdict
    — 根据酒店自身的观测最低价/中位数/最高价,将当前报价分类为划算、正常或昂贵。
    当您需要基于可靠基准而非猜测来回答“这个价格真的划算吗?”时,可使用该命令。
    bash
    hotel-tonight-pp-cli verdict "Argonaut Hotel" --agent

Live deal views

实时特惠视图

  • compare-neighborhoods
    — Group tonight's deals in a metro by neighborhood and rank the neighborhoods by median price or best % off.
    Use when deciding which area of a city has the best last-minute value tonight.
    bash
    hotel-tonight-pp-cli compare-neighborhoods --metro 1 --when tonight --agent
  • datescan
    — Compare a location's deals across tonight, tomorrow, and the weekend in one ranked side-by-side view.
    Reach for this to find the cheapest night to stay in an area without running the search repeatedly.
    bash
    hotel-tonight-pp-cli datescan --lat 30.3071 --lng -97.7354 --agent
  • daily-drop
    — Reveal today's Daily Drop hotel and its real discounted price for a market (the app hides it behind a slide-to-unlock gate), and with --history read the recorded run of past Daily Drops.
    Use to see and track HotelTonight's exclusive once-a-day flash deal, which the app hides until you unlock it and erases each day.
    bash
    hotel-tonight-pp-cli daily-drop --metro 1 --agent
  • compare-neighborhoods
    — 将某都市圈当晚的特惠按街区分组,并按中位数价格或最佳折扣百分比对街区进行排名。
    当您决定当晚城市哪个区域的最后一刻性价比最高时,可使用该命令。
    bash
    hotel-tonight-pp-cli compare-neighborhoods --metro 1 --when tonight --agent
  • datescan
    — 将某地点当晚、次日及周末的特惠以并排排名的方式进行对比。
    当您无需重复搜索即可找到某区域最便宜的入住夜晚时,可使用该命令。
    bash
    hotel-tonight-pp-cli datescan --lat 30.3071 --lng -97.7354 --agent
  • daily-drop
    — 显示某市场今日的Daily Drop酒店及其实际折扣价(应用程序将其隐藏在滑动解锁界面后),添加
    --history
    参数可查看过往Daily Drop的记录。
    当您需要查看并追踪HotelTonight每日专属的限时特惠(该特惠在应用中需解锁才能查看,且每日更新)时,可使用该命令。
    bash
    hotel-tonight-pp-cli daily-drop --metro 1 --agent

Command Reference

命令参考

inventory — Last-minute hotel deal inventory by location
  • hotel-tonight-pp-cli inventory
    — Search last-minute hotel deals near a latitude/longitude for a date range
markets — HotelTonight markets (cities where deals are offered)
  • hotel-tonight-pp-cli markets get
    — Get a single market by its numeric id
  • hotel-tonight-pp-cli markets list
    — List HotelTonight's major markets with location, slug, and category prices
  • hotel-tonight-pp-cli markets nearby
    — List popular/nearby markets for a given market id
inventory — 按位置查询最后一刻酒店特惠库存
  • hotel-tonight-pp-cli inventory
    — 根据经纬度和日期范围搜索最后一刻酒店特惠
markets — HotelTonight覆盖的市场(提供特惠的城市)
  • hotel-tonight-pp-cli markets get
    — 根据数字ID获取单个市场信息
  • hotel-tonight-pp-cli markets list
    — 列出HotelTonight的主要市场,包含位置、别名和分类价格
  • hotel-tonight-pp-cli markets nearby
    — 根据给定市场ID列出热门/邻近市场

Finding the right command

查找合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
hotel-tonight-pp-cli which "<capability in your own words>"
which
resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code
0
means at least one match; exit code
2
means no confident match — fall back to
--help
or use a narrower query.
当您知道要执行的操作但不确定对应命令时,可直接询问CLI:
bash
hotel-tonight-pp-cli which "<用您自己的语言描述功能>"
which
命令会将自然语言的功能查询解析为与CLI精选功能索引最匹配的命令。退出码
0
表示至少找到一个匹配项;退出码
2
表示无匹配项——此时可回退到
--help
或使用更精确的查询。

Recipes

使用示例

Tonight's cheapest near a coordinate, trimmed for agents

经纬度附近当晚最便宜的酒店(为Agent精简输出)

bash
hotel-tonight-pp-cli inventory --latitude 37.7749 --longitude -122.4194 --agent --select rooms.hotel.name,rooms.hotel.neighborhood,rooms.customer_price_per_night,rooms.strikethrough_price,rooms.deal_type
The raw inventory payload is tens of KB of nested deal data; --select with dotted paths returns just the hotel, neighborhood, price, 30-day-high, and deal type so an agent doesn't burn context.
bash
hotel-tonight-pp-cli inventory --latitude 37.7749 --longitude -122.4194 --agent --select rooms.hotel.name,rooms.hotel.neighborhood,rooms.customer_price_per_night,rooms.strikethrough_price,rooms.deal_type
原始库存 payload 包含数十KB的嵌套特惠数据;使用
--select
和点路径仅返回酒店名称、街区、价格、30天最高价和特惠类型,避免Agent消耗过多上下文。

Watch a neighborhood for a price target

监控某街区的价格目标

bash
hotel-tonight-pp-cli watch --lat 37.7749 --lng -122.4194 --when tonight --below 150
Snapshots current deals and reports rooms now under $150 or cheaper than the last observation — run it on a cron to catch drops while you're away.
bash
hotel-tonight-pp-cli watch --lat 37.7749 --lng -122.4194 --when tonight --below 150
快照当前特惠信息,并报告价格低于150美元或较上次观测更低的房间——可通过定时任务(cron)运行,在您不在时捕捉价格下跌。

Decide which night to stay

决定入住日期

bash
hotel-tonight-pp-cli datescan --lat 30.3071 --lng -97.7354
Lines up tonight vs tomorrow vs the weekend for the same area so you can pick the cheapest night in one view.
bash
hotel-tonight-pp-cli datescan --lat 30.3071 --lng -97.7354
将同一区域当晚、次日及周末的特惠信息并列展示,让您一目了然地选择最便宜的入住夜晚。

Is this rate actually good?

这个价格真的划算吗?

bash
hotel-tonight-pp-cli verdict "Argonaut Hotel"
Classifies the current quote against the hotel's own recorded low/median/high — requires a few prior syncs to build the baseline.
bash
hotel-tonight-pp-cli verdict "Argonaut Hotel"
根据酒店自身记录的最低价/中位数/最高价对当前报价进行分类——需要先进行几次同步以建立基准数据。

Auth Setup

认证设置

No authentication required.
Run
hotel-tonight-pp-cli doctor
to verify setup.
无需认证。
执行
hotel-tonight-pp-cli doctor
验证设置是否正确。

Agent Mode

Agent模式

Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • Pipeable — JSON on stdout, errors on stderr
  • Filterable
    --select
    keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
    bash
    hotel-tonight-pp-cli inventory --latitude example-value --longitude example-value --agent --select id,name,status
  • Previewable
    --dry-run
    shows the request without sending
  • Offline-friendly — sync/search commands can use the local SQLite store when available
  • Non-interactive — never prompts, every input is a flag
  • Read-only — do not use this CLI for create, update, delete, publish, comment, upvote, invite, order, send, or other mutating requests
在任何命令后添加
--agent
参数。该参数等效于:
--json --compact --no-input --no-color --yes
  • 可管道传输 — 标准输出为JSON,错误信息输出到标准错误
  • 可过滤
    --select
    参数保留指定字段子集。点路径可深入嵌套结构;数组会遍历每个元素。对于输出冗长的API,这对控制上下文大小至关重要:
    bash
    hotel-tonight-pp-cli inventory --latitude example-value --longitude example-value --agent --select id,name,status
  • 可预览
    --dry-run
    参数显示请求内容但不发送
  • 离线友好 — 同步/搜索命令可在本地SQLite存储可用时使用该存储
  • 非交互式 — 从不弹出提示,所有输入均通过 flag 提供
  • 只读 — 请勿使用本CLI执行创建、更新、删除、发布、评论、点赞、邀请、下单、发送或其他修改状态的请求

Response envelope

响应信封

Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
Parse
.results
for data and
.meta.source
to know whether it's live or local. A human-readable
N results (live)
summary is printed to stderr only when stdout is a terminal AND no machine-format flag (
--json
,
--csv
,
--compact
,
--quiet
,
--plain
,
--select
) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.
从本地存储或API读取数据的命令会将输出包裹在来源信封中:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
解析
.results
获取数据,
.meta.source
用于判断数据是实时的还是本地的。仅当标准输出为终端且未设置机器格式flag(
--json
--csv
--compact
--quiet
--plain
--select
)时,才会将人类可读的
N results (live)
摘要输出到标准错误;管道/Agent消费或指定格式的运行会在标准输出中输出纯JSON。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
hotel-tonight-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
hotel-tonight-pp-cli feedback --stdin < notes.txt
hotel-tonight-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.hotel-tonight-pp-cli/feedback.jsonl
. They are never POSTed unless
HOTEL_TONIGHT_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
HOTEL_TONIGHT_FEEDBACK_AUTO_SEND=true
. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当您(或Agent)发现本CLI存在问题时,可记录反馈:
hotel-tonight-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
hotel-tonight-pp-cli feedback --stdin < notes.txt
hotel-tonight-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.hotel-tonight-pp-cli/feedback.jsonl
文件中。除非设置了
HOTEL_TONIGHT_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置了
HOTEL_TONIGHT_FEEDBACK_AUTO_SEND=true
,否则不会发送到远程。默认行为仅存储在本地。
请记录让您感到意外的内容,而非正式的bug报告。简短、具体、单行描述:这样的反馈更有价值。

Output Delivery

输出交付

Every command accepts
--deliver <sink>
. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
SinkEffect
stdout
Default; write to stdout only
file:<path>
Atomically write output to
<path>
(tmp + rename)
webhook:<url>
POST the output body to the URL (
application/json
or
application/x-ndjson
when
--compact
)
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
每个命令都支持
--deliver <sink>
参数。输出会发送到指定的sink,同时(或替代)输出到标准输出,以便Agent无需手动管道即可路由命令结果。支持三种sink:
Sink效果
stdout
默认值;仅输出到标准输出
file:<path>
原子性地将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出体POST到指定URL(当使用
--compact
时为
application/json
application/x-ndjson
格式)
不支持的协议会返回结构化错误,并列出支持的类型。Webhook失败会返回非零退出码,并将URL和HTTP状态记录到标准错误。

Named Profiles

命名配置文件

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
hotel-tonight-pp-cli profile save briefing --json
hotel-tonight-pp-cli --profile briefing inventory --latitude example-value --longitude example-value
hotel-tonight-pp-cli profile list --json
hotel-tonight-pp-cli profile show briefing
hotel-tonight-pp-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults.
agent-context
lists all available profiles under
available_profiles
so introspecting agents discover them at runtime.
配置文件是一组保存的flag值,可在多次调用中复用。当定时Agent每次运行都使用相同配置调用同一命令时,可使用该功能——即HeyGen的“Beacon”模式。
hotel-tonight-pp-cli profile save briefing --json
hotel-tonight-pp-cli --profile briefing inventory --latitude example-value --longitude example-value
hotel-tonight-pp-cli profile list --json
hotel-tonight-pp-cli profile show briefing
hotel-tonight-pp-cli profile delete briefing --yes
显式flag始终优先于配置文件中的值;配置文件中的值优先于默认值。
agent-context
会在
available_profiles
下列出所有可用配置文件,以便Agent在运行时发现它们。

Exit Codes

退出码

CodeMeaning
0Success
2Usage error (wrong arguments)
3Resource not found
5API error (upstream issue)
7Rate limited (wait and retry)
10Config error
代码含义
0成功
2使用错误(参数错误)
3资源未找到
5API错误(上游问题)
7速率限制(请稍后重试)
10配置错误

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    → show
    hotel-tonight-pp-cli --help
    output
  2. Starts with
    install
    → ends with
    mcp
    → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with
    --agent
    )
解析
$ARGUMENTS
的规则:
  1. 为空、
    help
    --help
    → 显示
    hotel-tonight-pp-cli --help
    输出
  2. install
    开头
    → 若结尾为
    mcp
    → 安装MCP;否则 → 参见上方前提条件中的安装步骤
  3. 其他情况 → 直接使用(添加
    --agent
    参数执行CLI命令)

MCP Server Installation

MCP服务器安装

  1. Install the MCP server:
    bash
    go install github.com/mvanhorn/printing-press-library/library/travel/hotel-tonight/cmd/hotel-tonight-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add hotel-tonight-pp-mcp -- hotel-tonight-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/travel/hotel-tonight/cmd/hotel-tonight-pp-mcp@latest
  2. 注册到Claude Code:
    bash
    claude mcp add hotel-tonight-pp-mcp -- hotel-tonight-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which hotel-tonight-pp-cli
    If not found, offer to install (see Prerequisites at the top of this skill).
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  3. Execute with the
    --agent
    flag:
    bash
    hotel-tonight-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    hotel-tonight-pp-cli <command> --help
    .
  1. 检查是否已安装:
    which hotel-tonight-pp-cli
    若未找到,提供安装选项(参见顶部前提条件中的步骤)。
  2. 将用户查询与上方“独特功能”和“命令参考”中的最佳命令匹配。
  3. 添加
    --agent
    参数执行命令:
    bash
    hotel-tonight-pp-cli <command> [subcommand] [args] --agent
  4. 若存在歧义,查看子命令帮助:
    hotel-tonight-pp-cli <command> --help