foodpanda-cli
v0.1.0
Published
CLI for ordering food from foodpanda.ph — designed for AI assistants
Downloads
19
Maintainers
Readme
foodpanda-cli
CLI for ordering food from foodpanda.ph — designed for AI assistants that don't support MCP.
All commands output structured JSON to stdout.
Setup
npm install -g foodpanda-cli
# or
npx foodpanda-cliSet Your Location
foodpanda-cli location <latitude> <longitude>Your location is saved to ~/.foodpanda-cli/location.json and persists across sessions.
Login
foodpanda-cli loginOpens a browser window to foodpanda.ph. Log in manually — the token is captured automatically and saved to ~/.foodpanda-cli/token.json.
You can also set FOODPANDA_SESSION_TOKEN as an environment variable as a fallback.
Commands
Location
# Set delivery location
foodpanda-cli location 14.5995 120.9842Search & Discovery
# Search restaurants
foodpanda-cli search "jollibee" --cuisine "Filipino" --limit 5
# List chain outlets
foodpanda-cli outlets <chain_code>
# Get restaurant details
foodpanda-cli restaurant <vendor_code>Menu
# Get restaurant menu (compact)
foodpanda-cli menu <vendor_code>
# Get item details with toppings
foodpanda-cli item <vendor_code> <product_code>Cart
# Add items to cart
foodpanda-cli add <vendor_code> --items '[{"item_id":"ct-36-pd-1673","quantity":2}]'
# View cart
foodpanda-cli cart
# Remove item
foodpanda-cli remove <cart_item_id>Order
# Preview order (delivery address, payment methods, totals)
foodpanda-cli preview
# Place order (only COD works)
foodpanda-cli order --payment payment_on_delivery --instructions "Leave at door"For AI Assistants
This CLI is designed to be invoked by AI assistants as shell commands. All output is JSON.
Ordering workflow:
location-> set delivery coordinateslogin-> authenticatesearch-> find restaurantsmenu-> browse itemsitem-> check toppings/variationsadd-> build cartpreview-> review orderorder-> place order (only after user confirmation)
Limitations:
- Only
payment_on_delivery(Cash on Delivery) works - Philippines only (foodpanda.ph)
- Session tokens expire; use
loginto refresh
