Skip to content
Search

Syntaqlite

lastmod 2026-04-24created 2026-04-242 edits

SQL parser, formatter, validator, and language server based on SQLite's own grammar and tokenizer

About

  • A tool that compiles SQLite's Lemon-generated grammar and tokenizer directly in C, removing the limits of general-purpose SQL parsers that approximate SQLite as a "flavor"
  • Validates against a schema, without a DB connection, the errors that sqlite3_prepare catches; unlike sqlite3, reports all errors in a single pass with source locations and fix suggestions
  • A specific SQLite version can be pinned, e.g. --sqlite-version 3.32.0, to detect in advance syntax (RETURNING, etc.) unsupported in older SQLite environments such as Android
  • Reflects 22 compile-time flags (SQLITE_ENABLE_MATH_FUNCTIONS, etc.) to validate exactly matching the target build
  • About 99.7% parse acceptance agreement against about 396,000 statements in the SQLite upstream test suite
  • Built-in deterministic SQL formatter with configurable line width, keyword case, and indentation
  • Includes an experimental feature that extracts SQL from Python and TypeScript strings, handles interpolation holes, and validates it
  • With the syntaqlite.toml project config file, the LSP, CLI, and editors automatically load per-glob schema mappings and format options
  • LSP support provides a VS Code extension, a Zed extension, and a Claude Code plugin; diagnostics, autocompletion, and semantic highlighting work without a DB connection
  • Provides a Web Playground that runs in the browser via WASM
  • Usable as a Rust, Python, JavaScript (WASM), or C library; installation supported via pip, Homebrew, Cargo, mise, or a curl one-liner
  • Dual architecture: parser and tokenizer in C, formatter, validator, and LSP in Rust
  • Apache 2.0 license

See also

Favorite site

author Zer0 sitemap