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

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

# Wego CLI

## Install

```bash
curl -fsSL https://agents.wego.com/cli/install | bash
```

That installs the `wego` binary and the agent skill together.

`wego login` opens your browser and stores the token locally. Every search and lookup command prints JSON on stdout, so each step's output threads into the next step's arguments (pipe through `jq`). Three print plain text instead: `wego version` (a bare version string), `wego feedback` (a confirmation), and `wego skill list` without `--json`.

### Environment

| Variable | Does |
|---|---|
| `WEGO_CLI_TELEMETRY` | `on`, `off` or `log` for one run. Wins over the stored setting |
| `WEGO_CREDENTIALS_PATH` | Where the login is stored. Default `~/.config/wego/credentials.json`, whatever the command is called |
| `WEGO_CLI_REDIRECT_PORT` | Fixed local port for the login callback (see Log in over SSH) |

The installer reads three of its own, all optional: `WEGO_CLI_INSTALL_SKILL=0` skips the agent-skill step, `WEGO_CLI_BIN` renames the command, and `WEGO_CLI_INSTALL_DIR` moves it off `~/.local/bin`. What separates one install from another is `XDG_CONFIG_HOME`, not the command name — see below.

### More than one channel at once

Every per-install file lives at `$XDG_CONFIG_HOME/wego/` — which channel this install follows, your login, your settings. So an extra install needs its own `XDG_CONFIG_HOME` and nothing else, and a small launcher to supply it every time you run that install:

```bash
root="$HOME/.wego/edge"
XDG_CONFIG_HOME="$root/config" WEGO_CLI_INSTALL_DIR="$root/bin" WEGO_CLI_INSTALL_SKILL=0 \
  sh -c "curl -fsSL 'https://agents.wego.com/cli/install?ring=edge' | sh"

printf '#!/bin/sh\nexec env XDG_CONFIG_HOME=%s WEGO_CLI_NO_UPDATE_NOTICE=1 "%s" "$@"\n' "$root/config" "$root/bin/wego" \
  > "$HOME/.local/bin/wego-edge" && chmod +x "$HOME/.local/bin/wego-edge"
```

Now `wego-edge` updates from `edge` and your plain `wego` stays where it was, each with its own login. The launcher also silences the update notice, because that notice is built from the binary's name on disk — which is `wego` here — so it would spot a newer `edge` build and then tell you to run `wego update -y`, updating your *normal* install and leaving the edge one stale while looking like it worked. Ask on demand with `wego-edge update --check`, which is read-only and reports the right channel. Leave `WEGO_CLI_BIN` at its default while you do this: it renames the file the installer writes the channel record beside, and the binary only ever reads that record from `wego`, so renaming it leaves the install with no record and `wego update` refuses rather than guessing.

## Commands

| Command | Does |
|---|---|
| `wego login [--browser \| --no-browser]` / `wego logout` | Browser login (PKCE); remove stored credentials |
| `wego whoami` | Print the authenticated user |
| `wego places "<query>"` | Resolve free text to a city, airport, state, district or hotel. `--types` narrows it; the hotel form is where a `hotelId` comes from |
| `wego info holidays\|visa-free\|schedules\|airports-near` | Stateless reference lookups, no search needed |
| `wego flights search <from> <to> <date>` | Create a flight search and block until it settles |
| `wego flights results <searchId> [--wait]` | Read a ranked snapshot; `--wait` settles first |
| `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> --trip <id> --fare-option <id> --from DXB --to LHR --date <date>` | Print the wego.com booking URL. All five flags are required; repeat `--fare-option` once per leg when a fare covers one leg |
| `wego flights experience <tripId>` | Per-leg comfort signals: overnight, long stopover, early departure, late arrival |
| `wego flights share <from> <to> <date>` | A wego.com search link to send to someone. Does not expire |
| `wego hotels search <cityCode\|hotelId\|lat,lng> <checkIn> <checkOut>` | Create and settle a hotel search. The `hotelId` form is the one `rooms` needs |
| `wego hotels results <searchId> [--wait]` | Read a page; `--wait` settles first |
| `wego hotels details <hotelId>` | Static hotel detail |
| `wego hotels reviews <hotelId>` | Guest reviews, newest first, pros and cons already split |
| `wego hotels rooms <hotelId> <checkIn> <checkOut>` | Rooms and rates, cheapest first. `--search <id>` re-reads a search `rooms` minted |
| `wego hotels booking-link <hotelId> --rate <rateId>` | Print the wego.com checkout URL |
| `wego hotels share <cityCode> <checkIn> <checkOut>` | A wego.com hotel search link. Does not expire |
| `wego config list` / `wego config set <key> <value>` / `wego config unset <key>` | Show or set the defaults every other command inherits. Keys: `currency`, `site`, `locale` |
| `wego skill list\|install\|path\|uninstall` | Manage the agent skill in your coding agent; `path` prints where it landed. `--scope user\|project` and `--agent <name>` pick where it goes |
| `wego feedback [--rating N] [--category VALUE] [--message "..."]` | Send feedback about the CLI to the Wego team |
| `wego telemetry status\|enable\|disable` | Report or change whether the CLI sends usage events |
| `wego update` / `wego uninstall` | Update in place; remove the binary, the login and the user-scope agent skill |
| `wego version` | Print the version |

`wego config` sets the currency, market and language a command uses when it names
none. A flag on the command always wins, then these settings, then your account
market, then the default (USD, `en`, US).

`wego uninstall` leaves a project-scope or `--dir` skill install alone. Remove one
of those with `wego skill uninstall --scope project`, or `--dir <path>`.

A settled search is stamped `settled`: `converged` when the snapshot stopped
changing, `budget_exhausted` when the re-read budget ran out first. A bare
`results` read with no `--wait` is a single snapshot, stamped `unsettled`.

`--fare-option` is required on `flights booking-link`: take it from
`flights fares <fareId>`. The endpoint rejects a request without one
(`400 validation_failed`), so there is no link to dead-end with.

## Log in over SSH

Login binds a loopback listener on the machine that runs the CLI. On a remote
machine your browser is somewhere else, so the redirect cannot come back on its
own. The CLI detects the SSH session, opens no browser, and waits for you:

1. Open the printed URL in the browser on your own computer.
2. Approve the login. The browser then goes to a `http://127.0.0.1:<port>/callback?code=…`
   address that only exists on the remote machine, so the page fails to load.
   That is expected – the code you need is in the address bar.
3. Copy that whole URL, paste it into the waiting terminal, and press Enter.

Force the same flow anywhere with `wego login --no-browser` –
useful in a container or any shell where the SSH check cannot see that you have no
browser. The opposite override is `wego login --browser`: open a
browser on the remote machine anyway, for an SSH session with X11 forwarding.

If you prefer the browser to reach the remote listener, pin the port and forward
it instead – then the standard flow completes with no paste:

```bash
ssh -L 8765:127.0.0.1:8765 you@remote
WEGO_CLI_REDIRECT_PORT=8765 wego login
```

`wego --help` lists the commands, `wego flights --help` lists the flights commands, and `wego flights results --help` lists that command's flags. The two chains:

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

`fares` is not optional in the flights chain: `booking-link` needs the
`fareOptionId` it returns.

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