Skip to content

LatencyTDH/doordash-cli

Repository files navigation

doordash-cli

Cart-safe DoorDash CLI for terminal workflows.

doordash-cli is an unofficial CLI for the parts of DoorDash that work well in a shell: sign in once, set a delivery address, search restaurants, inspect menus and items, read existing orders, and manage a cart with structured output.

It stops before checkout.

Highlights

  • Cart-safe by design — browse, inspect existing orders, and manage a cart; no checkout, payment, or order mutation.
  • Profile-first logindoordash-cli login reuses saved local auth, then same-machine Chrome/Brave profile state on supported platforms, then attachable signed-in browser sessions when possible, and otherwise opens a temporary login window.
  • Direct API first — auth, discovery, existing-order, and cart commands use DoorDash consumer-web GraphQL/HTTP rather than DOM clicking.
  • JSON-friendly — commands print structured output by default, and --json enables a documented automation envelope with stable error codes and exit codes.
  • Fail-closed — unsupported commands, flags, or unsafe payload shapes are rejected.

Install

Install from npm

npm install -g doordash-cli

That installs both lowercase command names: doordash-cli and dd-cli.

Package page: https://www.npmjs.com/package/doordash-cli

For the full install and first-run guide, see docs/install.md.

Install from source instead

If you want the latest unreleased work or a local checkout you can edit, use:

git clone https://github.com/LatencyTDH/doordash-cli.git
cd doordash-cli
npm install
npm link

If you prefer to run from a checkout without linking:

npm run cli -- --help

Optional runtime bootstrap

If your environment does not already have Playwright's bundled Chromium runtime installed, install it once:

doordash-cli install-browser
# or, from a checkout without linking
npm run install:browser

That runtime is used when the CLI needs a local browser, including the temporary login window fallback.

First run

doordash-cli login
doordash-cli auth-check
doordash-cli set-address --address "350 5th Ave, New York, NY 10118"
doordash-cli search --query sushi

If you are running from a checkout without npm link, replace doordash-cli with npm run cli --.

Auth and session reuse

  • doordash-cli login reuses saved local auth first, then same-machine Chrome/Brave profile state on supported platforms, then attachable signed-in browser sessions, and finally a temporary Chromium login window it can watch directly.
  • doordash-cli auth-check reports whether saved state still looks logged in and can quietly reuse/import supported browser state unless doordash-cli logout disabled that auto-reuse.
  • doordash-cli logout clears persisted cookies and storage state, then keeps passive browser-session reuse disabled until the next explicit doordash-cli login.

For platform-specific reuse behavior, session directory locations, DOORDASH_CLI_SESSION_DIR, legacy-state migration, and temporary-browser troubleshooting, see docs/auth-and-session-reuse.md.

Command surface

Session

  • install-browser
  • auth-check
  • login
  • logout

Discovery

  • set-address --address <text>
  • search --query <text> [--cuisine <name>]
  • menu --restaurant-id <id>
  • item --restaurant-id <id> --item-id <id>

Existing orders

  • orders [--limit <n>] [--active-only]
  • order --order-id <id>

Cart

  • add-to-cart --restaurant-id <id> (--item-id <id> | --item-name <name>)
  • update-cart --cart-item-id <id> --quantity <n>
  • cart

For configurable items and working command examples, see docs/examples.md.

For stable scripting and wrapper integrations, use --json and read docs/automation-contract.md.

Safety

The CLI allowlists browse, existing-order, and cart commands. It hard-blocks:

  • checkout
  • place-order
  • payment actions
  • order mutation or cancellation actions

Safety is enforced in code:

  • unsupported commands hard-fail
  • unknown flags are rejected before DoorDash work runs
  • direct cart mutations use validated request shapes
  • unsupported nested option transports fail closed

Docs

Caveats

  • This is an unofficial integration against DoorDash consumer-web traffic.
  • DoorDash can change request shapes, anti-bot behavior, or session handling at any time.
  • Review results before trusting them for anything important.

License

MIT

About

Unofficial DoorDash CLI for search, menus, items, addresses, and cart workflows via the consumer web API.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors