DuolingoDMH

DuolingoDMH CLI

The official DuolingoDMH command-line tool reads the DuolingoDMH API from a terminal, a script or an AI agent's shell: Duolingo Super and Max plans and prices, the FAQ and the contact channels. It is the npm package duolingodmh, needs Node.js 18 or newer and has no dependencies.

Install

Run it once with npx, or install it globally to get the duolingodmh command:

npx duolingodmh plans
npm install --global duolingodmh
duolingodmh --help

Commands

  • duolingodmh plans [--family super|max|family|trial]: plans with the USD reference price and the VND list price (operation listPlans).
  • duolingodmh faqs [--lang en|vi]: frequently asked questions (operation listFaqs).
  • duolingodmh contact [--lang en|vi]: WhatsApp, Telegram, Zalo and Facebook channels and how to order (operation getContactChannels).
  • duolingodmh endpoints [--tag catalog|support|meta]: the API endpoints (operation getApiIndex).
  • duolingodmh openapi: prints the OpenAPI 3.1 document.

Options

  • --json: print the API response unchanged, for scripts and agents.
  • --base-url <url>: call another deployment. The default is https://duongminhhoang.store; the DUOLINGODMH_BASE_URL environment variable sets it too.
  • --help, --version.

Output and exit codes

  • 0: success. Tables go to standard output.
  • 1: the API returned an error or could not be reached. The error code, message and hint go to standard error (as JSON with --json). A 429 includes the seconds to wait from Retry-After.
  • 2: unknown command or option. Usage goes to standard error.

Using the CLI from an AI agent

  • Pass --json and parse standard output. Field names match the OpenAPI document.
  • Stay under 60 requests per minute per endpoint, and wait for the time given on a 429 before retrying.
  • The CLI cannot place orders. Run duolingodmh contact and give the user the WhatsApp or Telegram link.