$npx -y skills add readwiseio/readwise-skills --skill readwise-cliHow to use the Readwise CLI — access highlights, documents, and your entire reading library from the command line
| 1 | # Readwise CLI |
| 2 | |
| 3 | Use the `readwise` command to access the user's Readwise highlights and Reader documents. Readwise has two products: |
| 4 | |
| 5 | - **Readwise** — highlights from books, articles, podcasts, and more. Includes daily review and spaced repetition. |
| 6 | - **Reader** — a read-later app for saving and reading articles, PDFs, EPUBs, RSS feeds, emails, tweets, and videos. |
| 7 | |
| 8 | ## Setup |
| 9 | |
| 10 | If `readwise` is not installed: |
| 11 | ```bash |
| 12 | npm install -g @readwise/cli |
| 13 | ``` |
| 14 | |
| 15 | If not authenticated, ask the user for their Readwise access token (they can get one at https://readwise.io/access_token), then run: |
| 16 | ```bash |
| 17 | readwise login-with-token <token> |
| 18 | ``` |
| 19 | |
| 20 | ## Discovering Commands |
| 21 | |
| 22 | Every command supports `--help` for full option details: |
| 23 | ```bash |
| 24 | readwise --help |
| 25 | readwise reader-search-documents --help |
| 26 | readwise readwise-list-highlights --help |
| 27 | ``` |
| 28 | |
| 29 | Add `--json` to any command for machine-readable output. Use `--refresh` to force-refresh cached data. |
| 30 | |
| 31 | ## Reader Commands |
| 32 | |
| 33 | ### Searching documents |
| 34 | |
| 35 | ```bash |
| 36 | # Semantic search across all saved documents |
| 37 | readwise reader-search-documents --query "spaced repetition" |
| 38 | |
| 39 | # Search only articles saved for later |
| 40 | readwise reader-search-documents --query "machine learning" --category-in article --location-in later,shortlist |
| 41 | |
| 42 | # Search by author within the inbox |
| 43 | readwise reader-search-documents --query "AI" --author-search "Simon Willison" --location-in new |
| 44 | |
| 45 | # Search documents published after a date |
| 46 | readwise reader-search-documents --query "transformers" --published-date-gt 2024-01-01 |
| 47 | ``` |
| 48 | |
| 49 | ### Browsing documents |
| 50 | |
| 51 | ```bash |
| 52 | # List 10 most recent inbox items (minimal fields to save tokens) |
| 53 | readwise reader-list-documents --location new --limit 10 --response-fields title,author,summary,word_count,category,saved_at |
| 54 | |
| 55 | # List archived articles tagged "research" |
| 56 | readwise reader-list-documents --location archive --tag research --category article |
| 57 | |
| 58 | # List unseen documents in the inbox |
| 59 | readwise reader-list-documents --location new --seen false |
| 60 | |
| 61 | # List RSS feed items |
| 62 | readwise reader-list-documents --location feed --limit 20 --response-fields title,author,summary,site_name |
| 63 | |
| 64 | # Get a specific document by ID |
| 65 | readwise reader-list-documents --id <document_id> |
| 66 | ``` |
| 67 | |
| 68 | Locations: `new` (inbox), `later`, `shortlist`, `archive`, `feed`. When the user says "inbox", use `new`. |
| 69 | |
| 70 | ### Reading and highlighting |
| 71 | |
| 72 | ```bash |
| 73 | # Get full document content as Markdown |
| 74 | readwise reader-get-document-details --document-id <id> |
| 75 | |
| 76 | # Get all highlights on a document |
| 77 | readwise reader-get-document-highlights --document-id <id> |
| 78 | |
| 79 | # Highlight a passage (html-content must match the document's HTML exactly) |
| 80 | # Get the HTML first via reader-list-documents with --response-fields html_content |
| 81 | readwise reader-create-highlight --document-id <id> --html-content "<p>The exact passage to highlight</p>" |
| 82 | |
| 83 | # Highlight with a note and tags |
| 84 | readwise reader-create-highlight --document-id <id> --html-content "<p>Key insight</p>" --note "Connects to spaced repetition research" --tags review,concept |
| 85 | ``` |
| 86 | |
| 87 | ### Saving documents |
| 88 | |
| 89 | ```bash |
| 90 | # Save a URL — Reader scrapes it automatically |
| 91 | readwise reader-create-document --url "https://example.com/article" |
| 92 | |
| 93 | # Save with metadata |
| 94 | readwise reader-create-document --url "https://example.com" --title "Great Article" --tags research,ai --notes "Recommended by Alice" |
| 95 | |
| 96 | # Save raw Markdown content (provide a unique URL as identifier) |
| 97 | readwise reader-create-document --title "Meeting Notes" --markdown "# Notes from today..." --url "https://me.com#notes-march-2025" |
| 98 | ``` |
| 99 | |
| 100 | ### Organizing |
| 101 | |
| 102 | ```bash |
| 103 | # Move documents between locations (max 50 per call) |
| 104 | readwise reader-move-documents --document-ids <id1>,<id2> --location archive |
| 105 | readwise reader-move-documents --document-ids <id> --location later |
| 106 | |
| 107 | # Bulk mark documents as seen |
| 108 | readwise reader-bulk-edit-document-metadata --documents '[{"document_id": "<id>", "seen": true}]' |
| 109 | |
| 110 | # Bulk update metadata (title, author, tags, summary, etc.) |
| 111 | readwise reader-bulk-edit-document-metadata --documents '[{"document_id": "<id>", "title": "Better Title", "tags": ["ai", "research"]}]' |
| 112 | |
| 113 | # Tags |
| 114 | readwise reader-list-tags |
| 115 | readwise reader-add-tags-to-document --document-id <id> --tag-names important,research |
| 116 | readwise reader-remove-tags-from-document --document-id <id> --tag-names old-tag |
| 117 | |
| 118 | # Highlight tags and notes |
| 119 | readwise reader-add-tags-to-highlight --document-id <id> --highlight-document-id <hid> --tag-names concept |
| 120 | readwise reader-remove-tags-from-highlight --document-id <id> --highlight-document-id <hid> --tag-names old-tag |
| 121 | readwise reader-set-highlight-notes --document-id <id> --highlight-document-id <hid> --notes "Updated note" |
| 122 | ``` |
| 123 | |
| 124 | ### Exporting |
| 125 | |
| 126 | ```bash |
| 127 | # Export all documents as a ZIP of Markdown files (async) |
| 128 | readwise reader-export-documents |
| 129 | readwise reader-get-export-documents-status --export-id <id> |
| 130 | |
| 131 | # Delta export — only docs updated since last export |
| 132 | readwise reader-export-docume |