readshell-pro 0.3.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/novel.js ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ // readshell-pro 的最后一个版本:只提示迁移到免费开源的 readshell。
3
+ // 本地阅读数据与 readshell 共用同一目录,迁移后原样保留。
4
+ const zh = !/^en/i.test(process.env.LANG ?? '');
5
+
6
+ const msg = zh
7
+ ? `
8
+ ReadShell 现已完全免费开源(MIT),Pro 版已并入 readshell。
9
+
10
+ npm uninstall -g readshell-pro && npm install -g readshell
11
+
12
+ 你的书架、进度和书签保存在本地,迁移后原样保留。
13
+ 跨设备同步改为“同步文件夹”:novel sync --dir <iCloud/Dropbox 等目录>
14
+ 详情:https://readshell.com/docs
15
+ `
16
+ : `
17
+ ReadShell is now completely free and open source (MIT); Pro has been merged into readshell.
18
+
19
+ npm uninstall -g readshell-pro && npm install -g readshell
20
+
21
+ Your library, progress and bookmarks are stored locally and are kept as-is.
22
+ Cross-device sync now uses a sync folder: novel sync --dir <iCloud/Dropbox folder>
23
+ Details: https://readshell.com/docs
24
+ `;
25
+
26
+ process.stdout.write(msg);
27
+ process.exit(1);
package/package.json CHANGED
@@ -1,68 +1,20 @@
1
1
  {
2
2
  "name": "readshell-pro",
3
- "version": "0.3.6",
4
- "description": "终端内低打断轻阅读工具(含云同步)· CLI Reading Tool for Developers with Cloud Sync",
3
+ "version": "0.4.0",
4
+ "description": "ReadShell 已完全免费开源并并入 readshell:npm uninstall -g readshell-pro && npm i -g readshell",
5
5
  "type": "module",
6
- "main": "dist/index.js",
7
6
  "bin": {
8
- "novel": "bin/readshell.js"
9
- },
10
- "publishConfig": {
11
- "access": "public"
7
+ "novel": "bin/novel.js"
12
8
  },
13
9
  "files": [
14
- "dist",
15
10
  "bin"
16
11
  ],
17
- "scripts": {
18
- "dev": "tsup src/index.ts --watch --onSuccess 'node dist/index.js'",
19
- "build": "tsup",
20
- "test": "vitest run",
21
- "test:watch": "vitest",
22
- "lint": "eslint src/ --ext .ts,.tsx",
23
- "format": "prettier --write 'src/**/*.{ts,tsx}'"
12
+ "publishConfig": {
13
+ "access": "public"
24
14
  },
25
- "keywords": [
26
- "cli",
27
- "terminal",
28
- "reader",
29
- "tui",
30
- "novel",
31
- "ebook",
32
- "epub",
33
- "txt",
34
- "reading"
35
- ],
36
- "author": "",
37
- "license": "AGPL-3.0",
15
+ "homepage": "https://readshell.com",
16
+ "license": "MIT",
38
17
  "engines": {
39
18
  "node": ">=18"
40
- },
41
- "dependencies": {
42
- "better-sqlite3": "^11.0.0",
43
- "chardet": "^2.0.0",
44
- "conf": "^13.0.0",
45
- "epub2": "^3.0.2",
46
- "html-to-text": "^9.0.5",
47
- "iconv-lite": "^0.6.3",
48
- "ink": "^5.1.0",
49
- "nanoid": "^5.0.9",
50
- "react": "^18.3.1",
51
- "yargs": "^17.7.2"
52
- },
53
- "devDependencies": {
54
- "@readshell/sync-client": "workspace:*",
55
- "@readshell/types": "workspace:*",
56
- "@types/better-sqlite3": "^7.6.12",
57
- "@types/html-to-text": "^9.0.4",
58
- "@types/react": "^18.3.12",
59
- "@types/yargs": "^17.0.33",
60
- "@typescript-eslint/eslint-plugin": "^8.0.0",
61
- "@typescript-eslint/parser": "^8.0.0",
62
- "eslint": "^8.57.0",
63
- "prettier": "^3.4.0",
64
- "tsup": "^8.3.0",
65
- "typescript": "^5.7.0",
66
- "vitest": "^2.1.0"
67
19
  }
68
20
  }
package/LICENSE DELETED
@@ -1,17 +0,0 @@
1
- GNU AFFERO GENERAL PUBLIC LICENSE
2
- Version 3, 19 November 2007
3
-
4
- Copyright (C) 2026 ReadShell
5
-
6
- This program is free software: you can redistribute it and/or modify
7
- it under the terms of the GNU Affero General Public License as published by
8
- the Free Software Foundation, either version 3 of the License, or
9
- (at your option) any later version.
10
-
11
- This program is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU Affero General Public License for more details.
15
-
16
- You should have received a copy of the GNU Affero General Public License
17
- along with this program. If not, see <https://www.gnu.org/licenses/>.
package/README.md DELETED
@@ -1,142 +0,0 @@
1
- [English](README.md) | [中文](README_zh.md)
2
-
3
- <div align="center">
4
-
5
- # ReadShell
6
-
7
- **Your terminal already has everything. Now it has a bookshelf.**
8
-
9
- [![npm version](https://img.shields.io/npm/v/readshell.svg)](https://www.npmjs.com/package/readshell)
10
- [![npm downloads](https://img.shields.io/npm/dm/readshell.svg)](https://www.npmjs.com/package/readshell)
11
- [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
12
- [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18-green.svg)](https://nodejs.org)
13
-
14
- *A low-friction reading tool for developers who never leave the terminal.*
15
-
16
- ![ReadShell Demo](./docs/demo.gif)
17
-
18
- </div>
19
-
20
- ---
21
-
22
- ## The Problem
23
-
24
- Waiting for a build to finish? Pipeline still running? You have 5 minutes.
25
-
26
- You open your phone. 40 minutes later, you're still scrolling.
27
-
28
- ReadShell is built for that gap — a reading space that lives inside your workflow, not outside it.
29
- ```bash
30
- novel resume
31
- ```
32
-
33
- One command. Back to where you were. Back to work when you're ready.
34
-
35
- ---
36
-
37
- ## Features
38
-
39
- **📖 `novel resume` — Zero-friction re-entry**
40
- The most important command. Picks up exactly where you left off, down to the byte.
41
-
42
- **🥷 Boss Key (`b` / `Esc`) — Instant disguise**
43
- One keypress transforms the reader into a convincing terminal error log. Your secret is safe.
44
- ![Boss Key Demo](./docs/error.png)
45
- *Boss Key wipes the scrollback buffer and shows a fake error. Use `novel resume` to instantly jump back when safe.*
46
-
47
- **⏱ Reading time estimate**
48
- Calibrated to your actual reading speed. Tells you if you have time for one more chapter.
49
-
50
- **🔖 Bookmarks (`m`)**
51
- Capture a passage mid-read. Revisit it later from the chapter navigator (`c`).
52
-
53
- **📚 Batch import**
54
- `novel import ~/books/` — recursively imports an entire folder of `.txt` and `.epub` files.
55
-
56
- **🌐 i18n**
57
- Native English and Chinese support.
58
-
59
- ---
60
-
61
- ## Quick Start
62
- ```bash
63
- npm install -g readshell
64
- ```
65
- ```bash
66
- # Import your books
67
- novel import ~/books/
68
-
69
- # Jump back in
70
- novel resume
71
-
72
- # Or pick a specific book
73
- novel open <book-id>
74
-
75
- # Browse your library
76
- novel list
77
- ```
78
-
79
- ### Reader Controls
80
-
81
- | Key | Action |
82
- |---|---|
83
- | `Space` / `j` / `↓` | Next page / scroll down |
84
- | `k` / `↑` | Previous page / scroll up |
85
- | `c` | Chapter list & bookmarks |
86
- | `Tab` | Toggle chapters / bookmarks |
87
- | `m` | Add bookmark |
88
- | `b` / `Esc` | **Boss Key** — disguise & save |
89
- | `q` | Quit & save |
90
- | `?` | Help |
91
-
92
- ### Configuration
93
- ```bash
94
- novel lang en # Set language (en / zh)
95
- novel config line-spacing 1 # Line spacing
96
- novel config reading-mode scroll # scroll or page
97
- novel update # Update to latest
98
- ```
99
-
100
- ---
101
-
102
- ## Why the terminal?
103
-
104
- The terminal is already where you live. It's focused, text-only, and distraction-resistant by nature.
105
-
106
- ReadShell doesn't ask you to context-switch. It sits quietly in your workflow — invisible to colleagues, zero install friction, no accounts, no cloud, no noise.
107
-
108
- Your reading history lives entirely on your local machine in a SQLite file. Nothing leaves your disk.
109
-
110
- ---
111
-
112
- ## Tech Stack
113
-
114
- - **TypeScript** + **Node.js** ≥ 18
115
- - **Ink** — React-based TUI framework
116
- - **SQLite** (`better-sqlite3`) — local-first, zero-dependency storage
117
- - **Vitest** — testing
118
-
119
- ## Project Structure
120
- ```
121
- src/
122
- ├── cli/ # Command layer
123
- ├── ui/ # TUI components (Ink)
124
- ├── services/ # Business logic
125
- ├── parsers/ # txt / epub parsers
126
- ├── db/ # SQLite layer
127
- ├── config/ # Config management
128
- └── utils/
129
- ```
130
-
131
- ---
132
-
133
- ## Contributing
134
-
135
- Issues, ideas, and PRs are welcome.
136
- If ReadShell fits into your workflow, a ⭐ helps more people find it.
137
-
138
- ---
139
-
140
- ## License
141
-
142
- [AGPL-3.0](LICENSE)
package/bin/readshell.js DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import('../dist/index.js');
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- #!/usr/bin/env node