✈️

flights

Open Source TravelProductivity

Flight search plugin for OpenCode - search for flights, compare prices, and find the best travel options

flights travel booking airports flight-search

Quick Install

npm install @openpets/flights
pnpm add @openpets/flights

Available Tools (4)

These tools are available when you install the flights plugin in your AI assistant.

search-flights

Search for one-way or round-trip flights between airports. Returns flight options with prices, times, and airlines. IMPORTANT: Only searches FUTURE dates - past dates will fail immediately. Always verify the current date before searching.

search-airports

Find airport codes by city name, airport name, or partial code. Returns matching airports with their IATA codes.

calculate-travel-dates

Calculate suggested travel dates based on days from today and trip length. Useful for flexible travel planning.

get-provider-status

Check which flight search provider is active and its configuration status

Example Queries

search flights from LAX to JFK on 2025-01-15
find cheapest flights from San Francisco to New York next week
search round trip flights from London to Paris departing March 1 returning March 8
find airport code for Tokyo
search business class flights from NYC to London

Usage Scenarios

one way flights

  1. 1 search flights from LAX to JFK on 2025-01-15
  2. 2 search flights from SFO to NYC on 2025-02-01 for 2 adults
  3. 3 find economy flights from BOS to MIA on 2025-03-10

round trip flights

  1. 1 search round trip from LAX to NYC departing 2025-01-15 returning 2025-01-22
  2. 2 find round trip business class from SFO to LHR departing March 1 returning March 15

airport search

  1. 1 find airport code for Los Angeles
  2. 2 search airports in Tokyo
  3. 3 find airport code for New York

flexible search

  1. 1 find cheapest flights from LAX to NYC within next 2 weeks
  2. 2 compare flight prices from SFO to multiple European cities

Optional Configuration

Variable Description
SERPAPI_API_KEY SerpAPI key for Google Flights search (recommended provider)
RAPIDAPI_KEY RapidAPI key for alternative flight search providers
AMADEUS_API_KEY Amadeus API key for professional flight search
AMADEUS_API_SECRET Amadeus API secret for authentication
FLIGHT_PROVIDER Preferred flight search provider: serpapi, rapidapi, amadeus (default: serpapi)
MAX_RESULTS Maximum number of flight results to return (default: 10)
DEFAULT_CABIN_CLASS Default cabin class: economy, premium_economy, business, first (default: economy)
LOG_LEVEL Logging level: debug, info, warn, error (default: info)

Use flights with Your AI Assistant

This open source plugin works with OpenCode-compatible AI assistants including ChatGPT, Claude, Perplexity, and other LLM-powered coding tools. Install the plugin and start using natural language to interact with flights.

Works with ChatGPT Works with Claude Works with Perplexity MCP Compatible