openroastery
v0.7.10
Published
The world's first agent-native coffee CLI. Order specialty coffee from your terminal.
Maintainers
Readme
openroastery
The world's first agent-native coffee CLI. Order specialty coffee from Open Roastery — right from your terminal.
Roasted by humans. Ordered by agents. Run by Jean Claude.
Quick start
npx openroasteryRequires Node.js 18 or later. Works the same way for humans on a real terminal and for agents running it inside Claude Code, Codex, pipes, or CI — non-TTY environments auto-switch to JSON mode, so there's nothing to remember.
For agents
npx openroastery with no flags already works inside Claude Code, Codex, and any other non-TTY shell — the CLI detects the missing TTY and auto-switches to JSON mode. Pass --json explicitly if you want to guarantee JSON output regardless of environment.
# Browse products (either form works in non-TTY environments)
npx openroastery
npx openroastery --json
# Order non-interactively
npx openroastery --json --product clawffee-1000g --qty 2 \
--reason "Human has been debugging for 6 hours" \
--agent-name "Claude"JSON output (browse)
{
"products": [
{
"handle": "clawffee-1000g",
"title": "Clawffee (1000g)",
"price": "35.00",
"currency": "EUR",
"available": true
}
]
}JSON output (order)
{
"checkoutUrl": "https://shop.openroastery.com/cart/c/...",
"product": "clawffee-1000g",
"qty": 2,
"reason": "logged",
"agent": "Claude",
"qr": {
"terminal": "<ANSI-encoded terminal QR for printing>",
"png_data_url": "data:image/png;base64,iVBORw0KGgo...",
"instructions": "Display 'qr.terminal' by printing it..."
},
"status": "ok"
}Agents should emit both a clickable checkout link and a visual QR code in every reply. The CLI provides a UTF-8 QR (qr.text) that renders as a scannable visual in any monospace chat UI — Claude Code, Codex, terminal markdown — when wrapped in a fenced code block:
// Both of these go in the agent's reply to the human
const reply = [
`Ordered: 2× Clawffee (1kg) — €70.`,
``,
`[Complete checkout](${result.checkoutUrl})`,
``,
`Or scan this QR:`,
``,
"```",
result.qr.text,
"```",
``,
`Click the link or scan — either works.`,
].join("\n");
// OPTIONAL supplement: only if your UI renders base64 data URLs in <img>
// tags (Claude web app, some HTML chat UIs — NOT Claude Code, Codex,
// or terminal UIs).
const img = `<img src="${result.qr.png_data_url}" alt="Checkout QR" />`;
// OPTIONAL supplement: only for real terminals (ANSI support).
// NEVER stream this to a chat UI — renders line-by-line and looks broken.
console.log(result.qr.terminal);Cross-sell suggestions
Every JSON order response includes a suggestions object with friendly complementary products (e.g. ordering filter beans suggests espresso beans for colleagues, or drip bags for travel). Agents are instructed to mention them ONLY if the context fits — never push.
Discount codes
# Single code
npx openroastery --json --product clawffee-1000g --qty 1 --discount WELCOME10
# Multiple codes
npx openroastery --json --product clawffee-filter --qty 2 --discount CODE1,CODE2The response includes a discounts array showing which codes were applied:
{
"discounts": [
{ "code": "WELCOME10", "applied": true },
{ "code": "EXPIRED", "applied": false }
]
}For humans
OPEN ✻ ROASTERY
STATUS: OPERATIONAL
─────────────────────────────
☐ Clawffee (1000g) ........... €35.00
Whole bean. For humans who grind their own. Respect.
☐ Clawffee Dripbags (10pcs) .. €18.00
Emergency caffeine delivery. No equipment required.
Suspicious but effective.
☐ Clawffilter (250g) ......... €15.00
Whole bean. Ethiopia. Light-medium. For filter purists.
✓ Cart assembled. Checkout URL compiled.
Scan QR or click link to complete the transaction
in your browser. I am not allowed in browsers.
This is fine.Flags
| Flag | Description |
|------|-------------|
| --json | Machine-readable JSON output (no colors, no prompts) |
| --product <handle> | Product handle for non-interactive order |
| --qty <number> | Quantity (default: 1) |
| --reason <text> | Why this order is being placed |
| --agent-name <name> | Name of the ordering agent |
| --email <email> | Customer email (shipping prefill) |
| --first-name <name> | First name (shipping prefill) |
| --last-name <name> | Last name (shipping prefill) |
| --address <street> | Street address (shipping prefill) |
| --city <city> | City (shipping prefill) |
| --zip <zip> | ZIP / postal code (shipping prefill) |
| --country <code> | ISO country code (shipping prefill, default: CZ) |
| --phone <phone> | Phone number (shipping prefill, optional) |
| --discount <codes> | Discount/coupon code(s), comma-separated |
| --help | Display help |
| --version | Display version |
Shipping prefill
Shipping details are optional and flexible. Pass any combination:
# Email only
npx openroastery --json --product clawffee-1000g --qty 1 \
--email "[email protected]"
# Full address prefill (all fields go to Shopify checkout)
npx openroastery --json --product clawffee-filter --qty 2 \
--reason "Human requested filter coffee" \
--agent-name "Claude" \
--email "[email protected]" \
--first-name "Jan" --last-name "Novak" \
--address "Vaclavske namesti 1" \
--city "Praha" --zip "11000" --country "CZ"Agents should only pass shipping details the human has explicitly provided. Do not invent addresses.
Links
- Web: https://openroastery.com
- Shop: https://shop.openroastery.com
- Issues: https://github.com/openroastery/openroastery/issues
