A command-line tool for fetching books and novels from online reading platforms.
- 📚 Fetch your bookshelf
- 📖 Extract book details and chapters
- ⚡ Fast and lightweight
- 🔒 Works with most reading platforms
# Clone the repository
git clone https://github.com/WhizZest/reader-cli.git
cd reader-cli
# Install dependencies
npm install
# Build
npm run build
# Link globally (optional)
npm link# List first 20 books
node dist/main.js shelf --limit 20
# Include debug output
node dist/main.js shelf --limit 20 --verboseOutput example:
[
{
"index": 1,
"title": "Book Title",
"bookId": "abc123",
"archive": null
},
{
"index": 2,
"title": "Another Book",
"bookId": "def456",
"archive": "My Collection"
}
]Fields:
index- Book sequence number (1, 2, 3...)title- Book titlebookId- Unique book identifierarchive- Group/archive name (null for books not in any group)
node dist/main.js book <book-id>node dist/main.js search "keyword" --limit 10Reader CLI requires a browser extension to manage cookies for automated login.
- Open Chrome/Edge browser
- Go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
extensionfolder in this project - The extension will automatically handle cookie management
| Command | Description | Example |
|---|---|---|
shelf |
List books on your shelf | shelf --limit 50 |
book |
Get book details | book <id> |
search |
Search for books | search "keyword" |
catalog |
Extract table of contents | catalog <book-id> |
outline |
Extract AI-generated outline | outline <book-id> |
Outline Command Options:
| Option | Type | Default | Description |
|---|---|---|---|
--chapter |
int | - | Extract outline for specific chapter only |
--output |
string | - | Export outlines to a Markdown file (e.g., --output outline.md) |
Examples:
# Get all outlines (JSON format)
node dist/main.js outline 2d2325a0813abb3e8g015d29
# Get specific chapter outline
node dist/main.js outline 2d2325a0813abb3e8g015d29 --chapter 45
# Export to Markdown file
node dist/main.js outline 2d2325a0813abb3e8g015d29 --output outline.md| Option | Type | Default | Description |
|---|---|---|---|
--limit |
int | 20 | Maximum number of books to retrieve |
--verbose |
boolean | false | Show debug information (scrolling, group expansion, etc.) |
Features:
- Automatically expands book groups/archives and extracts books within
- Preserves original bookshelf order
- Supports lazy loading for large bookshelves
- Returns flat list with
archivefield indicating group membership
# Watch mode
npm run dev
# Type checking
npm run typecheck
# Rebuild
npm run build- This tool is for educational purposes only
- Please respect the terms of service of reading platforms
- Do not use for commercial purposes
- Keep the browser window visible during execution - Lazy loading requires the window to be rendered (minimizing may cause issues)
- Book groups/archives will be automatically expanded, adding ~3 seconds per group
MIT