@tacone/prosey 0.2.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/README.md +59 -39
- package/bin/prosey +17196 -15426
- package/package.json +2 -1
- package/src/config-resolve.test.ts +104 -0
- package/src/config-resolve.ts +17 -0
- package/src/config.test.ts +3 -1
- package/src/config.ts +26 -17
- package/src/default-config.toml +39 -11
- package/src/extract-chapters.test.ts +229 -0
- package/src/extract-chapters.ts +66 -0
- package/src/html.test.ts +25 -0
- package/src/html.ts +141 -0
- package/src/index.test.ts +12 -0
- package/src/index.ts +277 -11
- package/src/summarize.test.ts +74 -3
- package/src/summarize.ts +18 -4
package/README.md
CHANGED
|
@@ -1,19 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/prosey-logo.svg" alt="Prosey logo" width="400"/>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">Prosey</h1>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
**Prosey** is a CLI tool to download and display video transcriptions from YouTube, so you can get the information you're looking for without wasting hours.
|
|
8
|
+
|
|
9
|
+
The main use cases are:
|
|
10
|
+
|
|
11
|
+
- **Summarize** a YouTube video and display it in the CLI with a single command (quicker).
|
|
12
|
+
- **Read** video captions, formatted and organized in chapters like the original video (often needs more time).
|
|
13
|
+
|
|
14
|
+
Both uses need an AI assistant on your system (default: [opencode](https://opencode.ai/), use `prosey config` to configure your own).
|
|
15
|
+
|
|
16
|
+
If we detect a syntax highlighter on your system, you'll get a nice colored output.
|
|
17
|
+
|
|
18
|
+
Prosey can also output or store the native json format verbatim.
|
|
6
19
|
|
|
7
20
|
## Features
|
|
8
21
|
|
|
9
|
-
| Feature
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
22
|
+
| Feature | Description |
|
|
23
|
+
| ------------------------------------------ | ----------------------------------------------------------------------------------------------- |
|
|
24
|
+
| **💡 Summarize** | Fetch and summarize a video transcription |
|
|
25
|
+
| **📖 Read** | Fetch and display the transcript formatted in Markdown |
|
|
26
|
+
| **📋 Transcript download** | Fetch YouTube transcripts as plain text or JSON verbatim |
|
|
27
|
+
| **🤖 AI summarization** | Pipe transcripts to any AI agent (opencode, Claude, Copilot, Codex) |
|
|
28
|
+
| **🎨 Smart pager** | Automatic syntax highlighting if bat, glow or mdcat are installed (or configure your own pager) |
|
|
29
|
+
| **🛠️ Customization** | Use `prosey config` to access and edit your configuration / customize the prompts |
|
|
30
|
+
| **💾 Disk caching** | Transcripts and summaries are cached on disk for instant re-read |
|
|
31
|
+
| **📄 Supported formats** | Plain text and JSON |
|
|
17
32
|
|
|
18
33
|
## Quickstart
|
|
19
34
|
|
|
@@ -44,7 +59,7 @@ Then use it anywhere:
|
|
|
44
59
|
prosey 771PQEDeRmw
|
|
45
60
|
```
|
|
46
61
|
|
|
47
|
-
### From
|
|
62
|
+
### From Source
|
|
48
63
|
|
|
49
64
|
Uses **[Bun](https://bun.sh)** for development — scripts, package management,
|
|
50
65
|
and running the TypeScript source directly.
|
|
@@ -56,60 +71,65 @@ bun install
|
|
|
56
71
|
bun run start -- 771PQEDeRmw
|
|
57
72
|
```
|
|
58
73
|
|
|
59
|
-
### Prebuilt binary
|
|
60
|
-
|
|
61
|
-
Grab a compiled binary from the `dist/` directory (requires no runtime).
|
|
62
|
-
|
|
63
74
|
## Usage
|
|
64
75
|
|
|
65
76
|
```
|
|
66
77
|
prosey [options] <video-url-or-id>
|
|
78
|
+
prosey read [options] <video-url-or-id>
|
|
67
79
|
prosey info [options] <video-url-or-id>
|
|
68
80
|
prosey summarize [options] <video-url-or-id>
|
|
69
81
|
prosey config
|
|
82
|
+
prosey help
|
|
70
83
|
```
|
|
71
84
|
|
|
72
|
-
|
|
73
|
-
|
|
85
|
+
`summarize` is the default command, so `prosey <id>` runs the AI summarizer.
|
|
86
|
+
Use `prosey read <id>` to download and print a richly formatted transcript.
|
|
74
87
|
|
|
75
88
|
The `summarize` command fetches a transcript, prepends the prompt from the
|
|
76
|
-
`[summarize]` config section, and pipes the result to the configured command.
|
|
89
|
+
`[summarize]` config section, and pipes the result to the configured AI command.
|
|
90
|
+
|
|
91
|
+
The `read` command downloads the transcript and prints it to stdout (plain text,
|
|
92
|
+
markdown, or JSON). This is useful when you don't need AI processing.
|
|
93
|
+
|
|
94
|
+
The `info` command shows video metadata (title, channel, duration, views).
|
|
77
95
|
|
|
78
96
|
The `config` command opens your config file in `$EDITOR` for editing. If
|
|
79
97
|
`$EDITOR` is not set, the config file path is printed.
|
|
80
98
|
|
|
99
|
+
The `help` command shows the help message, same as `--help`.
|
|
100
|
+
|
|
81
101
|
### Examples
|
|
82
102
|
|
|
83
103
|
```bash
|
|
84
|
-
#
|
|
104
|
+
# Summarize (AI summary + formatting + syntax highlighting)
|
|
85
105
|
prosey 771PQEDeRmw
|
|
86
106
|
|
|
87
|
-
#
|
|
88
|
-
prosey
|
|
107
|
+
# Summarize (same as above)
|
|
108
|
+
prosey summarize 771PQEDeRmw
|
|
89
109
|
|
|
90
|
-
#
|
|
91
|
-
prosey 771PQEDeRmw
|
|
110
|
+
# Transcribe (AI summary + formatting + syntax highlighting)
|
|
111
|
+
prosey read 771PQEDeRmw
|
|
92
112
|
|
|
93
|
-
#
|
|
94
|
-
prosey 771PQEDeRmw
|
|
113
|
+
# Show video metadata
|
|
114
|
+
prosey info 771PQEDeRmw
|
|
95
115
|
|
|
96
|
-
#
|
|
97
|
-
prosey
|
|
116
|
+
# Edit config in $EDITOR
|
|
117
|
+
prosey config
|
|
98
118
|
|
|
99
|
-
#
|
|
100
|
-
prosey 771PQEDeRmw --
|
|
119
|
+
# List available languages
|
|
120
|
+
prosey read https://youtu.be/771PQEDeRmw --list
|
|
101
121
|
|
|
102
|
-
#
|
|
103
|
-
prosey 771PQEDeRmw --
|
|
122
|
+
# Specify language
|
|
123
|
+
prosey read https://youtu.be/771PQEDeRmw --lang es
|
|
104
124
|
|
|
105
|
-
#
|
|
106
|
-
prosey
|
|
125
|
+
# Display JSON (no AI transcription)
|
|
126
|
+
prosey read 771PQEDeRmw
|
|
107
127
|
|
|
108
|
-
#
|
|
109
|
-
prosey
|
|
128
|
+
# Display plain text (no AI transcription)
|
|
129
|
+
prosey read 771PQEDeRmw
|
|
110
130
|
|
|
111
|
-
#
|
|
112
|
-
prosey
|
|
131
|
+
# Save transcript to file
|
|
132
|
+
prosey read 771PQEDeRmw -o transcript.txt
|
|
113
133
|
```
|
|
114
134
|
|
|
115
135
|
## Options
|
|
@@ -121,7 +141,7 @@ prosey config
|
|
|
121
141
|
| `--list` | List available transcript languages for the video, then exit. |
|
|
122
142
|
| `-o`, `--output <path>` | Write output to file instead of stdout. |
|
|
123
143
|
| `--json` | Output transcript as a JSON array. Each item includes `text`, `offset` (seconds), `duration`, and `timestamp`. |
|
|
124
|
-
| `--text` | Output as plain text (default).
|
|
144
|
+
| `--text` | Output as plain text (default for `prosey read`). |
|
|
125
145
|
| `--details` | Prepend video details (title, channel, duration, views, description) to the transcript (default). |
|
|
126
146
|
| `--no-details` | Suppress video details, transcript only. |
|
|
127
147
|
| `--no-decode-entities` | Preserve raw HTML entities (e.g. `'`). Decoded by default in text mode. |
|