ReadPilot is a local-first AI reading workspace for EPUBs, notes, and Claude-assisted companion pages.
It is not designed to summarize an entire book in one pass. ReadPilot is built for serious reading: import a book, read chapter by chapter, ask questions in context, keep notes locally, and generate focused interactive companion pages as your reading progresses.
Generated with safe demo data. No private books, notes, or chat logs are shown.
- Readers who want to understand long books instead of only collecting summaries
- Developers exploring AI-assisted reading, local knowledge workspaces, and book-aware agents
- Claude Code users who want a concrete desktop-style workflow around the Claude Agent SDK
- Builders experimenting with EPUB import, local-first data, and generated HTML study material
- Local library: import EPUBs and keep book files, source chunks, generated pages, and
progress.jsonunder local data directories - Reading workspace: central book Hub, chapter timeline, preserved EPUB-style reading pages, notes, and companion page entry points
- Claude ChatPanel: uses
@anthropic-ai/claude-agent-sdkto talk to Claude Code with streaming output, Markdown rendering, tool activity hints, and token usage feedback - Companion page generation: the bundled
reading-companionskill turns explicit page-generation requests into focused HTML pages - Optional WeRead integration: bind local books to WeChat Reading / WeRead, sync highlights, thoughts, progress, and reading stats, then pass that reader-side memory into the companion chat
- Local persistence: SQLite stores chats and notes; book content and generated artifacts stay on disk
- Progressive workflow: ordinary Q&A stays in ChatPanel; only explicit "generate a page" requests enter the companion page workflow
- Install Node.js, Python, and Claude Code.
- Start ReadPilot locally and open the library.
- Import an EPUB. ReadPilot writes book data under
data/books/<book-slug>/. - Read chapters in the center workspace.
- Ask ordinary questions in ChatPanel.
- Ask explicitly for a companion page only when you want a durable HTML artifact.
For the full walkthrough, see docs/USAGE.md.
ReadPilot/
src/ # Next.js app, API routes, UI, state, DB/file/Claude logic
scripts/ # EPUB converter and helper scripts
skills/ # Canonical Claude Code skill entry points
docs/ # Setup, usage, structure, references, screenshots
data/ # Local runtime data, ignored except data/.gitkeep
Runtime book data is created under:
data/books/<book-slug>/
source.epub
source.jsonl
source-manifest.json
progress.json
companion/
pages/
For the full tree and privacy boundaries, see docs/PROJECT_STRUCTURE.md.
- Next.js 16 App Router
- React 19 + TypeScript
- Tailwind CSS v4 + Base UI / shadcn-style components
- Zustand
- better-sqlite3
- Claude Agent SDK / Claude Code
- Python EPUB converter using
ebooklibandbeautifulsoup4
Requirements:
- Node.js 20 or newer
- npm
- Python 3.10 or newer
- Claude Code CLI, with the
claudecommand available in your terminal
Install dependencies:
npm install
pip install ebooklib beautifulsoup4Prepare local configuration:
cp .env.example .env.localStart the development server:
npm run devThen open http://localhost:3000.
ReadPilot works through your local Claude Code / Claude Agent SDK environment. First confirm that Claude Code is available:
claude --versionOfficial resources:
- Claude Code overview: https://docs.anthropic.com/en/docs/claude-code/overview
- Claude Code setup: https://docs.anthropic.com/en/docs/claude-code/setup
- Claude Code SDK: https://docs.anthropic.com/en/docs/claude-code/sdk
- Claude Agent SDK npm package: https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk
Common npm installation:
npm install -g @anthropic-ai/claude-codeIf your environment uses an API key, configure it through the official Claude Code or Anthropic flow and do not commit secrets. On Windows, if Claude Code needs Git Bash, set CLAUDE_CODE_GIT_BASH_PATH in .env.local.
The WeRead integration is optional and mainly useful for readers who use WeChat Reading / WeRead.
- Open the WeRead Skill console and get a personal API key: https://i.weread.qq.com/skills/agent
- Open ReadPilot's
/settingspage, enter the key that starts withwrk-, and test the connection. - Go back to the library, click the link icon on a book card, search for the matching WeRead book, and bind it.
- After binding, chapter notes can show WeRead highlights, and ChatPanel can receive those reader-side context signals when the current book is bound.
WeRead data is cached in local SQLite. Do not commit data/readpilot.db* to a public repository.
ReadPilot stores runtime data in data/ by default:
data/books/: imported books, EPUB sources, chapter JSONL, generated HTML companion pages, andprogress.jsondata/readpilot.db: local chats, notes, bindings, and other SQLite state.env.local: local environment variables and possible secrets
These files should not be committed to a public repository. Before publishing, make sure you are not including private books, databases, chat logs, API keys, or generated pages that contain copyrighted source text.
npm run dev # local development
npm run build # production build
npm run start # start production build
npm run lint # ESLint
npm run test # VitestThis repository includes Claude Code skill templates for the companion reading workflow:
- English: skills/reading-companion/SKILL.md
- Chinese: skills/reading-companion-zh/SKILL.md
The skill is intentionally narrow: it should generate or update companion pages only when the user explicitly asks for a page. Ordinary explanations, summaries, quiz questions, and lightweight Q&A should stay in chat.
Generated-page design, template, schema, and methodology references live in docs/references. They are reference material only; the canonical skill files live under skills/.
The detailed companion-page methodology lives in docs/references/companion-methodology.md. It is not a second skill entry point.
If you publish demos, use your own text or public-domain text as examples. Avoid publishing copyrighted book excerpts.
- Setup currently in Chinese
- Usage journey currently in Chinese
- Project structure currently in Chinese
- Dependencies currently in Chinese
- Companion page references currently in Chinese
- Contributing
- Security and privacy
- Third-party notices
ReadPilot is released under the MIT License.


