receipt-md

Receipt · open-source agent skill

Turn a short JSON file into beautiful receipts, from thermal slips to A4 records.

Tell your coding agent what was sold. It writes a small JSON file. The engine counts the tax, the tip and the change, checks every total, and prints a page you can share.

npx github:isatimur/receipt-md render sale.json

A retro diner guest check on a 58 mm roll: red script name, mint paper, checker bands, weighed vegetables and cash change A cafe receipt on a chalkboard: yellow hand-lettered name, dotted leaders, a circled total and a QR-style code A hair salon receipt in Arabic, set right to left in a gold and black boutique style

Paper

One receipt, every size.

Thermal rolls grow to fit the content. Fixed pages shrink the text until it fits. Everything prints on one page.

The same hardware store receipt on a 58 mm thermal roll
58 mmthermal roll
The same hardware store receipt on an 80 mm thermal roll
80 mmthermal roll
The same hardware store receipt on an A5 page, with a tax summary table
A5with a tax summary

A4 and US Letter work too. The wide pages add a table header, a tax summary and a side-by-side layout.

How it works

Three steps. No sums by hand.

  1. Ask your agent

    Say what was sold, what it cost, and how it was paid. The agent asks only for what is missing.

  2. The engine counts

    It works out the totals itself. If a total you gave does not match, it stops and tells you which figure is wrong.

  3. Pick a theme, print

    See your receipt in several themes side by side. Pick one. Open the file, print it, or save it as PDF.

“Make a receipt for two flat whites, a croissant and a cold brew. Visa card, ten percent tip. 80 mm.”

Themes

Five looks. Five typefaces.

Each theme has its own type and layout, not just a new colour. Every image is real output from the engine. Open one to see the page itself.

Classic thermal theme: monospace type, dashed rules and a heavy total on grey-white paper
thermalThe till slip everyone knows. Monospace, dashed rules, a loud total.
Cafe theme: warm charcoal chalkboard with hand-lettered yellow and coral type
cafeA chalkboard by the till. Hand-lettered type, a circled total.
Luxe theme: Cormorant serif on bone paper with gold hairlines and a double frame
luxeA boutique card. Serif small caps, gold hairlines.
Brutalist mono theme on A4: black boxes, a hazard stripe and an inverted total
brutalBlack on white, heavy boxes, an inverted total.
Retro diner theme: red script, navy typewriter text, checker bands on mint stock
dinerA roadside guest check. Red script, checker bands.

The maths

The engine counts. Then it checks.

Money runs in whole pence, cents and fils, so sums are exact. Give it a total you already have and it will confirm it or refuse it.

  • Tax inside or on top. VAT that sits in the price, or sales tax added at the till. Pick a rate per item, or none.
  • Discounts and tips. Per item or per order. A tip can be a percentage or an amount.
  • Cash, cards and splits. Cards show only the last four digits, like •••• 0000. Cash shows the change.
  • Any currency and locale. Pounds, euros, dirhams, yen. Numbers and dates follow the locale, and Arabic runs right to left.
  • Honest codes. The barcode and QR-style code are decorative. No scanner reads them, and the docs say so.
$ npx github:isatimur/receipt-md validate sale.json
error: sale.json: 1 problem
  - "totals.total" says 16.84 but the receipt
    works out to 15.84. Fix the figure, or
    remove it and let the engine compute it.
$ npx github:isatimur/receipt-md totals sale.json
items       3
subtotal    £14.40
tax         £2.40  VAT 20% (included)
tip         £1.44
total       £15.84
paid        £15.84

Examples

Five made-up shops.

Every business, name and number here is invented. Each file is in the examples folder.

  • Little Wren Coffee

    A cafe. VAT inside the price, an own-cup discount, a tip, a card.

    GBP · 80 mm · view
  • Livraria Lanterna & Pena

    A bookshop in Portuguese. Two VAT rates, a reader's-card discount, an A4 record.

    EUR · A4 · view
  • Hollis Hill Honey & Greens

    A market stall. Goods sold by weight, cash handed over, change given.

    USD · 58 mm · view
  • صالون ياسمين

    A hair salon, in Arabic and right to left. Item discount, VAT, a tip.

    AED · 80 mm · view
  • Birchfield Hardware & Supply

    A hardware store. Sales tax on top, a trade discount, a gift card plus a card.

    USD · 80 mm · view

Install

Add it to your agent.

Claude Code plugin

/plugin marketplace add isatimur/receipt-md
/plugin install receipt-md@receipt-md

Any agent, via skills.sh

npx skills add isatimur/receipt-md

Command line

npx github:isatimur/receipt-md render sale.json --out sale.html

Node 20 or newer. Nothing else to install. PDF export needs Playwright, and the engine says so if it is missing.