@@ -20,6 +20,23 @@ bunx playwright install chromium
2020bun src/cli.ts restaurants --query " pizza" --limit 5 --json
2121```
2222
23+ ## Global install (local)
24+
25+ From the repo root:
26+
27+ ``` bash
28+ bun install
29+ bun run build
30+
31+ # Option 1: Bun link (recommended for local dev)
32+ bun link
33+ clifood restaurants --query " pizza" --limit 5
34+
35+ # Option 2: npm global install from local path
36+ npm install -g .
37+ clifood restaurants --query " pizza" --limit 5
38+ ```
39+
2340## Use your existing logged-in browser (recommended)
2441
2542Start Chrome with remote debugging enabled, then point the CLI to it:
@@ -29,8 +46,9 @@ Start Chrome with remote debugging enabled, then point the CLI to it:
2946 --remote-debugging-port=9222 \
3047 --user-data-dir=" $HOME /.clifood/chrome-profile"
3148
32- # Then run
49+ # Then run (direct or global)
3350bun src/cli.ts restaurants --query " japonesa" --cdp-url http://127.0.0.1:9222
51+ clifood restaurants --query " japonesa" --cdp-url http://127.0.0.1:9222
3452```
3553
3654This keeps your existing iFood login and address selection. All API calls are executed from your authenticated browser context to avoid bot blocks.
@@ -40,49 +58,49 @@ This keeps your existing iFood login and address selection. All API calls are ex
4058### Open iFood (manual setup)
4159
4260``` bash
43- bun src/cli.ts open --wait
61+ clifood open --wait
4462```
4563
4664Use this to log in or set your delivery address in the connected browser profile.
4765
4866### Search restaurants
4967
5068``` bash
51- bun src/cli.ts restaurants --query " sushi" --limit 10
69+ clifood restaurants --query " sushi" --limit 10
5270```
5371
5472Exclude categories or names:
5573
5674``` bash
57- bun src/cli.ts restaurants --query " a" --exclude pizza --exclude hamburguer --exclude doces --limit 10
75+ clifood restaurants --query " a" --exclude pizza --exclude hamburguer --exclude doces --limit 10
5876```
5977
6078Shortcut:
6179
6280``` bash
63- bun src/cli.ts restaurants --query " a" --exclude-defaults --limit 10
81+ clifood restaurants --query " a" --exclude-defaults --limit 10
6482```
6583
6684Defaults cover pizza, burgers, and sweets (including lanches, açaí, sorvetes, bolos).
6785
6886Top restaurants (discovery feed, no search term):
6987
7088``` bash
71- bun src/cli.ts restaurants --top --exclude-defaults --limit 10
89+ clifood restaurants --top --exclude-defaults --limit 10
7290```
7391
7492### Search items in a restaurant
7593
7694``` bash
77- bun src/cli.ts items --restaurant " Restaurante X" --query " temaki" --limit 10
95+ clifood items --restaurant " Restaurante X" --query " temaki" --limit 10
7896```
7997
8098You can also pass a full iFood restaurant URL with ` --restaurant ` .
8199
82100### Place an order
83101
84102``` bash
85- bun src/cli.ts order \
103+ clifood order \
86104 --restaurant " Restaurante X" \
87105 --item " Temaki de salmão:2" \
88106 --item " Guioza" \
0 commit comments