Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LedgerMem for Readwise

Pull Readwise highlights into LedgerMem on a schedule or on demand.

Features

  • Incremental sync via Readwise's /api/v2/export/ endpoint with updatedAfter
  • Last-sync timestamp persisted to ~/.ledgermem/readwise.json (configurable)
  • Pagination handled automatically (nextPageCursor)
  • Each highlight becomes a memory with rich book + location metadata
  • CLI: npx @ledgermem/readwise sync

Install

npm install -g @ledgermem/readwise

Or invoke directly:

npx @ledgermem/readwise sync

Configure

Set environment variables (or create a .env and load it however you like):

Var Description
READWISE_TOKEN Get one at https://readwise.io/access_token
LEDGERMEM_API_KEY Your LedgerMem API key
LEDGERMEM_WORKSPACE_ID Target workspace ID
LEDGERMEM_STATE_PATH Optional override of the state-file path

Schedule

cron example (every 30 minutes):

*/30 * * * * /usr/bin/env READWISE_TOKEN=… LEDGERMEM_API_KEY=… LEDGERMEM_WORKSPACE_ID=… npx -y @ledgermem/readwise sync >> /var/log/ledgermem-readwise.log 2>&1

Develop

npm install
npm run dev        # tsx src/cli.ts sync
npm test           # vitest
npm run build

License

MIT

About

Readwise connector for Mnemo

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages