API-first CLI for iFood built for AI agents. It uses your authenticated browser session to call iFood’s internal APIs directly (search, catalog, cart, discovery) and only opens pages for login/address setup and checkout review. No UI scraping is required.
What this is for:
- Find restaurants and items quickly
- Build carts and prep orders
- Hand off to checkout for a human confirmation (no auto-submit by default)
bun install
# Optional: install Playwright's bundled browser
bunx playwright install chromium
# Run a quick restaurant search (API)
bun src/cli.ts restaurants --query "pizza" --limit 5 --jsonFrom the repo root:
bun install
bun run build
# Option 1: Bun link (recommended for local dev)
bun link
clifood restaurants --query "pizza" --limit 5
# Option 2: npm global install from local path
npm install -g .
clifood restaurants --query "pizza" --limit 5Bun can install directly from GitHub:
bun add -g github:danizord/clifood
clifood restaurants --query "pizza" --limit 5Start Chrome with remote debugging enabled, then point the CLI to it:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222 \
--user-data-dir="$HOME/.clifood/chrome-profile"
# Then run (direct or global)
bun src/cli.ts restaurants --query "japonesa" --cdp-url http://127.0.0.1:9222
clifood restaurants --query "japonesa" --cdp-url http://127.0.0.1:9222This keeps your existing iFood login and address selection. All API calls are executed from your authenticated browser context to avoid bot blocks.
clifood open --waitUse this to log in or set your delivery address in the connected browser profile.
clifood restaurants --query "sushi" --limit 10Exclude categories or names:
clifood restaurants --query "a" --exclude pizza --exclude hamburguer --exclude doces --limit 10Shortcut:
clifood restaurants --query "a" --exclude-defaults --limit 10Defaults cover pizza, burgers, and sweets (including lanches, açaí, sorvetes, bolos).
Top restaurants (discovery feed, no search term):
clifood restaurants --top --exclude-defaults --limit 10clifood items --restaurant "Restaurante X" --query "temaki" --limit 10You can also pass a full iFood restaurant URL with --restaurant.
clifood order \
--restaurant "Restaurante X" \
--item "Temaki de salmão:2" \
--item "Guioza" \
--confirmSafety: without --confirm, the CLI opens checkout but does not submit the order.
Config lives at ~/.clifood/config.json. You can also override via CLI flags or environment variables.
bun src/cli.ts config show
bun src/cli.ts config set cdpUrl http://127.0.0.1:9222
bun src/cli.ts config set headless falseSupported keys: cdpUrl, profileDir, headless, slowMo, locale, timeoutMs.
Environment overrides:
IFOOD_CDP_URLIFOOD_PROFILE_DIRIFOOD_HEADLESSIFOOD_SLOW_MOIFOOD_LOCALEIFOOD_TIMEOUT_MS
- The CLI is API-first and depends on a valid logged-in browser session.
- Some menu items require mandatory option choices; the CLI auto-selects minimum required options from the catalog data.
- Read
docs/architecture.mdfor the exact API flow and data dependencies. - Read
docs/troubleshooting.mdif you hit auth or anti-bot issues.