Skip to content

jarkkojs/readseek

Repository files navigation

readseek

readseek is a structural source reader for scripts, editors, and coding agents. It emits pretty-printed JSON with stable LINE:HASH anchors, structural symbol maps, parse diagnostics, AST search matches, references, and rename plans.

Install

Build the native binary from source:

cargo build --release

Or install the npm wrapper:

npm install -g @jarkkojs/readseek

Prebuilt binaries are available for macOS ARM64, Linux ARM64 and x64, and Windows x64. The Linux binaries are static glibc PIE executables.

Local builds require CMake, Clang/libclang, and a C++ compiler because image inference uses llama-cpp-2.

Pi extension

The bundled pi-readseek extension exposes ReadSeek's anchored file and structural-code tools in Pi:

pi install npm:pi-readseek

Common commands

readseek detect src/main.rs
readseek read src/main.rs:10 --end 20
readseek map src/main.rs
readseek check src/main.rs
readseek symbol src/main.rs:run --name
readseek identify src/main.rs:42 --column 8
readseek def src run --language rust --format plain
readseek refs src main --language rust --format plain
readseek search src 'fn $NAME() { $$$BODY }' --language rust
readseek rename src/main.rs --line 42 --column 8 --to renamed

To write JSON output to a file instead of stdout, place the global option before the command:

readseek --output result.json detect src/main.rs

Use a stdin: target prefix with detect, read, map, check, symbol, and identify to analyze unsaved editor buffers while still providing a path for language detection and a cursor address:

printf '%s\n' 'fn main() {}' | readseek identify stdin:scratch.rs:1 --column 4

Images and PDFs

detect reports image metadata and PDF page counts. read returns bounded base64 images by default; use --image for a local analysis mode:

readseek read photo.jpg                   # default: bounded base64 image
readseek read photo.jpg --image caption   # detailed natural-language caption
readseek read photo.jpg --image objects   # object labels + bounding boxes
readseek read photo.jpg --image ocr       # extracted text
readseek read photo.jpg --image all       # caption, objects, and OCR in one pass

PDF reads return page-tagged Markdown and page-associated embedded images. The same mode applies to each embedded image. Line/hash suffixes, --end, --limit, and --language do not apply to visual files.

The Qwen3-VL GGUF model and multimodal projector download lazily into the user cache and run through llama-cpp-2 on the CPU. Captioning can take substantial time.

Cache

readseek init [path] creates a .readseek/ directory containing map cache files under maps/ and definition-index shards under def-index/. Commands discover that directory by walking up from the target path, or use the directory passed by --readseek-dir.

Documentation

The manual page is the authoritative CLI reference:

man man/man1/readseek.1

Pass --help to any command for command-specific usage.

Licensing

readseek is licensed under LGPL-2.1-or-later. The JavaScript npm wrapper is licensed under Apache-2.0.

The downloaded Qwen/Qwen3-VL-2B-Instruct-GGUF model is licensed under Apache-2.0.

About

`readseek` is a structural read command

Resources

License

Apache-2.0, LGPL-2.1 licenses found

Licenses found

Apache-2.0
LICENSE-APACHE-2.0
LGPL-2.1
LICENSE-LGPL-2.1

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages