npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@readwise/cli

v0.5.0

Published

Command-line interface for Readwise and Reader

Readme

readwise

A command-line interface for Readwise and Reader. Search your highlights, manage your reading list, tag and organize documents — all from the terminal.

Commands are auto-discovered from the Readwise API, so the CLI stays up to date as new features are added.

Install

npm install -g @readwise/cli

Setup

Interactive login (opens browser)

readwise login

Access token login (for scripts/CI)

Get your token from readwise.io/access_token, then:

readwise login-with-token
# prompts for token (hidden input, not stored in shell history)

You can also pipe the token in:

echo "$READWISE_TOKEN" | readwise login-with-token

Credentials are stored in ~/.readwise-cli.json. OAuth tokens refresh automatically.

Commands

Run readwise --help to see all available commands, or readwise <command> --help for details on a specific command.

Search documents

readwise reader-search-documents --query "machine learning"
readwise reader-search-documents --query "react" --category-in article
readwise reader-search-documents --query "notes" --location-in shortlist --limit 5
readwise reader-search-documents --query "physics" --published-date-gt 2024-01-01

Search highlights

readwise readwise-search-highlights --vector-search-term "spaced repetition"

List and inspect documents

readwise reader-list-documents --limit 5
readwise reader-list-documents --category article --location later
readwise reader-list-documents --tag "to-review"
readwise reader-get-document-details --document-id <document-id>
readwise reader-get-document-highlights --document-id <document-id>

Tip: seen vs unseen documents. In the response, firstOpenedAt: null means the document is unseen (never opened). A non-null firstOpenedAt means it has been opened/seen. Use reader-edit-document-metadata --seen true to mark a document as seen.

Save a document

readwise reader-create-document --url "https://example.com/article"
readwise reader-create-document \
  --url "https://example.com" \
  --title "My Article" \
  --tags "reading-list,research" \
  --notes "Found via HN"

Organize

# Tags
readwise reader-list-tags
readwise reader-add-tags-to-document --document-id <id> --tag-names "important,review"
readwise reader-remove-tags-from-document --document-id <id> --tag-names "old-tag"

# Move between locations (new/later/shortlist/archive)
readwise reader-move-document --document-id <id> --location archive

# Edit metadata
readwise reader-edit-document-metadata --document-id <id> --title "Better Title"
readwise reader-edit-document-metadata --document-id <id> --seen true  # mark as seen/opened
readwise reader-set-document-notes --document-id <id> --notes "Updated notes"

Highlight management

readwise reader-add-tags-to-highlight --document-id <id> --highlight-document-id <id> --tag-names "key-insight"
readwise reader-remove-tags-from-highlight --document-id <id> --highlight-document-id <id> --tag-names "old-tag"
readwise reader-set-highlight-notes --document-id <id> --highlight-document-id <id> --notes "This connects to..."

Export

readwise reader-export-documents
readwise reader-export-documents --since-updated "2024-06-01T00:00:00Z"

Options

| Flag | Description | |------|-------------| | --json | Output raw JSON (for piping to jq, scripts, etc.) | | --refresh | Force-refresh the command list from the server | | --help | Show all commands or command-specific options |

Examples

Pipe results to jq:

readwise reader-list-documents --limit 3 --json | jq '.results[].title'

How it works

The CLI connects to the Readwise MCP server internally, auto-discovers available tools, and exposes each one as a CLI command. The tool list is cached locally for 24 hours.

Development

git clone https://github.com/readwise/readwise-cli && cd readwise-cli
npm install
npm run build

# Run without building
npx tsx src/index.ts --help