Skip to content

Releases: Legoless/spark-cli

v0.2.0 — Folders, JSON, local time

19 Apr 14:45

Choose a tag to compare

Fixes

  • Dates are now in local time. Previously every timestamp rendered in UTC, mismatching the Spark UI.
  • Int args are validated. -n abc now fails fast with a clear message instead of a cryptic RangeError from SQLite.
  • search escapes LIKE metacharacters. Queries like 50% or user_name now match literally instead of behaving as wildcards.
  • read --headers-only no longer opens cache.sqlite (saves an unnecessary handle on a 170 MB file).
  • read --raw/--html append a trailing newline when printing to a TTY, so the shell prompt doesn't land mid-line.

Features

  • Folder filter: spark list -f <folder> where folder is one of inbox (default), sent, drafts, starred, snoozed, all. The sent/drafts/etc. folders were previously unreachable.
  • spark folders command: lists every mail folder across accounts with message count and unread count. Supports -a <accountPk> and --json.
  • --json on list, search, folders: emits an array of objects with ISO-8601 timestamps including local timezone offset — pipe-friendly for jq.

Breaking

  • --n long option is now --limit. The -n short alias is unchanged, so spark list -n 10 still works; only spark list --n 10 would need updating.

Full diff

v0.1.0...v0.2.0

v0.1.0 — Initial release

19 Apr 14:20

Choose a tag to compare

First public release of spark-cli — a read-only command-line reader for Spark Desktop's local mail cache on macOS.

What it does

Queries the SQLite databases Spark keeps under ~/Library/Application Support/Spark Desktop/core-data/ so you can browse, read, and search already-synced mail from your terminal. No IMAP, no OAuth, no network.

Features

  • spark list — recent inbox, with unread markers and per-account filtering
  • spark read <pk> — rendered plaintext, raw HTML (--html), raw RFC822 source (--raw), or headers only (-H)
  • spark search <query> — LIKE search across subject, sender, and short body
  • spark accounts — list configured Spark accounts

Safety

Every database handle is opened with readonly: true. The tool never writes to Spark's data and never touches the network.

Install

git clone git@github.com:Legoless/spark-cli.git
cd spark-cli
npm install
npm run build
npm link   # optional: puts `spark` on PATH

Requires Node.js 20+ and macOS with Spark Desktop signed in at least once.

Known limits

  • Only mail Spark has already synced locally is readable.
  • cache.sqlite is LRU — old bodies can be evicted even when metadata remains.
  • Schema names come from Spark's own code and may shift with future Spark updates.