Releases: Legoless/spark-cli
Releases · Legoless/spark-cli
v0.2.0 — Folders, JSON, local time
Fixes
- Dates are now in local time. Previously every timestamp rendered in UTC, mismatching the Spark UI.
- Int args are validated.
-n abcnow fails fast with a clear message instead of a crypticRangeErrorfrom SQLite. searchescapes LIKE metacharacters. Queries like50%oruser_namenow match literally instead of behaving as wildcards.read --headers-onlyno longer openscache.sqlite(saves an unnecessary handle on a 170 MB file).read --raw/--htmlappend 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 ofinbox(default),sent,drafts,starred,snoozed,all. Thesent/drafts/etc. folders were previously unreachable. spark folderscommand: lists every mail folder across accounts with message count and unread count. Supports-a <accountPk>and--json.--jsononlist,search,folders: emits an array of objects with ISO-8601 timestamps including local timezone offset — pipe-friendly forjq.
Breaking
--nlong option is now--limit. The-nshort alias is unchanged, sospark list -n 10still works; onlyspark list --n 10would need updating.
Full diff
v0.1.0 — Initial release
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 filteringspark 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 bodyspark 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 PATHRequires 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.sqliteis 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.