SQL Tagged Templates (sqltt)

JSON →
library 1.0.0-32 ·javascript
verified Jun 5, 2026

A JavaScript library (v1.0.0-32, prerelease) for managing SQL queries using ES6 tagged template literals. It provides a template system to keep queries readable, maintainable, reusable, and organized, while allowing syntax adaptation across different database engines (PostgreSQL, MySQL, etc.). Unlike ORMs, it focuses solely on template management. It can be used as a Node.js module or as a CLI tool for generating SQL from templates. The library supports advanced features like parameterized arguments, conditional blocks, includes, comments, and multiple engine dialects. Its key differentiator is leveraging tagged templates for inline SQL composition without external template files, and the ability to publish templates for CLI execution.