---
title: "Wego CLI"
description: "The same funnels as one command per step, built for people and agents."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.wego.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Wego CLI

import { Code } from "astro:components";
import { siteEnv } from "@/site-env";

The same funnels as [direct HTTP](/ways-to-use), one command per step, built for both people and agents.

## Install

This deploy installs the <code>{siteEnv.cliFlavor}</code> binary (`wego` in production, `wegostaging` on staging). The reference below writes it as `wego`.

<code>{siteEnv.cliFlavor} login</code> opens your browser and stores the token locally. Every command prints JSON on stdout, so each step's output threads into the next step's arguments (pipe through `jq`).

## Commands

| Command | Does |
|---|---|
| `wego login` / `wego logout` | Browser login (PKCE); remove stored credentials |
| `wego whoami` | Print the authenticated user |
| `wego places "<query>"` | Resolve free text to airport and city codes |
| `wego flights search <from> <to> <date>` | Create a flight search, print the first snapshot |
| `wego flights results <searchId>` | Read a fresher ranked snapshot |
| `wego flights trip <tripId> --search <searchId>` | Full itinerary and fares for one trip |
| `wego flights fares <fareId>` | Fare options (Saver, Flex and similar) for a Wego fare |
| `wego flights booking-link <fareId> ...` | Print the wego.com booking URL |
| `wego hotels search <city> <checkIn> <checkOut>` | Create and settle a hotel search |
| `wego hotels results <searchId>` | Read a fresher page |
| `wego hotels details <hotelId>` | Static hotel detail |
| `wego hotels rooms <hotelId> --search <searchId>` | Rooms and rates, cheapest first |
| `wego hotels booking-link <hotelId> --rate <rateId>` | Print the wego.com checkout URL |
| `wego skill install` | Install the agent skill into your coding agent |

Run <code>{siteEnv.cliFlavor} help</code> for every flag. The two chains:

```text
flights: search -> results -> trip -> fares -> booking-link
hotels:  search -> results -> rooms -> booking-link
```

Source: https://docs.wego.com/cli/index.mdx
