notes that auto-delete after a ttl. because not every thought deserves to be kept forever.
i kept writing 2am: check tz bug on sticky notes, then forgetting to remove them for 3 months. so i built this. now every note i take has a timer on it, and the old stuff vanishes on its own.
pip install git+https://github.com/f4rkh4d/ephemeral
python 3.10+. sqlite lives at ~/.ephemeral/store.db by default, or wherever EPHEMERAL_STORE points.
ephemeral add "check the tz bug in parser" # default 24h
ephemeral add "grab bread on the way home" --ttl 3h
ephemeral add "recipe for tushonka" --persist # no ttl, sticks around
ephemeral ls
ephemeral gc
ephemeral export -o dump.txt
ephemeral rm 7
ls fades older notes toward violet as they approach expiry, so glancing at the list tells you what's about to disappear.
sqlite table with created_at and expires_at. every command runs a sweep first, so expired notes are gone before you see the list. --persist stores null for expires_at and the gc query ignores those rows. that's the whole trick.
ttl parsing is deliberately strict. i won't accept 1 hour or 1hr or 90 minutes. just 30s, 45m, 3h, 7d. write me an issue if that's annoying and i'll loosen it.
haven't tested on windows. probably works, the paths use pathlib, but ymmv.
mit. see LICENSE.