Skip to content

nord342/rekindle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rekindle

Local-first daily highlight resurfacing — a free Readwise alternative.

PyPI License: MIT Tests Python

rekindle imports your book highlights from Kindle, Apple Books, kindle-archive JSON, or markdown into a local SQLite database, then resurfaces forgotten ones every day — in your terminal, in your inbox, or both.

$ rekindle today

📖 Atomic Habits — James Clear
"You do not rise to the level of your goals. You fall to the level of your systems."
──── location 423-425 · added 2024-08-12 ────

📖 Deep Work — Cal Newport
"Human beings, it seems, are at their best when immersed deeply in something challenging."
──── location 812-814 · added 2024-09-01 ────

📖 Meditations — Marcus Aurelius
"You have power over your mind — not outside events. Realize this, and you will find strength."
──── location 1102-1104 · added 2024-10-12 ────

Why?

  • You highlight constantly but never re-read them. Knowledge you don't revisit is knowledge you don't keep.
  • Readwise costs $96/year for what is, fundamentally, a daily email of your own text. That math gets weirder every year.
  • Your highlights should live on YOUR machine, not someone else's database that can go away, raise prices, or change its terms.

rekindle is the quiet, local, do-one-thing-well version. Your data, your terminal, your loop.

Quickstart

# 1. install
pipx install rekindle           # (or pip install rekindle)

# 2. set up the local DB
rekindle init

# 3. import from anywhere
rekindle import "/Volumes/Kindle/documents/My Clippings.txt"
rekindle import ~/Library/Containers/com.apple.iBooksX/Data/Documents
rekindle import highlights.json --source kindle-archive-json

# 4. see your daily picks
rekindle today

# 5. (optional) email yourself a digest
rekindle email --to you@example.com

Installation

# recommended — isolated CLI install
pipx install rekindle

# or regular pip
pip install rekindle

Not yet on PyPI. Until then, install from source:

git clone https://github.com/nord342/rekindle
cd rekindle
pip install -e .

Sources supported

Source How
Kindle rekindle import "My Clippings.txt"
kindle-archive rekindle import highlights.json --source kindle-archive-json
Apple Books (macOS) rekindle import ~/Library/Containers/com.apple.iBooksX/Data/Documents
Markdown rekindle import ~/my-notes/ --source markdown

Auto-detection works for all four — just point rekindle import at the path and it picks the right parser.

Importing is idempotent. Run it again tomorrow with new highlights and only the new ones are added (deduped by a hash of book + location + text).

Email digest setup

Add an [smtp] section to ~/.rekindle/config.toml:

[smtp]
host = "smtp.gmail.com"
port = 587
username = "you@gmail.com"
password = "your-app-password"     # see below
from_addr = "you@gmail.com"

Gmail app-password setup:

  1. Enable 2-Step Verification on your Google account.
  2. Visit https://myaccount.google.com/apppasswords.
  3. Create a new app password for "rekindle".
  4. Paste the 16-character password into config.toml. It only works for SMTP — your real password stays untouched.

Then:

rekindle email --to you@gmail.com --count 5
rekindle email --to you@gmail.com --ai      # include AI reflection

AI reflections (optional)

rekindle can ask a local LLM (or any OpenAI-compatible endpoint) to find themes connecting a day's highlights.

This is the only network call rekindle ever makes — and it's off unless you explicitly turn it on. Your highlights never leave your machine otherwise.

Ollama (recommended, fully local)

# install Ollama: https://ollama.com
ollama pull llama3

rekindle ai --ollama llama3

OpenAI-compatible endpoint

rekindle ai --openai-base https://api.openai.com/v1 --model gpt-4o-mini

Configure persistently in ~/.rekindle/config.toml:

[ai]
backend = "ollama"             # or "openai"
model = "llama3"
base_url = "http://localhost:11434"
api_key = ""                    # only for openai-compatible endpoints

Cron / launchd

Get the crontab line:

rekindle cron --time 08:00 --cmd "rekindle email --to you@gmail.com"
# 0 8 * * * rekindle email --to you@gmail.com

Then crontab -e and paste.

On macOS, launchd works just as well — drop a .plist in ~/Library/LaunchAgents calling the same command.

Configuration

Full ~/.rekindle/config.toml reference:

[smtp]
host = "smtp.gmail.com"
port = 587
username = "you@gmail.com"
password = "your-app-password"
from_addr = "you@gmail.com"

[ai]
backend = "ollama"             # "ollama" | "openai"
model = "llama3"
base_url = "http://localhost:11434"
api_key = ""

Database path: ~/.rekindle/db.sqlite. Override with REKINDLE_DB=/path/to/file.sqlite.

FAQ

Is my data private? Yes. The SQLite database lives at ~/.rekindle/db.sqlite on your machine. The only outbound network calls are (a) the optional AI reflection, and (b) SMTP when you explicitly run rekindle email. Neither is enabled by default.

Why not just use Readwise? Cost ($96/yr), privacy (your highlights become someone else's data), and pragmatism — you already own the source data, you shouldn't need a SaaS to read it back to you.

Where's the database? ~/.rekindle/db.sqlite. Plain SQLite. You can open it in any sqlite browser, back it up with cp, sync it with Syncthing, do whatever you want.

Does this work with kindle-archive? Yes — that's the point. kindle-archive is great for the one-shot export. rekindle is the daily review loop on top.

rekindle import path/to/highlights.json --source kindle-archive-json

Does this remove DRM? No. rekindle only reads highlight files you already own — My Clippings.txt from your own Kindle, your own Apple Books library, your own exports. It does not break, bypass, or interact with DRM in any way.

What happens to highlights I've "seen"? They get scored down for a while, then gradually weight back up. Something you saw 6 months ago has nearly the same chance of resurfacing as a brand-new highlight. Nothing is ever "retired."

Roadmap

  • TUI mode (rekindle tui)
  • Web dashboard for browsing your library
  • Mobile companion (read-only)
  • Tag/folder support
  • FTS5 search

PRs welcome — see CONTRIBUTING below.

Contributing

git clone https://github.com/nord342/rekindle
cd rekindle
pip install -e ".[dev]"
pytest -v

Issues and pull requests are very welcome. Keep changes focused, add tests, and please don't add a network dependency to anything outside ai.py / email_digest.py.

License

MIT © 2026 nord342


Pairs well with kindle-archive — one-shot Kindle exports feeding into the long-term review loop.

About

Rediscover your forgotten Kindle highlights — daily. A free, local-first Readwise alternative. Terminal review, email digests, or markdown. Optional AI themes via Ollama. Zero cloud. Zero login.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages