Skip to content

lmanchu/receipt-scan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

receipt-scan

Snap a photo of any receipt or invoice. Get structured data in your Google Sheet.

Photo → Gemini Vision → Structured JSON → Google Sheets row

Zero infrastructure. Works as a CLI tool, a hermes-agent skill, or a Telegram bot integration.

Install

git clone https://github.com/lmanchu/receipt-scan.git
cd receipt-scan
npm install
cp .env.example .env
# Set GOOGLE_SHEETS_ID in .env

Usage

# Scan a receipt
node scan.js receipt.jpg

# Dry run (extract only, don't write to sheet)
node scan.js receipt.jpg --dry-run

# JSON output
node scan.js receipt.jpg --json

# From stdin
cat receipt.jpg | node scan.js --stdin

Output:

Merchant: 7-ELEVEN
Date:     2026-04-09
Amount:   TWD 89
Category: groceries
Items:    茶裏王, 御飯糰
Tax:      4

✅ Appended to Google Sheet

How It Works

  1. Image sent to Gemini 2.5 Flash Vision (via CLIProxy or any OpenAI-compatible endpoint)
  2. LLM extracts: merchant, date, amount, currency, items, tax, category, invoice number
  3. Structured data appended as a new row in your Google Sheet
  4. Headers auto-created on first run

Telegram Integration (via hermes-agent)

Install as a hermes skill:

ln -s $(pwd) ~/.hermes/skills/receipt-scan

Then send any photo to your Gloria/Hermes Telegram bot. The agent will detect receipts and offer to scan them.

Supported Documents

  • Store receipts (any language, any currency)
  • Taiwan 統一發票 (electronic and paper)
  • Restaurant bills
  • Invoices and PDFs
  • Uber/Grab/taxi receipts
  • Credit card statements
  • Handwritten receipts

Configuration

See .env.example for all options. Key settings:

  • GOOGLE_SHEETS_ID — your spreadsheet ID (required)
  • LLM_MODEL — vision model (default: gemini-2.5-flash)
  • BASE_CURRENCY — your currency (default: TWD)

Google Sheet Columns

Date Merchant Amount Currency Category Items Tax Invoice # Payment Notes Source File Scanned At

Requirements

  • Node.js 18+
  • Google OAuth token (reuses hermes-agent/Gloria token)
  • Vision LLM access (Gemini via CLIProxy, OpenAI, or any compatible endpoint)

Inspired By

TaxHacker — self-hosted AI accounting app. We took the concept (LLM receipt extraction) and made it zero-infrastructure: no Docker, no PostgreSQL, just a script that writes to Google Sheets.

License

MIT

About

Snap a photo of any receipt → Gemini Vision → Google Sheets. Zero infrastructure. Works as CLI, hermes-agent skill, or Telegram bot integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors