@jarkkojs/readseek-api
@jarkkojs/readseek-api
Shared ReadSeek contracts, validation, argument builders, binary resolution, and bounded Node/Bun process runners.
Install
npm install @jarkkojs/readseek-api
@jarkkojs/readseek installs the optional platform binary and provides the
readseek CLI. Linux packages supply bin/readseek.AppImage; macOS and Windows
supply native executables. The CLI and Node/Bun runners set
APPIMAGE_EXTRACT_AND_RUN=1 for Linux child processes, so FUSE is not required.
Custom process launchers should pass readSeekProcessEnvironment() as their
child environment. Installing the API also installs @jarkkojs/readseek and its
platform binary; plugins declare both packages directly.
Example
import {
buildInspectArgs,
resolveReadSeekBinaryFromPackages,
resolveReadSeekBinaryOverride,
runReadSeekNodeKdl,
} from "@jarkkojs/readseek-api";
const binary =
resolveReadSeekBinaryOverride() ?? resolveReadSeekBinaryFromPackages();
const args = buildInspectArgs({ path: "src/index.ts", select: "map" });
const result = await runReadSeekNodeKdl(binary, args);
For PDF assets, buildExtractArgs requires an asset:ID selector and destination
file path. It rejects "-" as the destination so binary data is never returned
on stdout.
Licensing
@jarkkojs/readseek-api is licensed under the Apache 2.0 license. See
LICENSE for more information.