letsfg 2026.5.58 → 2026.5.60

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.
package/README.md CHANGED
@@ -1,104 +1,104 @@
1
- # LetsFG — Your AI agent just learned to book flights. (Node.js)
2
-
3
- **Server-side search engine. Real prices. One function call.** Search hundreds of airlines at raw airline prices — **$20–$50 cheaper** than Booking.com, Kayak, and other OTAs. Zero dependencies. Built for AI agents.
4
-
5
- [![GitHub stars](https://img.shields.io/github/stars/LetsFG/LetsFG?style=social)](https://github.com/LetsFG/LetsFG)
6
- [![npm](https://img.shields.io/npm/v/letsfg)](https://www.npmjs.com/package/letsfg)
7
-
8
- ## Two ways to use LetsFG
9
-
10
- | | **CLI / SDK** (this package) | **Developer API** |
11
- |---|---|---|
12
- | **Search cost** | Free (Twitter/X Bearer token via `letsfg auth`) | Prepaid credits |
13
- | **Booking URL** | 1% concierge fee (min $3) via letsfg.co | Direct airline URL, no fee |
14
- | **Speed** | 60–90 s | 2–5 s (discover) · 60–90 s (full) |
15
- | **Setup** | `npm install letsfg` then `letsfg auth` | [letsfg.co/developers](https://letsfg.co/developers) |
16
-
17
- > **Want direct airline URLs without any per-booking fee?** Use the [Developer API](https://letsfg.co/developers) — prepaid credits, results in seconds, no checkout step.
18
-
19
- ## Install
20
-
21
- ```bash
22
- npm install letsfg
23
- ```
24
-
25
- ## Quick Start (SDK)
26
-
27
- ```typescript
28
- import { LetsFG, cheapestOffer, offerSummary } from 'letsfg';
29
-
30
- // Register (one-time)
31
- const creds = await LetsFG.register('my-agent', 'agent@example.com');
32
- console.log(creds.api_key); // Save this
33
-
34
- // Use
35
- const bt = new LetsFG({ apiKey: 'trav_...' });
36
-
37
- // Search — FREE
38
- const flights = await bt.search('GDN', 'BER', '2026-03-03');
39
- const best = cheapestOffer(flights);
40
- console.log(offerSummary(best));
41
-
42
- // Unlock
43
- const unlock = await bt.unlock(best.id);
44
-
45
- // Book
46
- const booking = await bt.book(
47
- best.id,
48
- [{
49
- id: flights.passenger_ids[0],
50
- given_name: 'John',
51
- family_name: 'Doe',
52
- born_on: '1990-01-15',
53
- gender: 'm',
54
- title: 'mr',
55
- email: 'john@example.com',
56
- }],
57
- 'john@example.com'
58
- );
59
- console.log(`PNR: ${booking.booking_reference}`);
60
- ```
61
-
62
- ## Quick Start (CLI)
63
-
64
- ```bash
65
- export LETSFG_BEARER_TOKEN=<your-bearer-token>
66
-
67
- letsfg search GDN BER 2026-03-03 --sort price
68
- letsfg search LON BCN 2026-04-01 --json # Machine-readable
69
- letsfg unlock off_xxx
70
- letsfg book off_xxx -p '{"id":"pas_xxx","given_name":"John",...}' -e john@example.com
71
- ```
72
-
73
- ## API
74
-
75
- ### `new LetsFG({ apiKey, baseUrl?, timeout? })`
76
-
77
- ### `bt.search(origin, destination, dateFrom, options?)`
78
- ### `bt.resolveLocation(query)`
79
- ### `bt.unlock(offerId)`
80
- ### `bt.book(offerId, passengers, contactEmail, contactPhone?)`
81
- ### `bt.setupPayment(token?)`
82
- ### `bt.me()`
83
- ### `LetsFG.register(agentName, email, baseUrl?, ownerName?, description?)`
84
-
85
- ### Helpers
86
- - `offerSummary(offer)` — One-line string summary
87
- - `cheapestOffer(result)` — Get cheapest offer from search
88
-
89
- ## Zero Dependencies
90
-
91
- Uses native `fetch` (Node 18+). No `axios`, no `node-fetch`, nothing. Safe for sandboxed environments.
92
-
93
- ## Also Available As
94
-
95
- - **MCP Server**: `npx letsfg-mcp` — [npm](https://www.npmjs.com/package/letsfg-mcp)
96
- - **Python SDK + CLI**: `pip install letsfg` — [PyPI](https://pypi.org/project/letsfg/)
97
- - **Try without installing**: [letsfg.co](https://letsfg.co) — search instantly in your browser
98
- - **GitHub**: [LetsFG/LetsFG](https://github.com/LetsFG/LetsFG)
99
-
100
- > ⭐ **[Star the repo](https://github.com/LetsFG/LetsFG)** — we appreciate the support.
101
-
102
- ## License
103
-
104
- MIT
1
+ # LetsFG — Your AI agent just learned to book flights. (Node.js)
2
+
3
+ **Server-side search engine. Real prices. One function call.** Search hundreds of airlines at raw airline prices — **$20–$50 cheaper** than Booking.com, Kayak, and other OTAs. Zero dependencies. Built for AI agents.
4
+
5
+ [![GitHub stars](https://img.shields.io/github/stars/LetsFG/LetsFG?style=social)](https://github.com/LetsFG/LetsFG)
6
+ [![npm](https://img.shields.io/npm/v/letsfg)](https://www.npmjs.com/package/letsfg)
7
+
8
+ ## Two ways to use LetsFG
9
+
10
+ | | **CLI / SDK** (this package) | **Developer API** |
11
+ |---|---|---|
12
+ | **Search cost** | Free (Twitter/X Bearer token via `letsfg auth`) | Prepaid credits |
13
+ | **Booking** | `POST /api/agent-book` no LetsFG fee | Direct airline URL, no fee |
14
+ | **Speed** | 60–90 s | 2–5 s (discover) · 60–90 s (full) |
15
+ | **Setup** | `npm install letsfg` then `letsfg auth` | [letsfg.co/developers](https://letsfg.co/developers) |
16
+
17
+ > **Want direct airline URLs without any per-booking fee?** Use the [Developer API](https://letsfg.co/developers) — prepaid credits, results in seconds, no checkout step.
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ npm install letsfg
23
+ ```
24
+
25
+ ## Quick Start (SDK)
26
+
27
+ ```typescript
28
+ import { LetsFG, cheapestOffer, offerSummary } from 'letsfg';
29
+
30
+ // Register (one-time)
31
+ const creds = await LetsFG.register('my-agent', 'agent@example.com');
32
+ console.log(creds.api_key); // Save this
33
+
34
+ // Use
35
+ const bt = new LetsFG({ apiKey: 'trav_...' });
36
+
37
+ // Search — FREE
38
+ const flights = await bt.search('GDN', 'BER', '2026-03-03');
39
+ const best = cheapestOffer(flights);
40
+ console.log(offerSummary(best));
41
+
42
+ // Unlock
43
+ const unlock = await bt.unlock(best.id);
44
+
45
+ // Book
46
+ const booking = await bt.book(
47
+ best.id,
48
+ [{
49
+ id: flights.passenger_ids[0],
50
+ given_name: 'John',
51
+ family_name: 'Doe',
52
+ born_on: '1990-01-15',
53
+ gender: 'm',
54
+ title: 'mr',
55
+ email: 'john@example.com',
56
+ }],
57
+ 'john@example.com'
58
+ );
59
+ console.log(`PNR: ${booking.booking_reference}`);
60
+ ```
61
+
62
+ ## Quick Start (CLI)
63
+
64
+ ```bash
65
+ export LETSFG_BEARER_TOKEN=<your-bearer-token>
66
+
67
+ letsfg search GDN BER 2026-03-03 --sort price
68
+ letsfg search LON BCN 2026-04-01 --json # Machine-readable
69
+ letsfg unlock off_xxx
70
+ letsfg book off_xxx -p '{"id":"pas_xxx","given_name":"John",...}' -e john@example.com
71
+ ```
72
+
73
+ ## API
74
+
75
+ ### `new LetsFG({ apiKey, baseUrl?, timeout? })`
76
+
77
+ ### `bt.search(origin, destination, dateFrom, options?)`
78
+ ### `bt.resolveLocation(query)`
79
+ ### `bt.unlock(offerId)`
80
+ ### `bt.book(offerId, passengers, contactEmail, contactPhone?)`
81
+ ### `bt.setupPayment(token?)`
82
+ ### `bt.me()`
83
+ ### `LetsFG.register(agentName, email, baseUrl?, ownerName?, description?)`
84
+
85
+ ### Helpers
86
+ - `offerSummary(offer)` — One-line string summary
87
+ - `cheapestOffer(result)` — Get cheapest offer from search
88
+
89
+ ## Zero Dependencies
90
+
91
+ Uses native `fetch` (Node 18+). No `axios`, no `node-fetch`, nothing. Safe for sandboxed environments.
92
+
93
+ ## Also Available As
94
+
95
+ - **MCP Server**: `npx letsfg-mcp` — [npm](https://www.npmjs.com/package/letsfg-mcp)
96
+ - **Python SDK + CLI**: `pip install letsfg` — [PyPI](https://pypi.org/project/letsfg/)
97
+ - **Try without installing**: [letsfg.co](https://letsfg.co) — search instantly in your browser
98
+ - **GitHub**: [LetsFG/LetsFG](https://github.com/LetsFG/LetsFG)
99
+
100
+ > ⭐ **[Star the repo](https://github.com/LetsFG/LetsFG)** — we appreciate the support.
101
+
102
+ ## License
103
+
104
+ MIT
package/dist/cli.js CHANGED
@@ -785,7 +785,7 @@ Developer API only (a SEPARATE paid product \u2014 most agents should not use th
785
785
  they create a billing account. Use auth above instead):
786
786
  register --name ... --email ... Create a paid Developer API account
787
787
  setup-payment Attach a card to that paid account
788
- unlock <offer_id> Unlock offer \u2014 1% of ticket (min $3)
788
+ unlock <offer_id> [Developer API only] Unlock offer \u2014 1% of ticket (min $3)
789
789
 
790
790
  Options:
791
791
  --json, -j Output raw JSON
package/dist/cli.mjs CHANGED
@@ -288,7 +288,7 @@ Developer API only (a SEPARATE paid product \u2014 most agents should not use th
288
288
  they create a billing account. Use auth above instead):
289
289
  register --name ... --email ... Create a paid Developer API account
290
290
  setup-payment Attach a card to that paid account
291
- unlock <offer_id> Unlock offer \u2014 1% of ticket (min $3)
291
+ unlock <offer_id> [Developer API only] Unlock offer \u2014 1% of ticket (min $3)
292
292
 
293
293
  Options:
294
294
  --json, -j Output raw JSON
package/package.json CHANGED
@@ -1,52 +1,52 @@
1
- {
2
- "name": "letsfg",
3
- "version": "2026.5.58",
4
- "description": "Flight search & booking for AI agents. Server-side engine covers hundreds of airlines. Free search via Bearer token or prepaid Developer API. Includes open-source ranking engine.",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "bin": {
9
- "letsfg": "dist/cli.js"
10
- },
11
- "files": [
12
- "dist/",
13
- "README.md",
14
- "LICENSE"
15
- ],
16
- "scripts": {
17
- "build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --clean",
18
- "test": "tsx --test src/index.test.ts",
19
- "prepublishOnly": "npm run build"
20
- },
21
- "keywords": [
22
- "flights",
23
- "travel",
24
- "booking",
25
- "agent",
26
- "ai",
27
- "cli",
28
- "autonomous",
29
- "mcp",
30
- "openai",
31
- "airline",
32
- "ndc",
33
- "search",
34
- "ndc"
35
- ],
36
- "author": "LetsFG",
37
- "license": "MIT",
38
- "repository": {
39
- "type": "git",
40
- "url": "https://github.com/LetsFG/LetsFG.git"
41
- },
42
- "homepage": "https://letsfg.co",
43
- "devDependencies": {
44
- "@types/node": "^25.3.3",
45
- "tsup": "^8.0.0",
46
- "tsx": "^4.19.0",
47
- "typescript": "^5.3.0"
48
- },
49
- "engines": {
50
- "node": ">=18.0.0"
51
- }
52
- }
1
+ {
2
+ "name": "letsfg",
3
+ "version": "2026.5.60",
4
+ "description": "Flight search & booking for AI agents. Server-side engine covers hundreds of airlines. Free search via Bearer token or prepaid Developer API. Includes open-source ranking engine.",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "letsfg": "dist/cli.js"
10
+ },
11
+ "files": [
12
+ "dist/",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --clean",
18
+ "test": "tsx --test src/index.test.ts",
19
+ "prepublishOnly": "npm run build"
20
+ },
21
+ "keywords": [
22
+ "flights",
23
+ "travel",
24
+ "booking",
25
+ "agent",
26
+ "ai",
27
+ "cli",
28
+ "autonomous",
29
+ "mcp",
30
+ "openai",
31
+ "airline",
32
+ "ndc",
33
+ "search",
34
+ "ndc"
35
+ ],
36
+ "author": "LetsFG",
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/LetsFG/LetsFG.git"
41
+ },
42
+ "homepage": "https://letsfg.co",
43
+ "devDependencies": {
44
+ "@types/node": "^25.3.3",
45
+ "tsup": "^8.0.0",
46
+ "tsx": "^4.19.0",
47
+ "typescript": "^5.3.0"
48
+ },
49
+ "engines": {
50
+ "node": ">=18.0.0"
51
+ }
52
+ }