What problem does it solve?
Scythe removes the manual and error-prone boilerplate of turning SQL queries into strongly-typed, database-access code by compiling annotated SQL into ready-to-use functions, structs, and type mappings.
Core Features & Use Cases
- Type-safe SQL-to-code generation: Write annotated SQL (with
@name, @returns, etc.) and generate boilerplate across many languages and database engines.
- Backend-driven support matrix: Select the correct
scythe.toml backend (e.g., Rust sqlx, TypeScript pg, Python asyncpg) for your target language and database.
- Built-in linting and formatting: Catch SQL issues early using scythe’s 93-rule linting (including sqruff rules) and format SQL consistently, including via pre-commit hooks.
- Common migration and workflow integration: Migrate from sqlc, validate queries without generation, and wire formatting/linting into CI and developer workflows.
Quick Start
Use the scythe skill to generate code by running scythe generate after writing annotated queries and configuring scythe.toml.