dirsql is a TypeScript SDK that provides an ephemeral SQL index over a local directory using napi-rs bindings to a Rust core. It allows querying file contents with SQL by defining tables with glob patterns and extraction functions. Version 0.3.22 is stable, requires Node >=22, and ships with prebuilt binaries for Linux, macOS, and Windows. Key differentiators include zero Rust toolchain requirement for end users, hybrid JS/TS typing, and full SQL select support over file system data.
npm install dirsqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a DirSQL instance over a directory, defines a table from JSON files, and runs a SQL query.
Upgrade Node.js to version 22 or later.
Pin to a specific version and test upgrades carefully.
Verify that files exist and glob patterns are correct.
Install Rust via rustup if prebuilt binary is not available for your platform.
Run 'pnpm add dirsql' and use 'import { DirSQL } from 'dirsql''Use 'import { DirSQL } from 'dirsql'' instead of 'import DirSQL from 'dirsql'' or vice versa.Install Rust toolchain or use a supported platform (linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64).
Install Visual C++ Redistributable for Visual Studio 2015-2022.