@gojinko/cli 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +93 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # @gojinko/cli
2
+
3
+ Command-line tool for the Jinko developer platform. Search flights, manage trips, and book travel from the terminal.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @gojinko/cli
9
+ ```
10
+
11
+ ## Authentication
12
+
13
+ ```bash
14
+ # API key
15
+ jinko auth login --key jnk_YOUR_KEY
16
+
17
+ # Or environment variable
18
+ export JINKO_API_KEY=jnk_YOUR_KEY
19
+
20
+ # OAuth token also supported
21
+ export JINKO_TOKEN=eyJ...your.jwt.token
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ ```bash
27
+ # Search flights
28
+ jinko flights search --from PAR --to NYC --date 2026-04-15
29
+
30
+ # Explore destinations
31
+ jinko flights destinations --from PAR
32
+
33
+ # Price-check a specific offer (live pricing)
34
+ jinko flights search --offer-token <offer_token>
35
+
36
+ # One-shot booking → returns checkout URL
37
+ jinko trip checkout \
38
+ --trip-item-token <token> \
39
+ --travelers '[{"first_name":"John","last_name":"Doe","date_of_birth":"1990-01-15","gender":"MALE","passenger_type":"ADULT"}]' \
40
+ --contact '{"email":"john@example.com","phone":"+33612345678"}'
41
+ ```
42
+
43
+ ## Commands
44
+
45
+ ### Flights
46
+ | Command | Description |
47
+ |---------|-------------|
48
+ | `flights search` | Search flights or price-check an offer |
49
+ | `flights destinations` | Discover destinations from origin airports |
50
+ | `flights calendar` | Browse prices across a date range |
51
+
52
+ ### Trip
53
+ | Command | Description |
54
+ |---------|-------------|
55
+ | `trip create` | Create a new trip |
56
+ | `trip show` | Show trip details |
57
+ | `trip add-flight` | Add a flight to a trip |
58
+ | `trip travelers` | Set travelers on a trip |
59
+ | `trip checkout` | Checkout → returns payment URL |
60
+
61
+ ### Utility
62
+ | Command | Description |
63
+ |---------|-------------|
64
+ | `auth login` | Configure API key or OAuth token |
65
+ | `auth status` | Show current auth status |
66
+ | `config set` | Set a config value |
67
+ | `config show` | Show current config |
68
+ | `schema [cmd]` | Show request/response schemas |
69
+
70
+ ## Output Formats
71
+
72
+ ```bash
73
+ # JSON (default, machine-readable)
74
+ jinko flights search --from PAR --to NYC --date 2026-04-15
75
+
76
+ # Table (human-readable)
77
+ jinko flights search --from PAR --to NYC --date 2026-04-15 --format table
78
+ ```
79
+
80
+ ## Token Flow
81
+
82
+ ```
83
+ flights search (filters) → offer_token
84
+ flights search (offer_token) → trip_item_token
85
+ trip checkout (trip_item_token + travelers + contact) → checkout_url
86
+ ```
87
+
88
+ ## Schema Introspection
89
+
90
+ ```bash
91
+ jinko schema # List all commands
92
+ jinko schema flights.search # Show request/response shapes
93
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gojinko/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "jinko": "./dist/bin/jinko.js"
@@ -12,7 +12,7 @@
12
12
  "chalk": "^5.4.1",
13
13
  "zod": "^3.23.8",
14
14
  "yaml": "^2.7.0",
15
- "@gojinko/api-client": "0.1.0"
15
+ "@gojinko/api-client": "0.1.2"
16
16
  },
17
17
  "publishConfig": {
18
18
  "access": "public"