@dyzsasd/cli
v0.4.0
Published
Command-line tool for the Jinko developer platform. 6 commands matching MCP tools 1:1.
Readme
@gojinko/cli
Command-line tool for the Jinko developer platform. 6 commands matching MCP tools 1:1.
Install
npm install -g @gojinko/cliAuthentication
Two methods — pick one:
# OAuth (recommended) — opens browser, no API key needed
jinko auth login
# API key
jinko auth login --key jnk_YOUR_KEY
# Or via environment variable (skips login)
export JINKO_API_KEY=jnk_YOUR_KEYOAuth tokens refresh automatically. API keys don't expire but can be revoked from the dashboard.
Auth commands
jinko auth login # Interactive — choose OAuth or API key
jinko auth login --key jnk_... # Direct API key
jinko auth status # Show current method, token, expiry
jinko auth logout # Clear stored credentialsCommands
| Command | MCP Tool | Mode | Description |
|---------|----------|------|-------------|
| find-flight | find_flight | Cached | Find cheapest flights, returns offer_token |
| find-destination | find_destination | Cached | Discover destinations from origins |
| flight-calendar | flight_calendar | Cached | Cheapest prices across a date range |
| flight-search | flight_search | Live | Live search or price-check an offer |
| trip | trip | Live | Create trip, add flight, set travelers |
| book | book | Live | Checkout a trip, returns checkout_url |
Utility
| Command | Description |
|---------|-------------|
| config set | Set a config value |
| config show | Show config |
| schema [cmd] | Show request/response schemas |
Token Flow
find-flight (filters) → offer_token (cached)
flight-search (offer_token) → trip_item_token (live)
trip (trip_item_token + travelers + contact) → trip_id
book (trip_id) → checkout_urlExamples
# Find cheapest flights (cached)
jinko find-flight --from PAR --to NYC --date 2026-06-15
# Discover destinations
jinko find-destination --from PAR
# Price calendar
jinko flight-calendar --from PAR --to NYC --month 2026-06
# Live search
jinko flight-search --from PAR --to NYC --date 2026-06-15
# Price-check an offer
jinko flight-search --offer-token <offer_token>
# One-shot trip: create + add flight + set travelers
jinko trip --trip-item-token <token> \
--travelers '[{"first_name":"John","last_name":"Doe","date_of_birth":"1990-01-15","gender":"MALE","passenger_type":"ADULT"}]' \
--contact '{"email":"[email protected]","phone":"+33612345678"}'
# Checkout
jinko book --trip-id <trip_id>Output Formats
jinko find-flight --from PAR --to NYC --date 2026-06-15 # JSON (default)
jinko find-flight --from PAR --to NYC --date 2026-06-15 --format table # TableSchema Introspection
jinko schema # List all tools
jinko schema find-flight # Show request/response shapes
jinko schema book # Show booking contract