Skip to content
Back to search

borski

Travel hacking plugins by Borski. Flights, hotels, points, miles, awards.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/borski/travel-hacking-toolkit with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/borski/travel-hacking-toolkit'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/borski--travel-hacking-toolkit/badge.svg)](/listings/borski--travel-hacking-toolkit)

HTML

<a href="/listings/borski--travel-hacking-toolkit"><img src="/api/listings/borski--travel-hacking-toolkit/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

Install via plugin (no clone)

The easiest way to use the toolkit. Pick your tool:

Claude Code

Inside Claude Code, run:

/plugin marketplace add borski/travel-hacking-toolkit
/plugin install travel-hacker@borski

Done. 42 skills, 7 MCP servers (6 free + LiteAPI which needs a key), and the `travel-hacker` subagent are installed. Run `claude` from anywhere and ask it to plan a trip.

To verify the install, run `/travel-hacker:getting-started` inside Claude Code. It tells you which API keys are configured and points at the local setup script for the missing ones. Or in your shell: `claude plugin list | grep travel-hacker` should show the plugin.

Codex

In your terminal:

codex plugin marketplace add borski/travel-hacking-toolkit

Then start Codex and the plugin appears in `/plugins`. Codex pulls the marketplace catalog from the repo (`.agents/plugins/marketplace.json`) and the plugin manifest from `plugins/travel-hacking-toolkit/.codex-plugin/plugin.json`, so the install is one command.

