@jarkkojs/readseek 0.7.6 → 0.7.8
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 +46 -63
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# readseek
|
|
2
2
|
|
|
3
|
-
`readseek`
|
|
4
|
-
It
|
|
5
|
-
|
|
3
|
+
`readseek` reads source files and PDFs for scripts, editors, and coding agents.
|
|
4
|
+
It returns compact JSON with stable line/hash anchors, symbol maps, parse diagnostics,
|
|
5
|
+
AST matches, references, and rename plans.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
Install the npm wrapper
|
|
9
|
+
Install the npm wrapper with a prebuilt binary:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
12
|
npm install -g @jarkkojs/readseek
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Or install the native program from crates.io:
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
18
|
cargo install readseek
|
|
@@ -27,18 +27,12 @@ To build and install from source:
|
|
|
27
27
|
make install
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Source builds require CMake, Clang/libclang, and a C++ compiler because image
|
|
31
|
-
inference uses `llama-cpp-2`.
|
|
32
|
-
|
|
33
|
-
GPU acceleration can be enabled at build time with the `metal`, `opencl`, `rocm`,
|
|
34
|
-
or `vulkan` Cargo feature. CPU builds can enable `openmp` for OpenMP parallelism.
|
|
35
|
-
|
|
36
30
|
## Plugins
|
|
37
31
|
|
|
38
32
|
### Pi extension
|
|
39
33
|
|
|
40
|
-
The bundled [pi-readseek extension](packages/pi-readseek/README.md)
|
|
41
|
-
|
|
34
|
+
The bundled [pi-readseek extension](packages/pi-readseek/README.md) adds ReadSeek's
|
|
35
|
+
anchored file and structural-code tools to Pi:
|
|
42
36
|
|
|
43
37
|
```sh
|
|
44
38
|
pi install npm:pi-readseek
|
|
@@ -46,10 +40,8 @@ pi install npm:pi-readseek
|
|
|
46
40
|
|
|
47
41
|
### OpenCode plugin
|
|
48
42
|
|
|
49
|
-
The [opencode-readseek plugin](packages/opencode-readseek/README.md)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Add the plugin to `opencode.json`:
|
|
43
|
+
The [opencode-readseek plugin](packages/opencode-readseek/README.md) adds the same
|
|
44
|
+
tools to OpenCode. Add it to `opencode.json`:
|
|
53
45
|
|
|
54
46
|
```json
|
|
55
47
|
{
|
|
@@ -59,9 +51,13 @@ Add the plugin to `opencode.json`:
|
|
|
59
51
|
|
|
60
52
|
### Vim plugin
|
|
61
53
|
|
|
62
|
-
The bundled
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
The bundled `readseek.vim` plugin provides anchored reads, structural navigation,
|
|
55
|
+
parse diagnostics, search, references, and renames. It requires Vim9 with `+job`,
|
|
56
|
+
`+channel`, `+popupwin`, and `+textprop`; Neovim is not supported.
|
|
57
|
+
|
|
58
|
+
Install it with a Vim plugin manager, such as `Plug 'jarkkojs/readseek'`, then run
|
|
59
|
+
`:ReadSeekInstall` to install the matching prebuilt binary. Downloads are explicit
|
|
60
|
+
by default.
|
|
65
61
|
|
|
66
62
|
## Common commands
|
|
67
63
|
|
|
@@ -80,16 +76,15 @@ readseek search src 'fn $NAME() { $$$BODY }' --language rust
|
|
|
80
76
|
readseek rename src/main.rs --line 42 --column 8 --to renamed
|
|
81
77
|
```
|
|
82
78
|
|
|
83
|
-
|
|
84
|
-
the command:
|
|
79
|
+
Global options must precede the command. For example, write JSON to a file with:
|
|
85
80
|
|
|
86
81
|
```sh
|
|
87
82
|
readseek --output result.json detect src/main.rs
|
|
88
83
|
```
|
|
89
84
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
Prefix a target with `stdin:` to analyze an unsaved buffer while retaining a path
|
|
86
|
+
for language detection and cursor addressing. This works with `detect`, `read`,
|
|
87
|
+
`map`, `check`, `symbol`, and `identify`:
|
|
93
88
|
|
|
94
89
|
```sh
|
|
95
90
|
printf '%s\n' 'fn main() {}' | readseek identify stdin:scratch.rs:1 --column 4
|
|
@@ -97,8 +92,8 @@ printf '%s\n' 'fn main() {}' | readseek identify stdin:scratch.rs:1 --column 4
|
|
|
97
92
|
|
|
98
93
|
## Images and PDFs
|
|
99
94
|
|
|
100
|
-
`detect` reports image metadata and PDF page counts. `read` returns bounded
|
|
101
|
-
|
|
95
|
+
`detect` reports image metadata and PDF page counts. `read` returns bounded base64
|
|
96
|
+
images by default; select local analysis with `--image`:
|
|
102
97
|
|
|
103
98
|
```sh
|
|
104
99
|
readseek read photo.jpg # default: bounded base64 image
|
|
@@ -108,55 +103,46 @@ readseek read photo.jpg --image ocr # extracted text
|
|
|
108
103
|
readseek read photo.jpg --image all # caption, objects, and OCR in one pass
|
|
109
104
|
```
|
|
110
105
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
objects:
|
|
106
|
+
Vision analysis uses the `balanced` profile by default. Choose `fast` for lower
|
|
107
|
+
latency or `accurate` for dense OCR and small objects:
|
|
114
108
|
|
|
115
109
|
```sh
|
|
116
110
|
readseek read photo.jpg --image caption --vision-profile fast
|
|
117
111
|
readseek read scan.png --image ocr --vision-profile accurate
|
|
118
112
|
```
|
|
119
113
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
iterations (currently image files only):
|
|
114
|
+
`--vision-diagnostics` writes cache status, devices, token counts, timings,
|
|
115
|
+
throughput, and peak RSS as JSON to stderr. `--vision-benchmark N` runs one warmup
|
|
116
|
+
and `N` measured iterations for an image file:
|
|
124
117
|
|
|
125
118
|
```sh
|
|
126
119
|
readseek read fixture.png --image all --vision-benchmark 5 \
|
|
127
120
|
>result.json 2>benchmark.json
|
|
128
121
|
```
|
|
129
122
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
and the micro-batch cannot exceed the logical batch. Compare overrides on a fixed
|
|
133
|
-
representative image corpus; larger batches can improve prefill while increasing
|
|
134
|
-
peak memory.
|
|
123
|
+
Set `READSEEK_VISION_THREADS` to a positive integer to override Rayon's worker
|
|
124
|
+
count. More workers may improve throughput at the cost of CPU and memory.
|
|
135
125
|
|
|
136
|
-
PDF reads return page-tagged Markdown and
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
depth. Line/hash suffixes, `--end`, `--limit`, and `--language` do not apply to
|
|
141
|
-
visual files.
|
|
126
|
+
PDF reads return page-tagged Markdown and embedded images. Use `--page` to select a
|
|
127
|
+
page; `--image` applies to each embedded image. After `readseek init`, `view` creates
|
|
128
|
+
or reuses a structural PDF index that can be narrowed by page, node, kind, or depth.
|
|
129
|
+
Line/hash suffixes, `--end`, `--limit`, and `--language` do not apply to visual files.
|
|
142
130
|
|
|
143
|
-
The Qwen3-VL
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
build; CPU-only captioning can still take substantial time.
|
|
131
|
+
The Qwen3-VL-2B Q8_0 model and multimodal projector download lazily to the user
|
|
132
|
+
cache and are checksum-verified. Inference uses ReadSeek's built-in CPU engine and
|
|
133
|
+
can be slow.
|
|
147
134
|
|
|
148
135
|
## Cache
|
|
149
136
|
|
|
150
|
-
`readseek init [path]` creates
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
under the `.readseek/` found from the current working directory. Cache entries are profile-specific.
|
|
137
|
+
`readseek init [path]` creates `.readseek/maps/` and `.readseek/def-index/`.
|
|
138
|
+
Map-dependent commands update them on demand and find `.readseek/` by walking up
|
|
139
|
+
from the target; `--readseek-dir` selects one explicitly. PDF indexes and extracted
|
|
140
|
+
assets live in `.readseek/documents/`, while image analysis results are cached under
|
|
141
|
+
`.readseek/vision/`. Image cache entries are profile-specific.
|
|
156
142
|
|
|
157
143
|
## Documentation
|
|
158
144
|
|
|
159
|
-
|
|
145
|
+
For the complete CLI reference:
|
|
160
146
|
|
|
161
147
|
```sh
|
|
162
148
|
man ./man/man1/readseek.1
|
|
@@ -166,10 +152,7 @@ Pass `--help` to any command for command-specific usage.
|
|
|
166
152
|
|
|
167
153
|
## Licensing
|
|
168
154
|
|
|
169
|
-
The native `readseek` crate is licensed under `LGPL-2.1-or-later`. The
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
The downloaded `Qwen/Qwen3-VL-2B-Instruct-GGUF` model is licensed under
|
|
175
|
-
`Apache-2.0`.
|
|
155
|
+
The native `readseek` crate is licensed under `LGPL-2.1-or-later`. The npm wrapper
|
|
156
|
+
and platform packages declare `Apache-2.0 AND LGPL-2.1-or-later`; plugin licenses
|
|
157
|
+
are listed in their package directories. The downloaded Qwen model is licensed
|
|
158
|
+
under `Apache-2.0`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jarkkojs/readseek",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "A structural read command",
|
|
5
5
|
"license": "Apache-2.0 AND LGPL-2.1-or-later",
|
|
6
6
|
"homepage": "https://github.com/jarkkojs/readseek#readme",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"LICENSE-LGPL-2.1"
|
|
22
22
|
],
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@jarkkojs/readseek-darwin-arm64": "0.7.
|
|
25
|
-
"@jarkkojs/readseek-linux-arm64": "0.7.
|
|
26
|
-
"@jarkkojs/readseek-linux-x64": "0.7.
|
|
27
|
-
"@jarkkojs/readseek-win32-x64": "0.7.
|
|
24
|
+
"@jarkkojs/readseek-darwin-arm64": "0.7.8",
|
|
25
|
+
"@jarkkojs/readseek-linux-arm64": "0.7.8",
|
|
26
|
+
"@jarkkojs/readseek-linux-x64": "0.7.8",
|
|
27
|
+
"@jarkkojs/readseek-win32-x64": "0.7.8"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|