@gojinko/cli
v1.1.1
Published
Command-line tool for the Jinko developer platform. Search flights, build trips, and hand users off to a Jinko-hosted checkout page.
Readme
@gojinko/cli
Command-line tool for the Jinko developer platform. Search flights, build trips, and hand users off to a Jinko-hosted checkout page.
Install
npm install -g @gojinko/cliAuthentication
# API key (recommended for agents, CI/CD)
export JINKO_API_KEY=jnk_YOUR_KEY
# OAuth (interactive humans — opens a browser)
jinko auth loginCreate API keys at https://builders.gojinko.com. OAuth tokens auto-refresh.
Auth commands
jinko auth login # Interactive login
jinko auth login --key jnk_… # Store an API key
jinko auth status # Show current method, expiry
jinko auth logout # Clear stored credentialsCommands
Exploration (cached)
| Command | Description |
|---|---|
| find-destination | Discover destinations from an origin |
| flight-calendar | Cheapest prices across a date range for a known route |
Live pricing & trip building
| Command | Description |
|---|---|
| flight-search | Direct search by route + dates OR price-check an offer_token. Returns bookable trip_item_token. |
| trip | Create/update a trip, add items, set travelers |
Legacy
| Command | Description |
|---|---|
| find-flight | Cached route + dates search. Kept for backwards compat; prefer flight-search for new integrations. |
Checkout
| Command | Description |
|---|---|
| checkout | Schedule checkout, returns checkout_url + items + ancillaries + total |
| select-ancillaries | Optional: preselect bags / seats / meals before handoff |
| trip-status | Full lifecycle state: cart, quote, fulfillment, bookings |
Post-booking
| Command | Description |
|---|---|
| refund check | Check refund eligibility for a booking |
| refund commit | Initiate a refund for a booking |
Utility
| Command | Description |
|---|---|
| config set / config show | Manage local config |
| schema [cmd] | Show request/response schemas |
Canonical Flow
flight-search → trip → checkout → user pays on checkout_url → trip-statusQuote is automatic — checkout handles it internally. Payment happens on the Jinko web page, not in the CLI.
Examples
# Live flight search by route + dates (returns trip_item_token directly)
jinko flight-search --from PAR --to NYC --date 2026-06-15
# Or price-check an offer_token from flight-calendar
jinko flight-search --offer-token <offer_token>
# Create trip with travelers + contact
jinko trip \
--trip-item-token <token> \
--travelers '[{"first_name":"Jane","last_name":"Doe","date_of_birth":"1990-01-15","gender":"FEMALE","passenger_type":"ADULT"}]' \
--contact '{"email":"[email protected]","phone":"+33612345678"}'
# Schedule checkout → returns checkout_url
jinko checkout --trip-id <trip_id>
# Optional: add baggage/seats/meals before handoff
jinko select-ancillaries \
--trip-id <trip_id> \
--item-id <item_id> \
--select <offer_id_1>,<offer_id_2> \
--pax <passenger_ref> \
--quantity 2
# Poll status until fulfilled
jinko trip-status --trip-id <trip_id>
# Refunds
jinko refund check --booking-ref <ref> --pnr <pnr>
jinko refund commit --booking-ref <ref> --pnr <pnr> --reason "schedule change"Output Formats
jinko flight-search --from PAR --to NYC --date 2026-06-15
jinko flight-search --from PAR --to NYC --date 2026-06-15 --format tableSchema Introspection
jinko schema # List all tools
jinko schema flight-search # Show a tool's request/response schema