This project syncs your Readwise shortlist articles to a SQLite database for easy access and management.
readwise-bot.ts - Standalone function version (can be used as cron)readwise-http.ts - HTTP endpoint version with web dashboard ⭐ RecommendedREADME.md - This documentationGet your Readwise API token:
Set environment variable:
READWISE_TOKENThe readwise-http.ts file provides a web interface and API endpoints:
POST /sync - Triggers a sync of your shortlistGET /links?limit=50 - Retrieves saved links from databaseThe readwise-bot.ts can be:
The bot creates a readwise_links table with the following fields:
id - Unique document ID from Readwiseurl - Article URLtitle - Article titleauthor - Article authorsource - Source publicationcategory - Document category (article, email, etc.)location - Current location (shortlist, archive, etc.)tags - JSON string of tagssite_name - Website nameword_count - Article word countcreated_at - When document was created in Readwiseupdated_at - When document was last updated in Readwisepublished_date - Original publication datesummary - Article summaryimage_url - Featured image URLreading_progress - Reading progress percentagefirst_opened_at - When first openedlast_opened_at - When last openedsaved_at - When saved to Readwiselast_moved_at - When last moved between locationssynced_at - When synced to our databasecurl -X POST https://your-val-url/sync
curl https://your-val-url/links?limit=20
To run automatically, you can:
readwise-bot.ts version and set it as a cron job/sync endpoint periodicallyREADWISE_TOKEN - Your Readwise API access token