Cowork (Claude Desktop's agent panel)

Cowork itself doesn't expose `/plugin` slash commands, so you can't install plugins from inside a Cowork chat. Install via Claude Code first; Cowork picks it up automatically because both share `~/.claude/plugins/`.

1. **In your terminal**, run `claude` 2. **In Claude Code**, run the two install commands from the [Claude Code section above](#claude-code) 3. **Open Cowork** inside Claude Desktop. The plugin is already there.

Claude Desktop's chat UI doesn't support the plugin format yet, so use Cowork inside the same app for the full experience.

Configure API keys

The 6 free MCP servers (Skiplagged, Kiwi, Trivago, Ferryhopper, Airbnb, Seats.aero) work immediately with zero keys. Cash flight and hotel search work out of the box, and so does cached award search for flights in the next 60 days.

To unlock award search and the rest of the toolkit, you need API keys set as environment variables in your shell. Run the local setup script:

**macOS / Linux / WSL / Git Bash:**

bash <(curl -fsSL https://raw.githubusercontent.com/borski/travel-hacking-toolkit/main/scripts/setup-keys.sh)

**Windows (PowerShell):**

iwr https://raw.githubusercontent.com/borski/travel-hacking-toolkit/main/scripts/setup-keys.ps1 -OutFile $env:TEMP\setup-keys.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File $env:TEMP\setup-keys.ps1
Remove-Item $env:TEMP\setup-keys.ps1

The script prompts for each key with masked input, validates them (rejects values with single quotes that would break the export, plus a per-key minimum length sanity check), writes them to the right shell rc with a backup, and never echoes the values back. The exports are single-quoted so other shell metacharacters in the key are safe. Keys never enter your terminal scrollback or any chat session. The `/travel-hacker:getting-started` skill inside Claude Code points at the same script.

The 4 highest-value keys:

| Key | What it unlocks | Cost | |-----|------|-----------| | `SEATS_AERO_API_KEY` | Award flight search across 27 mileage programs. The main event. | Pro ~$8/mo | | `DUFFEL_API_KEY_LIVE` | Real GDS cash flight prices. | Free to search, pay per booking | | `IGNAV_API_KEY` | Backup cash flight prices. Fast REST API. | 1,000 free requests/month | | `AWARDWALLET_API_KEY` + `AWARDWALLET_USER_ID` | Auto-pull your loyalty balances, elite status, transfer ratios. | Business account required |

Other keys (SerpAPI, RapidAPI, LiteAPI, TripAdvisor, RESROBOT, Rejseplanen, Entur) extend specific skills. The setup skill covers them too. See the [full API key reference](#api-keys--signup-links) for signup links.

Five Docker-based skills (Southwest, American Airlines, Chase, Amex, TicketsAtWork) handle sites that don't have public APIs, plus a shared base image. They auto-pull on first use. See the [Docker Images](#docker-images) section for credentials and configuration.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 32 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://json.schemastore.org/claude-code-marketplace.json",
  3. "name": "borski",
  4. "description": "Travel hacking plugins by Borski. Flights, hotels, points, miles, awards.",
  5. "owner": {
  6. "name": "Michael Borohovski"
  7. },
  8. "plugins": [
  9. {
  10. "name": "travel-hacker",
  11. "source": "./",
  12. "description": "AI-powered travel hacking with points, miles, and award flights. 42 skills + 7 MCP servers for flight search, hotel comparison, loyalty balance tracking, and award optimization across 27 mileage programs.",
  13. "author": {
  14. "name": "Michael Borohovski"
  15. },
  16. "homepage": "https://github.com/borski/travel-hacking-toolkit",
  17. "repository": "https://github.com/borski/travel-hacking-toolkit",
  18. "license": "MIT",
  19. "keywords": [
  20. "travel",
  21. "flights",
  22. "hotels",
  23. "points",
  24. "miles",
  25. "award-travel",
  26. "loyalty",
  27. "trip-planning"
  28. ],
  29. "category": "productivity"
  30. }
  31. ]
  32. }
README.md · README · 589 lines · 1 finding marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Travel Hacking Toolkit
  2. AI-powered travel hacking with points, miles, and award flights. Drop-in skills and MCP servers for [OpenCode](https://opencode.ai), [Claude Code](https://docs.anthropic.com/en/docs/claude-code), and [Codex](https://openai.com/codex/).
  3. Ask your AI to find you a 60,000-mile business class flight to Tokyo. It'll search award availability across 27 mileage programs, compare against cash prices, check your loyalty balances, and tell you the best play.
  4. ## Quick Start
  5. ### Install via plugin (no clone)
  6. The easiest way to use the toolkit. Pick your tool:
  7. #### Claude Code
  8. Inside Claude Code, run:
  9. ```
  10. /plugin marketplace add borski/travel-hacking-toolkit
  11. /plugin install travel-hacker@borski
  12. ```
  13. Done. 42 skills, 7 MCP servers (6 free + LiteAPI which needs a key), and the `travel-hacker` subagent are installed. Run `claude` from anywhere and ask it to plan a trip.
  14. To verify the install, run `/travel-hacker:getting-started` inside Claude Code. It tells you which API keys are configured and points at the local setup script for the missing ones. Or in your shell: `claude plugin list | grep travel-hacker` should show the plugin.
  15. #### Codex
  16. In your terminal:
  17. ```bash
  18. codex plugin marketplace add borski/travel-hacking-toolkit
  19. ```
  20. Then start Codex and the plugin appears in `/plugins`. Codex pulls the marketplace catalog from the repo (`.agents/plugins/marketplace.json`) and the plugin manifest from `plugins/travel-hacking-toolkit/.codex-plugin/plugin.json`, so the install is one command.
  21. #### Cowork (Claude Desktop's agent panel)
  22. Cowork itself doesn't expose `/plugin` slash commands, so you can't install plugins from inside a Cowork chat. Install via Claude Code first; Cowork picks it up automatically because both share `~/.claude/plugins/`.
  23. 1. **In your terminal**, run `claude`
  24. 2. **In Claude Code**, run the two install commands from the [Claude Code section above](#claude-code)
  25. 3. **Open Cowork** inside Claude Desktop. The plugin is already there.
  26. Claude Desktop's chat UI doesn't support the plugin format yet, so use Cowork inside the same app for the full experience.
  27. ### Configure API keys
  28. The 6 free MCP servers (Skiplagged, Kiwi, Trivago, Ferryhopper, Airbnb, Seats.aero) work immediately with zero keys. Cash flight and hotel search work out of the box, and so does cached award search for flights in the next 60 days.
  29. To unlock award search and the rest of the toolkit, you need API keys set as environment variables in your shell. Run the local setup script:
  30. **macOS / Linux / WSL / Git Bash:**
  31. ```bash
  32. bash <(curl -fsSL https://raw.githubusercontent.com/borski/travel-hacking-toolkit/main/scripts/setup-keys.sh)
    • Note: Runs a downloaded script through process substitution (bash <(curl …))
    • Line 55 on GitHub
  33. ```
  34. **Windows (PowerShell):**
  35. ```powershell
  36. iwr https://raw.githubusercontent.com/borski/travel-hacking-toolkit/main/scripts/setup-keys.ps1 -OutFile $env:TEMP\setup-keys.ps1
  37. powershell -NoProfile -ExecutionPolicy Bypass -File $env:TEMP\setup-keys.ps1
  38. Remove-Item $env:TEMP\setup-keys.ps1
  39. ```
  40. The script prompts for each key with masked input, validates them (rejects values with single quotes that would break the export, plus a per-key minimum length sanity check), writes them to the right shell rc with a backup, and never echoes the values back. The exports are single-quoted so other shell metacharacters in the key are safe. Keys never enter your terminal scrollback or any chat session. The `/travel-hacker:getting-started` skill inside Claude Code points at the same script.
  41. The 4 highest-value keys:
  42. | Key | What it unlocks | Cost |
  43. |-----|------|-----------|
  44. | `SEATS_AERO_API_KEY` | Award flight search across 27 mileage programs. The main event. | Pro ~$8/mo |
  45. | `DUFFEL_API_KEY_LIVE` | Real GDS cash flight prices. | Free to search, pay per booking |
  46. | `IGNAV_API_KEY` | Backup cash flight prices. Fast REST API. | 1,000 free requests/month |
  47. | `AWARDWALLET_API_KEY` + `AWARDWALLET_USER_ID` | Auto-pull your loyalty balances, elite status, transfer ratios. | Business account required |
  48. Other keys (SerpAPI, RapidAPI, LiteAPI, TripAdvisor, RESROBOT, Rejseplanen, Entur) extend specific skills. The setup skill covers them too. See the [full API key reference](#api-keys--signup-links) for signup links.
  49. Five Docker-based skills (Southwest, American Airlines, Chase, Amex, TicketsAtWork) handle sites that don't have public APIs, plus a shared base image. They auto-pull on first use. See the [Docker Images](#docker-images) section for credentials and configuration.
  50. #### Manual setup (if you'd rather not use the skill)
  51. Add to your shell rc (`~/.zshrc`, `~/.bashrc`, etc.):
  52. ```bash
  53. export SEATS_AERO_API_KEY="your-key-here"
  54. export DUFFEL_API_KEY_LIVE="your-key-here"
  55. export IGNAV_API_KEY="your-key-here"
  56. export AWARDWALLET_API_KEY="your-key-here"
  57. export AWARDWALLET_USER_ID="your-user-id"
  58. ```
  59. Reload (`source ~/.zshrc`) or open a new terminal, then run `claude`.
  60. If you keep secrets in 1Password, you can resolve at launch instead:
  61. ```bash
  62. op run --no-masking --env-file=.env -- claude
  63. ```
  64. The `--no-masking` flag is required because `op run`'s default output masking interferes with Claude Code's TTY detection and triggers a non-interactive prompt error. Masking only affects stdout, not the env vars themselves, so the keys still get to claude correctly.
  65. (See [1Password CLI docs](https://developer.1password.com/docs/cli/secrets-environment-variables/) for the `.env` template syntax.)
  66. > The toolkit reads keys from the shell environment because plugin `userConfig` doesn't propagate to skills that shell out to scripts (verified empirically; related upstream issues [anthropics/claude-code#11927](https://github.com/anthropics/claude-code/issues/11927), [#39125](https://github.com/anthropics/claude-code/issues/39125)).
  67. ### Clone path (for OpenCode users or contributors)
  68. OpenCode doesn't have a plugin format, so OpenCode users clone the repo. Contributors who want to hack on the toolkit also clone.
  69. ```bash
  70. git clone https://github.com/borski/travel-hacking-toolkit.git
  71. cd travel-hacking-toolkit
  72. # macOS / Linux / WSL / Git Bash
  73. ./scripts/setup.sh
  74. # Windows (PowerShell or cmd)
  75. .\scripts\setup.cmd
  76. ```
  77. The setup script picks your tool (OpenCode, Claude Code, Codex, or all three), creates your API key config file, installs dependencies, and optionally installs skills system-wide for OpenCode and Claude Code.
  78. On Windows the `.cmd` wrapper launches `scripts\setup.ps1` with an ExecutionPolicy bypass so nothing needs to be unblocked first.
  79. Then launch your tool from inside the repo:
  80. ```bash
  81. # OpenCode
  82. opencode
  83. # Claude Code (loads the plugin from the working tree, no install needed)
  84. claude --plugin-dir .
  85. # Codex
  86. source .env && codex
  87. ```
  88. `claude --plugin-dir .` loads the plugin (skills, MCP servers, and the `travel-hacker` subagent) directly from your clone. Changes you make to the toolkit are picked up immediately. Useful when you're contributing.
  89. ## What's Included
  90. ### MCP Servers (real-time tools)
  91. | Server | What It Does | API Key |
  92. |--------|-------------|---------|
  93. | [Skiplagged](https://skiplagged.com) | Flight search with hidden city fares | None (free) |
  94. | [Kiwi.com](https://www.kiwi.com) | Flights with virtual interlining (creative cross-airline routing) | None (free) |
  95. | [Trivago](https://mcp.trivago.com/docs) | Hotel metasearch across booking sites | None (free) |
  96. | [Ferryhopper](https://ferryhopper.github.io/fh-mcp/) | Ferry routes across 33 countries, 190+ operators | None (free) |
  97. | [Airbnb](https://github.com/openbnb-org/mcp-server-airbnb) | Search Airbnb listings, property details, pricing. Includes geocoding fix, property type filter, and DISABLE_GEOCODING opt-out. | None (free) |
  98. | [Seats.aero](https://seats.aero/mcp) | Official award search MCP. Cached availability for the next 60 days with no sign-in. Pro sign-in (OAuth) adds live search, alerts, award hotels, upgrades, and deals. | None for 60 days. Seats.aero Pro for the rest |
  99. | [LiteAPI](https://mcp.liteapi.travel) | Hotel search with live rates and booking | [LiteAPI](https://liteapi.travel) |
  100. ### Skills (API knowledge for your AI)
  101. Start here: the **orchestration skills** call everything else automatically.
  102. > The skill tables below are auto-generated from `skills/*/SKILL.md` frontmatter by `scripts/gen-skill-tables.sh`. Edit the source frontmatter, not the tables. Signup links and API key URLs live in the [API Keys & Signup Links](#api-keys--signup-links) section below.
  103. #### Orchestration
  104. <!-- BEGIN: readme:orchestration -->
  105. | Skill | What It Does | API Key |
  106. |-------|-------------|---------|
  107. | **award-calendar** | Cheapest award dates for a route across a date range. Calendar grid view. | Seats.aero Pro |
  108. | **compare-flights** | Unified flight comparison across ALL sources in parallel. Auto-applies transfer optimization. | Uses individual skill keys |
  109. | **compare-hotels** | Unified hotel comparison across portals, metasearch, and Airbnb. FHR/Edit stacking detection. | Uses individual skill keys |
  110. | **gardening** | Audit existing reservations for price drops, better cabins, schedule changes, and improved routings. | Uses individual skill keys |
  111. | **getting-started** | First-run onboarding. Detects setup, points to setup-keys script, shows sample prompts. | None |
  112. | **plan-trip** | Guided trip planner. The hero command for the toolkit. | None |
  113. | **trip-calculator** | Cash vs points decision answered with math. Transfer ratios, taxes, opportunity cost. | None (free, local data) |
  114. | **trip-log** | Opt-in trip journal. Save searches and booked trips to trips/logs/ for future reference. | None |
  115. | **trip-planner** | Full trip planning. Flights + hotels + points in one shot. | Uses individual skill keys |
  116. <!-- END: readme:orchestration -->
  117. #### Flights
  118. <!-- BEGIN: readme:flights -->
  119. | Skill | What It Does | API Key |
  120. |-------|-------------|---------|
  121. | **duffel** | Primary cash prices. Real GDS per-fare-class data. | Duffel |
  122. | **google-flights** | Browser-automated Google Flights. All airlines including Southwest. | None (requires agent-browser) |
  123. | **ignav** | Fast REST API cash prices. Market selection for arbitrage. | Ignav (1,000 free) |
  124. | **seatmaps** | Aircraft seat maps, cabin dimensions, seat recommendations. | None (requires agent-browser) |
  125. | **seats-aero** | Award availability across 27 mileage programs. Partner API, plus the official MCP (keyless for the next 60 days, Pro sign-in for live search and alerts). | Seats.aero Pro/Partner (MCP free for 60 days) |
  126. | **southwest** | SW fare classes, points pricing, Companion Pass. Change flight price drop monitor. Docker: `ghcr.io/borski/sw-fares`. | None (requires Patchright) |
  127. | **wikipedia-airports** | Route discovery and airline-service sanity check via Wikipedia airport pages. Answers "does carrier X fly A→B" and "what airports serve destination Y" when fare tools disagree or miss obscure regional service. No API key. | None |
  128. <!-- END: readme:flights -->
  129. #### Credit Card Travel Portals
  130. <!-- BEGIN: readme:portals -->
  131. | Skill | What It Does | API Key |
  132. |-------|-------------|---------|
  133. | **amex-travel** | Amex MR portal for flights, hotels, IAP discounts, FHR/THC benefits. Requires Platinum. Docker: `ghcr.io/borski/amex-travel`. | None (requires Patchright) |
  134. | **bilt** | Bilt Rewards travel portal for hotels and flights. 1.25 cpp on Bilt Points. Home Away From Home properties give $300+ in benefits to Gold/Platinum members. | None (public API) |
  135. | **chase-travel** | Chase UR portal for flights, hotels, Points Boost, Edit benefits. Requires Sapphire. Docker: `ghcr.io/borski/chase-travel`. | None (requires Patchright) |
  136. <!-- END: readme:portals -->
  137. #### Hotels and Accommodation
  138. <!-- BEGIN: readme:hotels -->
  139. | Skill | What It Does | API Key |
  140. |-------|-------------|---------|
  141. | **premium-hotels** | Search 4,659 Amex FHR/THC + Chase Edit hotels by city. Stacking opportunities. | None (local data) |
  142. | **rapidapi** | Booking.com hotel prices. | RapidAPI |
  143. | **serpapi** | Google Hotels search and destination discovery. | SerpAPI |
  144. | **sutochno** | Sutochno.ru Russian apartment search via Patchright. Ruble / Mir payment for Georgia / CIS stays. Docker: `ghcr.io/borski/sutochno`. | None |
  145. | **ticketsatwork** | TicketsAtWork (EBG) corporate-perks portal. Hotels, theme park tickets, attractions, live events. Often beats portals by 10-30%. Docker: `ghcr.io/borski/ticketsatwork`. | None (requires TaW account + Patchright) |
  146. | **vrbo** | VRBO whole-home, condo, and cabin search via Patchright. Complements Airbnb for group stays. Docker: `ghcr.io/borski/vrbo`. | None (requires Patchright) |
  147. <!-- END: readme:hotels -->
  148. Also use **tripadvisor** (under Destinations) for hotel ratings, rankings, subratings, and reviews.
  149. #### Loyalty and Points
  150. <!-- BEGIN: readme:loyalty -->
  151. | Skill | What It Does | API Key |
  152. |-------|-------------|---------|
  153. | **american-airlines** | AAdvantage balance and elite status. AwardWallet does not support AA. Docker: `ghcr.io/borski/aa-miles-check`. | None (requires Patchright) |
  154. | **awardwallet** | All loyalty balances, elite status, history. | AwardWallet Business |
  155. | **transfer-partners** | Cheapest transfer path from credit card points to mileage programs. | None (local data) |
  156. | **wheretocredit** | Mileage earning rates by airline and booking class across 50+ programs. | None (free) |
  157. <!-- END: readme:loyalty -->
  158. #### Destinations and Transit
  159. <!-- BEGIN: readme:destinations -->
  160. | Skill | What It Does | API Key |
  161. |-------|-------------|---------|
  162. | **atlas-obscura** | Hidden gems and unusual attractions near any destination. | None (free) |
  163. | **deutsche-bahn** | Deutsche Bahn (DB) train search across Germany and into AT/CH/NL/FR/BE via the open-source db-vendo-client. Stations, journeys, departure boards. No API key. Pairs with scandinavia-transit for Europe-wide rail coverage. | None |
  164. | **scandinavia-transit** | Trains, buses, ferries in Norway, Sweden, and Denmark. Includes Danish fare/zone pricing. | Entur + Trafiklab + Rejseplanen |
  165. | **tripadvisor** | Hotel ratings, restaurant search, attraction reviews, nearby search. 5K calls/month. | TripAdvisor |
  166. <!-- END: readme:destinations -->
  167. #### Reference and Operations (auto-loaded on demand)
  168. These skills carry the deep institutional knowledge that used to live in CLAUDE.md. They auto-load when the agent encounters relevant triggers, so the main config stays lean.
  169. <!-- BEGIN: readme:reference -->
  170. | Skill | What It Covers |
  171. |-------|---------------|
  172. | **alliances** | Star Alliance, oneworld, SkyTeam membership and recent shifts (SAS to SkyTeam, ITA to Star, Hawaiian/Fiji to oneworld). Key cross-alliance booking relationships. |
  173. | **award-holds** | Per-program rules for placing award flight tickets on hold. Covers 9 programs with holds (AA 24h online, LH 5 days, FB 3 days, CX 2 days, Turkish 2 days, Virgin Atlantic 1-2 days, ANA 2 days, Emirates 1 day, EVA online), Singapore as agent-discretionary, and the negative space (UA/AS/DL/Aeroplan/BA/Qatar/Korean/Etihad - many programs still do not allow holds). |
  174. | **award-sweet-spots** | Catalog of legendary, excellent, and good award redemptions with current rates and devaluation history. |
  175. | **booking-guidance** | The booking flow, hold-before-transfer rule, phone numbers for major programs. |
  176. | **cabin-codes** | IATA cabin codes (F/J/W/Y) and saver fare class codes (X/I/O) for partner-bookable inventory. |
  177. | **fallback-and-resilience** | What to do when each tool fails. Tool-by-tool fallback paths. |
  178. | **flight-search-strategy** | The canonical multi-source search workflow. Source priority (Duffel > Ignav > Google Flights > others), market selection for international routes, source accuracy hierarchy, common failure modes. |
  179. | **hotel-chains** | Maps brand names (Westin, Holiday Inn, etc.) to chain families and loyalty programs. |
  180. | **lessons-learned** | Hard-won knowledge from real searches. The mandatory Seats.aero workflow, Southwest specifics, Companion Pass math, source accuracy, small-market caveats, Duffel limitations. Load before any award flight search. |
  181. | **partner-awards** | Which programs ticket which airlines (alliance + bilateral). Cross-references credit card currencies to booking programs. Reachability workflow. |
  182. | **points-valuations** | CPP formula, floor/ceiling rules, surcharge-heavy programs to avoid, transfer bonus considerations, Chase Points Boost dynamics, opportunity cost. |
  183. | **round-the-world** | RTW + Pacific Circle + Asia-Pacific Circle + regional distance-award reference. 13 active programs, 4 discontinued. |
  184. | **status-match** | Per-program status match rules with lifetime / once-per-N-years warnings, free vs paid concierge distinction, real fees, plus card-granted renewable status as the alternative. |
  185. | **stopovers** | Per-program stopover rules for award redemptions. Includes Icelandair free stopover, Aeroplan, Alaska Atmos, Flying Blue, Singapore tiers, plus the negative space (BA, AA, Delta, JetBlue) that have no stopover programs. |
  186. | **transfer-bonuses** | Active credit card transfer bonuses with primary-source citations. Tells the agent the real effective ratio when transferring points during a promotion. |
  187. <!-- END: readme:reference -->
  188. #### API Keys & Signup Links
  189. <!-- BEGIN: readme:signup-links -->
  190. These skills require an external account or API key signup. See [`.env.example`](.env.example) for the full list of env vars (some skills require an env var without a real signup, e.g. `scandinavia-transit` needs an `ENTUR_CLIENT_NAME` you choose yourself for Entur's required identification header).
  191. | Skill | Service | Link | Notes |
  192. |-------|---------|------|-------|
  193. | `duffel` | Duffel | [duffel.com](https://duffel.com) | Real GDS flight search. Free tier available. |
  194. | `ignav` | Ignav | [ignav.com](https://ignav.com) | Fast flight search REST API. 1,000 free requests, no credit card. |
  195. | `seats-aero` | Seats.aero | [seats.aero](https://seats.aero) | Award flight availability across 27 mileage programs. Pro tier ($99/yr) includes API access. |
  196. | `rapidapi` | RapidAPI | [rapidapi.com](https://rapidapi.com) | Marketplace; subscribe to Booking.com Live + Google Flights Live. |
  197. | `serpapi` | SerpAPI | [serpapi.com](https://serpapi.com) | Google Flights, Google Hotels, Travel Explore. |
  198. | `tripadvisor` | TripAdvisor | [www.tripadvisor.com/developers](https://www.tripadvisor.com/developers) | Hotel/restaurant/attraction data. 5K calls/month free. |
  199. | `awardwallet` | AwardWallet | [business.awardwallet.com](https://business.awardwallet.com) | Loyalty program balance aggregator. Business tier required. |
  200. | `ticketsatwork` | TicketsAtWork | [www.ticketsatwork.com](https://www.ticketsatwork.com) | Corporate-perks portal. Account requires employer affiliation. Same credentials work for Working Advantage, Plum, Beneplace (shared EBG backend). |
  201. | `scandinavia-transit` | Trafiklab (Sweden) | [www.trafiklab.se](https://www.trafiklab.se) | Sweden transit. Free API key. 30,000 calls/month. |
  202. | `scandinavia-transit` | Rejseplanen (Denmark) | [labs.rejseplanen.dk](https://labs.rejseplanen.dk) | Denmark transit. Free API key (application required). 50,000 calls/month, non-commercial only. |
  203. <!-- END: readme:signup-links -->
  204. ## Docker Images
  205. Five skills run as Docker containers (browser-automated via Patchright), plus a shared `patchright-docker` base image they all build on. All six images are public on GitHub Container Registry, no auth required to pull. `setup.sh` (and `setup.ps1` on Windows) auto-pulls the ones you need based on which tool you select.
  206. <!-- BEGIN: readme:docker -->
  207. | Image | Skill | Purpose | Source |
  208. |-------|-------|---------|--------|
  209. | [`ghcr.io/borski/patchright-docker`](https://github.com/borski/travel-hacking-toolkit/pkgs/container/patchright-docker) | (base) | Patchright + Chromium + xvfb base layer that all other browser-skill images build on. | [external](https://github.com/borski/patchright-docker) |
  210. | [`ghcr.io/borski/aa-miles-check`](https://github.com/borski/travel-hacking-toolkit/pkgs/container/aa-miles-check) | `american-airlines` | AAdvantage balance and elite status. AwardWallet does not support AA. | [skills/american-airlines](skills/american-airlines/Dockerfile) |
  211. | [`ghcr.io/borski/amex-travel`](https://github.com/borski/travel-hacking-toolkit/pkgs/container/amex-travel) | `amex-travel` | Amex MR portal for flights, hotels, IAP discounts, FHR/THC benefits. Requires Platinum. | [skills/amex-travel](skills/amex-travel/Dockerfile) |
  212. | [`ghcr.io/borski/chase-travel`](https://github.com/borski/travel-hacking-toolkit/pkgs/container/chase-travel) | `chase-travel` | Chase UR portal for flights, hotels, Points Boost, Edit benefits. Requires Sapphire. | [skills/chase-travel](skills/chase-travel/Dockerfile) |
  213. | [`ghcr.io/borski/sw-fares`](https://github.com/borski/travel-hacking-toolkit/pkgs/container/sw-fares) | `southwest` | SW fare classes, points pricing, Companion Pass. Change flight price drop monitor. | [skills/southwest](skills/southwest/Dockerfile) |
  214. | [`ghcr.io/borski/sutochno`](https://github.com/borski/travel-hacking-toolkit/pkgs/container/sutochno) | `sutochno` | Sutochno.ru Russian apartment search via Patchright. Ruble / Mir payment for Georgia / CIS stays. | [skills/sutochno](skills/sutochno/Dockerfile) |
  215. | [`ghcr.io/borski/ticketsatwork`](https://github.com/borski/travel-hacking-toolkit/pkgs/container/ticketsatwork) | `ticketsatwork` | TicketsAtWork (EBG) corporate-perks portal. Hotels, theme park tickets, attractions, live events. Often beats portals by 10-30%. | [skills/ticketsatwork](skills/ticketsatwork/Dockerfile) |
  216. | [`ghcr.io/borski/vrbo`](https://github.com/borski/travel-hacking-toolkit/pkgs/container/vrbo) | `vrbo` | VRBO whole-home, condo, and cabin search via Patchright. Complements Airbnb for group stays. | [skills/vrbo](skills/vrbo/Dockerfile) |
  217. <!-- END: readme:docker -->
  218. ### Usage
  219. ```bash
  220. # Southwest: fare search + price drop monitoring
  221. docker pull ghcr.io/borski/sw-fares:latest
  222. docker run --rm ghcr.io/borski/sw-fares --origin SJC --dest DEN --depart 2026-05-15 --points --json
  223. docker run --rm -e SW_USERNAME -e SW_PASSWORD ghcr.io/borski/sw-fares \
  224. change --conf ABC123 --first Jane --last Doe --json
  225. # American Airlines: AAdvantage balance + elite status (not in AwardWallet)
  226. docker pull ghcr.io/borski/aa-miles-check:latest
  227. docker run --rm -e AA_USERNAME=your_number -e AA_PASSWORD=your_pass ghcr.io/borski/aa-miles-check --json
  228. # Chase Travel: UR portal pricing, Points Boost, Edit hotels
  229. docker pull ghcr.io/borski/chase-travel:latest
  230. docker run --rm -v ~/.chase-travel-profiles:/profiles -v /tmp:/tmp/host \
  231. -e CHASE_USERNAME -e CHASE_PASSWORD \
  232. ghcr.io/borski/chase-travel script /scripts/search_flights.py \
  233. --origin SFO --dest CDG --depart 2026-08-11 --cabin business --json
  234. # Amex Travel: MR portal pricing, IAP discounts, FHR/THC hotels
  235. docker pull ghcr.io/borski/amex-travel:latest
  236. docker run --rm -v ~/.amex-travel-profiles:/profiles \
  237. -e AMEX_USERNAME -e AMEX_PASSWORD \
  238. ghcr.io/borski/amex-travel script /app/search_flights.py \
  239. --origin SFO --dest NRT --depart 2026-08-15 --cabin business --json
  240. # TicketsAtWork (also covers Working Advantage / Plum / Beneplace)
  241. docker pull ghcr.io/borski/ticketsatwork:latest
  242. docker run --rm -e TAW_USER -e TAW_PASS ghcr.io/borski/ticketsatwork \
  243. hotels --location "Carlsbad, CA" --checkin 2027-03-04 --checkout 2027-03-07 --json
  244. ```
  245. ### Building Locally
  246. To build any image locally instead of pulling from ghcr.io:
  247. ```bash
  248. docker build -t ghcr.io/borski/<image-name>:local skills/<skill-name>/
  249. ```
  250. The `Dockerfile` in each skill directory shows exactly what's in the image. All five skill images build on `ghcr.io/borski/patchright-docker` as the base.
  251. ## How It Works
  252. ### Skills
  253. Skills are markdown files that give your AI specialized travel-hacking capabilities. They come in two flavors:
  254. - **Tool skills** (`duffel`, `seats-aero`, `southwest`, etc.) wrap APIs, browser automation, and external tools. They contain endpoint documentation, curl examples, useful jq filters, and step-by-step usage instructions.
  255. - **Reference skills** (`flight-search-strategy`, `points-valuations`, `alliances`, `lessons-learned`, etc.) carry the institutional knowledge that decides when and how to use the tool skills. They contain the workflow rules, lookup tables, and hard-won lessons that prevent common mistakes.
  256. OpenCode, Claude Code, and Codex can all load them. Skills use **progressive disclosure**: each one's name and short description are loaded into context at session start. The agent reads the full SKILL.md only when it decides to use a skill. This keeps the always-loaded context small and lets the toolkit grow without bloating the agent's prompt.
  257. The `skills/` directory is the canonical source. The setup script either:
  258. - Installs a Codex plugin that points at the repo's skills and MCP config
  259. - Copies them to your tool's global skills directory (`~/.config/opencode/skills/` or `~/.claude/skills/`)
  260. - Or creates project-level symlinks so they load when you work from this directory
  261. ### MCP Servers
  262. MCP (Model Context Protocol) servers give your AI real-time tools it can call directly. The configs are in:
  263. - `opencode.json` for OpenCode (auto-discovered from the repo root)
  264. - `.mcp.json` for Claude Code (auto-discovered from the repo root)
  265. - `plugins/travel-hacking-toolkit/.mcp.json` for Codex plugin installs
  266. Skiplagged, Kiwi.com, Trivago, Ferryhopper, and Airbnb need no setup at all. LiteAPI is also a remote server but needs an API key configured in your settings.
  267. **Why Codex needs a plugin:** OpenCode and Claude Code both auto-discover MCP servers from a repo-local config file. Codex doesn't. It only loads MCP servers from `~/.codex/config.toml` or from an installed plugin. The toolkit ships a Codex plugin (under `plugins/travel-hacking-toolkit/`) that bundles the MCP config so Codex users get the same out-of-the-box experience as the other two tools. `setup.sh` wires this up automatically when you select the Codex option.
  268. ## Which Skill Do I Use?
  269. ```
  270. "Plan a trip to Paris"
  271. └─→ trip-planner (runs everything below automatically)
  272. "Find flights SFO to CDG"
  273. ├─ Know exact dates? → compare-flights (all sources in parallel)
  274. └─ Flexible dates? → award-calendar (cheapest dates for a route)
  275. "Find hotels in Paris"
  276. ├─ Best overall → compare-hotels (portals + metasearch + Airbnb)
  277. ├─ Premium programs → premium-hotels (FHR/THC/Edit)
  278. └─ Discount pricing → ticketsatwork (often beats portals 10-30%)
  279. "Should I use points or cash?"
  280. └─→ trip-calculator (CPP analysis + opportunity cost)
  281. Reference: points-valuations (floor/ceiling rules)
  282. "Which of my points should I use?"
  283. └─→ transfer-partners (cheapest transfer path)
  284. Reference: partner-awards (cross-alliance reachability)
  285. "Why is this redemption flagged as poor value?"
  286. └─→ Reference skills: points-valuations, alliances, award-sweet-spots
  287. "Why am I not finding award space?"
  288. └─→ lessons-learned (THE mandatory Seats.aero workflow rules)
  289. "A tool failed. Now what?"
  290. └─→ fallback-and-resilience (per-tool recovery paths)
  291. "How do I actually book this?"
  292. └─→ booking-guidance (booking flow, phone numbers, hold-before-transfer rule)
  293. "Check my SW reservations for price drops"
  294. └─→ southwest (change flight monitor)
  295. ```
  296. The **orchestration skills** (`trip-planner`, `compare-flights`, `compare-hotels`) call the individual source skills automatically. Start with those unless you need a specific source.
  297. The **reference skills** (`flight-search-strategy`, `points-valuations`, `partner-awards`, `alliances`, `award-sweet-spots`, `cabin-codes`, `hotel-chains`, `fallback-and-resilience`, `booking-guidance`, `lessons-learned`) auto-load on relevant context to provide deep institutional knowledge without you needing to invoke them explicitly.
  298. ## The Travel Hacking Workflow
  299. The core question: **"Should I burn points or pay cash?"**
  300. 1. **Search ALL flight sources** — Duffel + Ignav + Google Flights + Skiplagged + Kiwi for cash. Seats.aero for awards. Southwest for SW points. Chase + Amex portals for pay-with-points.
  301. 2. **Optimize transfers** — `transfer-partners` finds the cheapest path from your credit card points to the loyalty program offering the best deal.
  302. 3. **Compare** — `trip-calculator` shows CPP for each option. Higher CPP = better use of points. Below floor valuation = pay cash instead.
  303. 4. **Check balances** — AwardWallet confirms you have enough points.
  304. 5. **Book it** — Use booking links from Seats.aero, Duffel, or Ignav. Don't transfer points until you've confirmed availability on the airline's site.
  305. ### Example Prompts
  306. ```
  307. "Plan a trip to Paris Aug 11-15 in business class"
  308. "Find me the cheapest business class award from SFO to Tokyo in August"
  309. "When's the cheapest time to fly SFO to NRT on points?"
  310. "Compare all options for SFO to CDG round trip"
  311. "Find hotels in Stockholm, include Airbnb"
  312. "Compare points vs cash for a round trip JFK to London next March"
  313. "What are my United miles and Chase UR balances?"
  314. "Check my Southwest reservations for price drops"
  315. "Find hidden gems near Lisbon"
  316. "How do I get from Oslo to Bergen by train?"
  317. "What's the seat pitch on Air France 83 in business class?"
  318. "How many AAdvantage miles do I have?"
  319. "Which FHR and Chase Edit hotels are in Stockholm? Any stacking opportunities?"
  320. "What's the Points Boost rate for SFO to Tokyo business class on Chase?"
  321. "Compare Amex IAP fares vs cash for business class to Paris"
  322. ```
  323. ## Project Structure
  324. ```
  325. travel-hacking-toolkit/
  326. ├── .claude-plugin/
  327. │ ├── plugin.json # Claude Code plugin manifest (this is the install root)
  328. │ └── marketplace.json # Claude Code marketplace catalog
  329. ├── .agents/
  330. │ ├── plugins/marketplace.json # Codex marketplace catalog
  331. │ └── skills -> ../skills # Codex auto-discovery (no plugin install needed)
  332. ├── AGENTS.md -> CLAUDE.md # OpenCode project instructions (symlink)
  333. ├── CLAUDE.md # Project instructions, agent system prompt (frontmatter at top)
  334. ├── agents/
  335. │ └── travel-hacker.md # Plugin agent file (auto-synced from CLAUDE.md)
  336. ├── opencode.json # OpenCode MCP server config
  337. ├── .mcp.json # Claude Code MCP server config
  338. ├── .env.example # API key template (OpenCode/Codex clone path)
  339. ├── .claude/
  340. │ └── skills -> ../skills # Symlink to skills
  341. ├── .opencode/
  342. │ └── skills -> ../skills # Symlink to skills
  343. ├── .github/workflows/
  344. │ └── smoke-test.yml # CI: runs scripts/smoke-test.sh --quick on PRs
  345. ├── plugins/
  346. │ └── travel-hacking-toolkit/
  347. │ ├── .codex-plugin/plugin.json # Codex plugin manifest
  348. │ ├── .mcp.json # Codex MCP server config
  349. │ └── skills -> ../../skills # Codex skill bundle
  350. ├── data/
  351. │ ├── alliances.json # Airline alliance membership + booking relationships
  352. │ ├── hotel-chains.json # Hotel chains, sub-brands, loyalty programs, reverse lookup
  353. │ ├── partner-awards.json # Which programs book which airlines (alliance + bilateral)
  354. │ ├── points-valuations.json # Points/miles valuations from 4 sources (floor/ceiling)
  355. │ ├── sweet-spots.json # High-value award redemptions + booking windows
  356. │ └── transfer-partners.json # Credit card transfer partners + ratios
  357. ├── skills/
  358. │ │
  359. │ │ # ── Orchestration ──
  360. │ ├── award-calendar/SKILL.md # Cheapest award dates across a date range
  361. │ ├── compare-flights/SKILL.md # Unified flight comparison (all sources)
  362. │ ├── compare-hotels/SKILL.md # Unified hotel comparison (all sources)
  363. │ ├── getting-started/SKILL.md # First-run setup detector + signpost to setup-keys
  364. │ ├── plan-trip/SKILL.md # User-invoked guided trip planner (the hero command)
  365. │ ├── trip-calculator/SKILL.md # Cash vs points calculator
  366. │ ├── trip-planner/SKILL.md # Full trip planning in one shot
  367. │ │
  368. │ │ # ── Flights ──
  369. │ ├── duffel/SKILL.md # Primary cash prices (GDS)
  370. │ ├── google-flights/SKILL.md # Browser-automated Google Flights
  371. │ ├── ignav/SKILL.md # Secondary cash prices (REST API)
  372. │ ├── seatmaps/SKILL.md # Aircraft seat maps
  373. │ ├── seats-aero/SKILL.md # Award flight availability
  374. │ ├── southwest/ # Southwest fares + change monitoring
  375. │ │ ├── SKILL.md
  376. │ │ ├── Dockerfile
  377. │ │ └── scripts/
  378. │ │ ├── search_fares.py
  379. │ │ ├── check_change.py
  380. │ │ └── entrypoint.sh
  381. │ │
  382. │ │ # ── Credit Card Portals ──
  383. │ ├── amex-travel/ # Amex MR portal (flights + hotels)
  384. │ │ ├── SKILL.md
  385. │ │ ├── Dockerfile
  386. │ │ └── scripts/
  387. │ │ └── search_flights.py
  388. │ ├── chase-travel/ # Chase UR portal (flights + hotels)
  389. │ │ ├── SKILL.md
  390. │ │ ├── Dockerfile
  391. │ │ └── scripts/
  392. │ │ ├── search_flights.py
  393. │ │ └── record_search.py
  394. │ │
  395. │ │ # ── Hotels ──
  396. │ ├── premium-hotels/SKILL.md # FHR/THC/Chase Edit local database
  397. │ ├── rapidapi/SKILL.md # Booking.com prices
  398. │ ├── serpapi/SKILL.md # Google Hotels + destination discovery
  399. │ ├── ticketsatwork/ # TaW corporate-perks portal (hotels + tickets)
  400. │ │ ├── SKILL.md
  401. │ │ ├── Dockerfile
  402. │ │ └── scripts/
  403. │ │ ├── search_hotels.py
  404. │ │ ├── search_cars.py
  405. │ │ ├── browse_tickets.py
  406. │ │ ├── taw_common.py
  407. │ │ └── entrypoint.sh
  408. │ │
  409. │ │ # ── Loyalty ──
  410. │ ├── american-airlines/ # AA AAdvantage balance
  411. │ │ ├── SKILL.md
  412. │ │ ├── Dockerfile
  413. │ │ └── scripts/
  414. │ │ └── check_balance.py
  415. │ ├── awardwallet/SKILL.md # All loyalty balances
  416. │ ├── transfer-partners/SKILL.md # Transfer path optimizer
  417. │ ├── wheretocredit/SKILL.md # Mileage earning rates
  418. │ │
  419. │ │ # ── Destinations & Transit ──
  420. │ ├── atlas-obscura/ # Hidden gems (+ Node.js scraper)
  421. │ │ ├── SKILL.md
  422. │ │ ├── ao.mjs
  423. │ │ └── package.json
  424. │ ├── scandinavia-transit/SKILL.md # Nordic trains/buses/ferries
  425. │ ├── tripadvisor/SKILL.md # Ratings, reviews, nearby restaurants
  426. │ │
  427. │ │ # ── Reference & Operations (auto-load on demand) ──
  428. │ ├── flight-search-strategy/SKILL.md # Canonical multi-source search workflow
  429. │ ├── points-valuations/SKILL.md # CPP rules, surcharge programs, transfer bonuses
  430. │ ├── partner-awards/SKILL.md # Which programs ticket which airlines
  431. │ ├── alliances/SKILL.md # Star/oneworld/SkyTeam + cross-alliance plays
  432. │ ├── award-sweet-spots/SKILL.md # Legendary redemptions catalog
  433. │ ├── cabin-codes/SKILL.md # F/J/W/Y + saver fare classes (X/I/O)
  434. │ ├── hotel-chains/SKILL.md # Brand → loyalty program mapping
  435. │ ├── fallback-and-resilience/SKILL.md # Tool failure recovery paths
  436. │ ├── booking-guidance/SKILL.md # Booking flow + phone numbers
  437. │ └── lessons-learned/SKILL.md # Hard-won knowledge from real searches
  438. ├── scripts/
  439. │ ├── setup.sh # Interactive installer (macOS/Linux/WSL/Git Bash)
  440. │ ├── setup.ps1 # Interactive installer (Windows PowerShell)
  441. │ ├── setup.cmd # Windows launcher (invokes setup.ps1)
  442. │ ├── setup-keys.sh # Standalone API key setup (no clone needed; curl|bash works)
  443. │ ├── setup-keys.ps1 # Standalone API key setup (PowerShell)
  444. │ ├── sync-agent.sh # Copies CLAUDE.md to agents/travel-hacker.md (Claude plugin)
  445. │ ├── install-hooks.sh # Installs git hooks from scripts/hooks/ (run by setup.sh)
  446. │ ├── smoke-test.sh # Static + agent integration tests
  447. │ ├── gen-skill-tables.sh # Regenerates skill tables in README.md and llms.txt
  448. │ ├── check-data-freshness.sh # Validates data/*.json TTLs
  449. │ └── hooks/
  450. │ └── pre-commit # Auto-syncs agents/travel-hacker.md when CLAUDE.md is staged
  451. └── LICENSE # MIT
  452. ```
  453. ## Contributing
  454. PRs welcome. The skill tables in this README and `llms.txt` are auto-generated from each skill's `SKILL.md` frontmatter — don't hand-edit them.
  455. See [CONTRIBUTING.md](CONTRIBUTING.md) for: the skill addition flow, frontmatter rules, smoke test details, hard-rules list, and house style.
  456. ## Credits
  457. - [Seats.aero](https://seats.aero) ([@seatsaero](https://github.com/seatsaero), [@iangcarroll](https://github.com/iangcarroll)) — The award-availability API that inspired this whole project. The only one of its kind. Hi Ian.
  458. - [ajimix/travel-hacking-toolkit](https://github.com/ajimix/travel-hacking-toolkit) — Fork that contributed the google-flights skill, ignav skill, market selection strategy, and markdown table output formatting
  459. - [美卡指南 (US Card Guide)](https://www.google.com/maps/d/viewer?mid=1HygPCP9ghtDptTNnpUpd_C507Mq_Fhec) by Scott — FHR/THC/Chase Edit hotel property data via Google My Maps KML
  460. Other open-source projects, MCP servers, and APIs the toolkit depends on are linked inline in the [skill tables](#skills-api-knowledge-for-your-ai) above.
  461. ## License
  462. MIT
scripts/setup-keys.sh · Bundled script · 263 lines · 1 finding marked
  1. #!/usr/bin/env bash
  2. # Travel Hacker key setup. Prompts you locally for API keys, validates them,
  3. # and writes exports to your shell rc with a backup. Never echoes values.
  4. #
  5. # Usage:
  6. # bash setup-keys.sh
  7. #
  8. # Or download and run in one shot:
  9. # bash <(curl -fsSL https://raw.githubusercontent.com/borski/travel-hacking-toolkit/main/scripts/setup-keys.sh)
    • Note: Runs a downloaded script through process substitution (bash <(curl …))
    • Line 9 on GitHub
  10. #
  11. # Supports zsh, bash, fish. PowerShell + cmd users: see scripts/setup-keys.ps1.
  12. set -eu
  13. # --- Detect shell and rc file ---
  14. USER_SHELL="${SHELL##*/}"
  15. case "$USER_SHELL" in
  16. zsh) RCFILE="$HOME/.zshrc" ; SYNTAX="bash" ;;
  17. bash)
  18. if [ "$(uname)" = "Darwin" ]; then
  19. RCFILE="$HOME/.bash_profile"
  20. else
  21. RCFILE="$HOME/.bashrc"
  22. fi
  23. SYNTAX="bash"
  24. ;;
  25. fish) RCFILE="$HOME/.config/fish/config.fish" ; SYNTAX="fish" ;;
  26. *)
  27. echo "Unknown shell: $USER_SHELL"
  28. echo "Supported: zsh, bash, fish."
  29. echo "For PowerShell or cmd, use scripts/setup-keys.ps1 instead."
  30. exit 1
  31. ;;
  32. esac
  33. echo "Travel Hacker key setup"
  34. echo " Shell: $USER_SHELL"
  35. echo " RC: $RCFILE"
  36. echo ""
  37. echo "I will prompt you for API keys (input is hidden, never echoed)."
  38. echo "Anything you skip stays unset. All keys are optional."
  39. echo ""
  40. # --- Helpers ---
  41. KEYS_ADDED=0
  42. KEYS_SKIPPED=0
  43. NEW_LINES=""
  44. # Make sure rc dir exists for fish
  45. mkdir -p "$(dirname "$RCFILE")"
  46. touch "$RCFILE"
  47. # Idempotency check (per-shell-syntax)
  48. already_set() {
  49. local key="$1"
  50. case "$SYNTAX" in
  51. bash) grep -qE "^[[:space:]]*export[[:space:]]+${key}=" "$RCFILE" ;;
  52. fish) grep -qE "^[[:space:]]*set[[:space:]]+(-gx|-x)[[:space:]]+${key}[[:space:]]" "$RCFILE" ;;
  53. esac
  54. }
  55. # Build the export line for the appropriate shell
  56. build_line() {
  57. local key="$1" value="$2"
  58. case "$SYNTAX" in
  59. bash) printf "export %s=%s\n" "$key" "'$value'" ;;
  60. fish) printf "set -gx %s %s\n" "$key" "'$value'" ;;
  61. esac
  62. }
  63. prompt_key() {
  64. local key="$1" desc="$2" url="$3" min_len="${4:-10}"
  65. if already_set "$key"; then
  66. echo "[exists] $key (already in $RCFILE, skipping)"
  67. KEYS_SKIPPED=$((KEYS_SKIPPED + 1))
  68. return
  69. fi
  70. if [ -n "${!key:-}" ]; then
  71. echo ""
  72. echo "$key is already exported in your current shell but not yet in $RCFILE."
  73. printf " Persist the current value to %s? [y/N] " "$RCFILE"
  74. read -r persist
  75. case "$persist" in
  76. [Yy]*)
  77. # Use the value from the current environment without echoing it
  78. local current_value="${!key}"
  79. # Apply the same validation as paste-input: single-quote and min_len
  80. case "$current_value" in
  81. *\'*)
  82. echo "[rejected] $key value contains a single quote. Skipped."
  83. KEYS_SKIPPED=$((KEYS_SKIPPED + 1))
  84. return
  85. ;;
  86. esac
  87. if [ ${#current_value} -lt $min_len ]; then
  88. echo "[rejected] $key current value is too short (${#current_value} chars, expected at least $min_len). Skipped."
  89. KEYS_SKIPPED=$((KEYS_SKIPPED + 1))
  90. return
  91. fi
  92. NEW_LINES="${NEW_LINES}$(build_line "$key" "$current_value")
  93. "
  94. KEYS_ADDED=$((KEYS_ADDED + 1))
  95. echo "[ready] $key (will write current shell value to rc)"
  96. ;;
  97. *)
  98. echo "[skipped] $key (kept ephemeral)"
  99. KEYS_SKIPPED=$((KEYS_SKIPPED + 1))
  100. ;;
  101. esac
  102. return
  103. fi
  104. echo ""
  105. echo "$key"
  106. echo " $desc"
  107. if [ -n "$url" ]; then
  108. echo " Get one at: $url"
  109. fi
  110. # -s: silent (no echo). -r: raw (no backslash escapes).
  111. printf " Paste key (Enter to skip): "
  112. read -rs value
  113. echo ""
  114. if [ -z "$value" ]; then
  115. echo "[skipped] $key"
  116. KEYS_SKIPPED=$((KEYS_SKIPPED + 1))
  117. return
  118. fi
  119. # Reject single quotes (would break our single-quoted export)
  120. case "$value" in
  121. *\'*)
  122. echo "[rejected] $key contains a single quote, which would break the export. Skipped."
  123. KEYS_SKIPPED=$((KEYS_SKIPPED + 1))
  124. return
  125. ;;
  126. esac
  127. # Length sanity check (per-key minimum, default 10)
  128. if [ ${#value} -lt $min_len ]; then
  129. echo "[rejected] $key looks too short (${#value} chars, expected at least $min_len). Skipped."
  130. KEYS_SKIPPED=$((KEYS_SKIPPED + 1))
  131. return
  132. fi
  133. NEW_LINES="${NEW_LINES}$(build_line "$key" "$value")
  134. "
  135. KEYS_ADDED=$((KEYS_ADDED + 1))
  136. echo "[ready] $key (will write to rc)"
  137. }
  138. # --- Walk through the keys ---
  139. echo "=== Tier 1 (high-value) ==="
  140. prompt_key SEATS_AERO_API_KEY \
  141. "Award flight search across 27 mileage programs. The main event." \
  142. "https://seats.aero/profile (Pro ~\$8/mo)"
  143. prompt_key DUFFEL_API_KEY_LIVE \
  144. "Real GDS cash flight prices. Free to search, pay per booking." \
  145. "https://duffel.com (use the LIVE key, not test)"
  146. prompt_key IGNAV_API_KEY \
  147. "Backup cash flight prices. Fast REST API." \
  148. "https://ignav.com (1,000 free requests/month)"
  149. prompt_key AWARDWALLET_API_KEY \
  150. "Auto-pull your loyalty balances, elite status, transfer ratios." \
  151. "https://business.awardwallet.com/profile/api (Business account required)"
  152. prompt_key AWARDWALLET_USER_ID \
  153. "Your AwardWallet user ID (paired with the API key above)." \
  154. "" \
  155. 3
  156. echo ""
  157. printf "Continue with Tier 2 (SerpAPI, RapidAPI, LiteAPI, TripAdvisor)? [y/N] "
  158. read -r more
  159. case "$more" in
  160. [Yy]*)
  161. prompt_key SERPAPI_API_KEY \
  162. "Google Flights/Hotels comparison data." \
  163. "https://serpapi.com (100 searches/mo free)"
  164. prompt_key RAPIDAPI_KEY \
  165. "Booking.com Live + Google Flights Live as fallback sources." \
  166. "https://rapidapi.com"
  167. prompt_key LITEAPI_API_KEY \
  168. "Hotel rate inventory via LiteAPI MCP." \
  169. "https://liteapi.travel"
  170. prompt_key TRIPADVISOR_API_KEY \
  171. "Hotel ratings, reviews, and rankings." \
  172. "https://tripadvisor-content-api.readme.io (5K calls/mo free)"
  173. ;;
  174. esac
  175. echo ""
  176. printf "Continue with Tier 3 (Scandinavia transit: Entur, ResRobot, Rejseplanen)? [y/N] "
  177. read -r more
  178. case "$more" in
  179. [Yy]*)
  180. prompt_key ENTUR_CLIENT_NAME \
  181. "Norway transit search. Free, no signup. Format: 'yourcompany-app'." \
  182. "" \
  183. 3
  184. prompt_key RESROBOT_API_KEY \
  185. "Sweden rail/bus search." \
  186. "https://www.trafiklab.se (30K calls/mo free)"
  187. prompt_key REJSEPLANEN_API_KEY \
  188. "Denmark rail/bus search." \
  189. "https://help.rejseplanen.dk"
  190. ;;
  191. esac
  192. # --- Write ---
  193. echo ""
  194. echo "Summary: $KEYS_ADDED to add, $KEYS_SKIPPED skipped."
  195. if [ "$KEYS_ADDED" -eq 0 ]; then
  196. echo "Nothing to write. Done."
  197. exit 0
  198. fi
  199. printf "Write %d exports to %s? [Y/n] " "$KEYS_ADDED" "$RCFILE"
  200. read -r confirm
  201. case "$confirm" in
  202. [Nn]*)
  203. echo "Aborted. No changes made."
  204. exit 0
  205. ;;
  206. esac
  207. # Backup if file has content
  208. if [ -s "$RCFILE" ]; then
  209. TIMESTAMP=$(date +%Y%m%d-%H%M%S)
  210. BACKUP="$RCFILE.bak.$TIMESTAMP"
  211. cp "$RCFILE" "$BACKUP"
  212. echo "Backup: $BACKUP"
  213. fi
  214. # Append a header + the lines
  215. {
  216. echo ""
  217. echo "# Added by travel-hacker setup-keys.sh on $(date)"
  218. printf "%s" "$NEW_LINES"
  219. } >> "$RCFILE"
  220. echo "Wrote $KEYS_ADDED exports to $RCFILE."
  221. echo ""
  222. echo "Run this to load them now (or open a new terminal):"
  223. case "$SYNTAX" in
  224. bash) echo " source \"$RCFILE\"" ;;
  225. fish) echo " source \"$RCFILE\"" ;;
  226. esac
  227. echo ""
  228. echo "Then start Claude Code and ask it to plan a trip."

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.