-
Notifications
You must be signed in to change notification settings - Fork 8
CLI
@otaip/cli — command-line interface for searching, booking, and inspecting the OTAIP platform.
# One-off via npx
npx @otaip/cli <command>
# Global install
pnpm add -g @otaip/cli
otaip <command>
# From a checkout
pnpm --filter @otaip/cli build
node packages/cli/dist/index.js <command>The CLI exposes six commands: search, price, book, adapters, agents, validate.
Search for flight availability.
otaip search --from LHR --to CDG --date 2026-06-15 --passengers 2
otaip search --from JFK --to LAX --date 2026-07-01 --adapter sabre --json| Flag | Required | Default | Description |
|---|---|---|---|
--from <iata> |
✓ | — | Origin IATA |
--to <iata> |
✓ | — | Destination IATA |
--date <iso> |
✓ | — | Departure date YYYY-MM-DD
|
--adapter <id> |
amadeus |
Adapter to query | |
--passengers <n> |
1 |
Passenger count |
Price a specific offer ID from a prior search.
otaip price --offer-id OFR0000000042 --adapter duffel| Flag | Required | Default |
|---|---|---|
--offer-id <id> |
✓ | — |
--adapter <id> |
amadeus |
Book an offer — create a PNR or Order depending on the adapter.
otaip book \
--offer-id OFR0000000042 \
--passengers "Doe/Jane/ADT,Doe/John/ADT" \
--adapter sabre| Flag | Required | Default |
|---|---|---|
--offer-id <id> |
✓ | — |
--passengers <names> |
✓ | — |
--adapter <id> |
amadeus |
Passenger format: Last/First/Type, comma-separated. Types: ADT, CHD, INF.
List available distribution adapters and their status.
otaip adapters
otaip adapters --jsonOutput columns: ID, Name, Type, Status. Unconfigured adapters report not configured.
List all 75 agents with their contract status. The registry is auto-discovered from source metadata at module load — packages/cli/src/agent-discovery.ts walks every packages/agents/*/src/*/index.ts, packages/agents-platform/src/*/index.ts, packages/agents-tmc/src/*/index.ts, and packages/core/src/agents/shopping/*/index.ts, greps readonly id, readonly name, readonly version, and derives stage from the path.
otaip agents # all 75 agents
otaip agents --stage search # filter to search stage
otaip agents --json # machine-readable
otaip agents --verbose # adds source_path columnEach row: ID, Name, Stage, Contract Status (active when version !== '0.0.0', else stub). --verbose adds the source file path for traceability.
Dry-run pipeline validation for a specific agent. Parses input through the agent's Zod schema and semantic validator without executing it.
otaip validate --agent 1.1 --input '{
"origin":"LHR","destination":"CDG","departure_date":"2026-06-15",
"passengers":{"adults":1}
}'| Flag | Required |
|---|---|
--agent <id> |
✓ |
--input <json> |
✓ |
Reports: JSON parse result → schema parse result → semantic validator result. With --verbose, each gate is shown individually.
Every command accepts:
| Flag | Effect |
|---|---|
--json |
Machine-readable JSON output |
--verbose |
Show confidence scores and per-gate results |
--json always wins over human-readable output, including for errors. Non-zero exit codes indicate validation failure.
otaip agents --stage pricing --json | jq '.[] | select(.contract_status=="active")'otaip validate --agent 3.2 --input "$(cat pnr-builder-input.json)" --verboseotaip adapters --json | jq '.adapters[] | select(.status=="configured") | .id'-
Pipeline Contract — what
otaip validateis testing -
Agents — the IDs
otaip agentslists -
Adapters — the IDs
otaip adapterslists