threadlens
v1.2.2
Published
Local search for your coding-agent sessions across Codex, Claude Code, Cursor, and more.
Downloads
1,159
Maintainers
Readme
threadlens (npm)
Local cross-harness search for coding-agent sessions.
npm install -g threadlens
threadlens search "plunk otp"
threadlens skillOr run once without installing:
npx threadlens search "plunk otp"How it works
This package ships a tiny JS shim (bin/threadlens.js) with no vendored Python.
Installing it pulls in the matching pre-built native binary via npm's
optionalDependencies mechanism — exactly the way esbuild distributes its binary.
| Platform | Package pulled |
|---|---|
| macOS arm64 | @moinulmoin/threadlens-darwin-arm64 |
| Linux x64 (glibc) | @moinulmoin/threadlens-linux-x64-gnu |
The binary is a self-contained PyInstaller onedir bundle — no Python required on the host machine.
Requirements
- Node.js 16+ (for the shim)
- One of the supported platforms above
- No Python required
Override / escape hatches
Point at a custom binary:
THREADLENS_BINARY=/path/to/threadlens threadlens search "..."Installed with --omit=optional? The shim will print a clear error. Fix it:
npm install -g threadlens # re-install without --omit=optionalUnsupported platform or prefer Python?
uv tool install threadlens # installs from PyPI, brings its own Python
uvx threadlens search "..." # run without installingOr download a release archive directly from https://github.com/moinulmoin/threadlens/releases.
Binary resolution order
THREADLENS_BINARYenvironment variable (if set, used verbatim)- Platform lookup:
${process.platform}-${process.arch}→ scoped package name require.resolve('<pkg>/package.json')to locate the package directory- Execute
<pkgDir>/bin/threadlens/threadlenswith all args forwarded
If step 2 or 3 fails, the shim exits 127 with a diagnostic message.
Development
# Regenerate platform package scaffolds and sync version from threadlens/__init__.py
node scripts/sync.mjs
# Run the shim unit tests (no binaries needed)
node --test npm/test/shim.test.mjsSee the project README for full usage and source.
