Introduction
Overview
Every command prints JSON on stdout and errors as JSON on stderr, with a fixed exit code.
Install
npm install -g fortripOr run any command with npx fortrip. Needs Node.js 22 or newer. Sign in once with fortrip login. See Installation.
Commands
| Command | Description |
|---|---|
fortrip search | Search hotels |
fortrip hotel | Hotel details |
fortrip rates | Live rates |
fortrip book | Create booking |
fortrip login | Sign in |
fortrip skill | Agent guide |
Raw request body
search, rates and book also take --body with a JSON object, or --body @file.json. Flags override its fields. Field names and limits are the same as the MCP tool inputs.
fortrip search --body '{"query":"Bangkok","checkIn":"YYYY-MM-DD","checkOut":"YYYY-MM-DD","starMin":5}'Environment
FORTRIP_TOKEN | Use this token instead of the saved login, e.g. in CI or a sandbox. |
FORTRIP_CURRENCY | Default --currency for search and rates. |
FORTRIP_API_URL | API base URL. Default https://fortrip.ai. |
Exit codes are listed in Errors & limits.