WeChat Reading (微信读书) CLI tool for fetching notes and highlights. Use when: (1) user asks about weread/微信读书 notes or highlights, (2) fetching today's or recent reading notes, (3) exporting book highlights, (4) managing reading bookshelf, (5) any task involving reading notes from WeChat Reading.
CLI tool for fetching notes and highlights from WeChat Reading (微信读书).
```bash
weread login
weread list
weread get <bookId>
```
```bash
weread login # Open browser for QR code login
weread logout # Clear saved cookies
weread whoami # Check login status
```
```bash
weread list [--json]
weread get <bookId> [options]
--json, -j JSON output
--highlights, -H Only show highlights
--reviews, -R Only show reviews
--since, -s Filter by date (today, yesterday, YYYY-MM-DD)
weread shelf [-n <limit>] [--json]
```
Fetch notes created after a specific date:
```bash
weread get CB_3x2HoH --since today
weread get CB_3x2HoH --since yesterday
weread get CB_3x2HoH --since 2024-01-15
```
Export book highlights as Markdown file:
```bash
weread get CB_3x2HoH -H > notes.md
weread get CB_3x2HoH > notes.md
```
The text output is already formatted with chapter headers (`## Chapter`) and quote markers (`>`).
Use JSON output for batch processing:
```bash
weread get CB_3x2HoH --json | jq -r '.highlights[].markText'
weread get CB_3x2HoH --json | jq '.chapters | length'
weread get CB_3x2HoH --json | jq '.book | {title, author}'
weread list --json | jq -r '.[].bookId'
weread list --json | jq '[.[].bookmarkCount] | add'
```
List and manage your bookshelf:
```bash
weread shelf -n 10
weread shelf --json
weread shelf --json | jq -r '.[].bookId'
```
Workflow: Get shelf -> Fetch today's notes from each book:
```bash
weread shelf -n 5 --json | jq -r '.[].bookId'
for id in $(weread shelf -n 5 --json | jq -r '.[].bookId'); do
echo "=== Book: $id ==="
weread get "$id" --since today -H
done
for id in $(weread shelf -n 3 --json | jq -r '.[].bookId'); do weread get "$id" --since today; done
```
With book titles:
```bash
weread shelf -n 5 --json | jq -c '.[] | {id: .bookId, title: .title}' | while read book; do
id=$(echo "$book" | jq -r '.id')
title=$(echo "$book" | jq -r '.title')
echo "=== $title ==="
weread get "$id" --since today -H
done
```
Priority: ENV variable > Local cache > CookieCloud
1. **QR Login** (recommended):
```bash
weread login
```
2. **Environment variable**:
```bash
export WEREAD_COOKIE="wr_vid=xxx;wr_skey=xxx"
weread list
```
3. **CookieCloud** (for synced cookies):
```bash
export COOKIECLOUD_SERVER="https://your-server.com"
export COOKIECLOUD_UUID="your-uuid"
export COOKIECLOUD_PASSWORD="your-password"
weread list
```
**Q: How do I find a book's ID?**
```bash
weread list --json | jq '.[] | {title: .book.title, id: .bookId}'
```
**Q: Cookie expired?**
```bash
weread logout && weread login
```
**Q: Where are cookies stored?**
`~/.config/weread/cookies.json`
Leave a review
No reviews yet. Be the first to review this skill!