
Babeliocli Library
- 2 installs
- 4 repo stars
- Updated April 19, 2026
- yoanbernabeu/babeliocli
Reads the authenticated user's Babelio shelves (read, to-read, in-progress, abandoned, etc.) via babeliocli to list, count, group, and export reading history as JSON.
About
Uses babeliocli to access a user's Babelio shelves and compute reading statistics, group reads by period, or export the library as JSON. A developer uses it to analyze or export their personal reading history.
- Reads all Babelio shelf types for the authenticated user
- Groups by month/year and exports shelves as JSON
Babeliocli Library by the numbers
- 2 all-time installs (skills.sh)
- Ranked #445 of 550 CLI & Terminal skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/yoanbernabeu/babeliocli --skill babeliocli-libraryAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| repo stars | ★ 4 |
| Last updated | April 19, 2026 |
| Repository | yoanbernabeu/babeliocli ↗ |
What it does
Reads the authenticated user's Babelio shelves (read, to-read, in-progress, abandoned, etc.) via babeliocli to list, count, group, and export reading history as JSON.
Files
babeliocli — Read Shelves and Books
babeliocli exposes the logged-in user's library. It is read-only and never modifies Babelio state.
Preconditions
A session must exist. If needed, see the babeliocli-setup skill or run:
babeliocli whoami # confirms the sessionShelves
babeliocli shelves # JSON (default)
babeliocli shelves -f text # human viewSupported shelf keys:
| Key | Label | Babelio filter |
|---|---|---|
all | Mes livres | ?action=toute |
lus | Lus | ?s1=1 |
a-lire | À lire | ?s1=2 |
en-cours | En cours | ?s1=0 |
pense-bete | Pense-bête | ?s1=3 |
abandonnes | Abandonnés | ?s1=4 |
critiques | Critiqués | ?s3=10 |
non-critiques | Non critiqués | ?s3=11 |
Books
babeliocli books --shelf lus # all "read" books, JSON
babeliocli books --shelf lus --limit 10 # first 10 books
babeliocli books --shelf a-lire -f text # human viewFlags:
--shelf(required, defaultall): one of the keys above.--limit N(default0= no limit): stop after N books.--max-pages N(default50): safety cap on HTTP pagination.
Pagination is handled automatically. The CLI requests the first page with the filter, then follows pageN=N because Babelio stores the active filter in the PHP session.
Book JSON schema (per shelf entry)
{
"id_biblio": "90486207",
"book_id": "1917163",
"title": "Une espèce en voie de disparition",
"author": "Lavie Tidhar",
"author_id": "271314",
"book_url": "https://www.babelio.com/livres/Tidhar-Une-espece-en-voie-de-disparition/1917163",
"status": "Lu",
"rating": 4,
"readers": 259,
"tags": [],
"read_start": "2025-09-01",
"read_end": "2025-09-05"
}Notes:
id_bibliois the per-user shelf entry (useful for debugging Babelio URLs);book_idis the globally-shared identifier used in/livres/.../BOOK_ID.ratingis an integer 0–5 (0 = not rated).read_start/read_endare the user-entered dates (YYYY-MM-DD). Empty when the user has never filled them.statusmatches Babelio's French labels:Lu,À lire,En cours,Pense bête,Abandonné,Possédé.
Common agent recipes
Group read books by month
babeliocli books --shelf lus |
jq -r '.books[] | select(.read_end != "") | "\(.read_end[0:7])\t\(.title)"' |
sortCount read books per year
babeliocli books --shelf lus |
jq -r '.books[] | select(.read_end != "") | .read_end[0:4]' |
sort | uniq -c | sort -rnTop-rated books in your library
babeliocli books --shelf all |
jq '.books | map(select(.rating == 5)) | map({title, author})'Find a book you own by partial title
babeliocli books --shelf all |
jq --arg q "hyperion" '.books[] | select(.title | ascii_downcase | contains($q))'Gotchas
- If a book has no
read_end, do not assume "not read yet"; it may mean the user never filled the date. - Babelio's status
"Lu"is authoritative; dates are metadata. - Shelves
critiquesandnon-critiquesintersectlus, so summing counts would double-count. - A session expiry returns
session expired: …on stderr with a non-zero exit code — your script should detect this and trigger a re-auth path.