centurion-tours-cli
v1.0.0
Published
CLI for Centurion Tours transportation booking API — designed for AI agents and automation
Maintainers
Readme
Centurion Tours CLI
A command-line interface for the Centurion Tours transportation booking API. Designed for AI agents and automation — all output is JSON, no interactive prompts.
Install
npm install -g centurion-tours-cliRequires Node.js 18 or later.
Setup
# Configure your API keys (stored in ~/.centurion/config.json)
centurion setup --api-key YOUR_CENTURION_KEY --google-maps-key YOUR_GOOGLE_KEY
# Verify
centurion setup --showGet your Centurion Tours API key from the corporate portal. The Google Maps API key is optional but enables address geocoding (requires the Geocoding API enabled).
Environment variables (CENTURION_API_KEY, GOOGLE_MAPS_API_KEY) override stored config when set.
Commands
| Command | Description |
|---|---|
| setup | Configure API keys |
| branch-data | Get vehicles, airports, packages for a location |
| quote | Get a price quote |
| create-booking | Create a booking or quote booking |
| accept-quote | Accept or reject a quote booking |
| edit-booking | Edit an existing booking |
| cancel-booking | Cancel a booking |
| booking-details | Get details of a single booking |
| list-bookings | List bookings with filters |
| linked-accounts | List linked corporate accounts |
| geocode | Geocode an address to coordinates |
Run centurion <command> --help for full options and examples.
Booking types
| Type | Name | Required fields |
|---|---|---|
| 1 | To Airport | --airport-id, --pickup-address, --flight-number*, --name-board* |
| 2 | From Airport | --airport-id, --dropoff-address, --flight-number*, --name-board* |
| 3 | Point-to-Point | --pickup-address, --dropoff-address |
| 5 | Driver for Hire | --pickup-address, --package |
* Required for create-booking only, optional for quote.
Examples
# Get available vehicles for Cape Town
centurion branch-data --lat -33.92 --lng 18.42
# Quote an airport transfer
centurion quote --type 1 --date tomorrow --time 2pm \
--vehicle-name "Toyota Corolla" --passengers 2 --airport-id 1 \
--pickup-address "14 Highland Close, Devils Peak Estate"
# Create a real booking
centurion create-booking --type 1 --date tomorrow --time 2pm \
--vehicle-name "Toyota Corolla" --passengers 2 --airport-id 1 \
--flight-number FA100 --name-board Yes --bags 2 \
--title Mr --name "John Smith" --email [email protected] --mobile 0812345678 \
--pickup-address "14 Highland Close, Devils Peak Estate"
# Edit just the pickup time
centurion edit-booking --booking-id 349585 --time 5pm
# List upcoming bookings
centurion list-bookings --status upcoming --limit 10Features
- Natural language dates/times:
tomorrow,next wednesday,april 15,7pm,noon - Address geocoding: Pass
--pickup-addresswithout lat/lng — auto-geocoded via Google Maps - Vehicle name lookup: Use
--vehicle-name "corolla"instead of memorizing vehicle IDs - Smart edit:
edit-bookingfetches current values and merges your changes — only pass what you want to change - Partial match verification: Ambiguous addresses return candidates with exit code 2 for the agent to confirm
Output
- Success: JSON to stdout, exit code 0
- Verification needed: JSON to stdout, exit code 2 (address needs confirmation)
- Error: JSON to stderr, exit code 1
Global options
| Flag | Description |
|---|---|
| --verbose | Log API requests to stderr |
| --company <ct\|ch> | Override company ID per-command |
License
MIT
