Docs βΊ AI agents & tools
Command-line tool
Zero-dependency Node CLI.
A single-file, zero-dependency Node.js (18+) command-line tool. It's handy for scripts, cron jobs and coding agents.
Install
bash
curl -s https://api.trydragonfly.com/v1/cli -o dragonfly.mjsCommands
| Command | Does |
|---|---|
node dragonfly.mjs signup application.json | Apply. Saves applicationId and pollToken to .dragonfly-signup.json. |
node dragonfly.mjs poll | Poll the saved application; claims and saves the API key once approved. |
node dragonfly.mjs create-order order.json | Create an order from a JSON file (same body as POST /v1/orders). |
node dragonfly.mjs get-order cater-88412 | Show an order's status. |
Environment
| Variable | Default |
|---|---|
DRAGONFLY_API_KEY | (none; required for orders) |
DRAGONFLY_API_URL | https://api.trydragonfly.com |
Example
bash
export DRAGONFLY_API_KEY=dfk_live_β¦
cat > order.json <<'JSON'
{ "externalId": "cater-88412",
"pickup": { "address": "100 W Randolph St, Chicago, IL 60601", "contactPhone": "+13125550100" },
"dropoff": { "address": "233 S Wacker Dr, Chicago, IL 60606", "contactPhone": "+13125550111" } }
JSON
node dragonfly.mjs create-order order.json
node dragonfly.mjs get-order cater-88412Something unclear or missing? Tell us.