Back to directory

scythe

A SQL toolchain that compiles annotated .sql files into type-safe database access code for ten languages and ten databases, with linting, security auditing and pre-commit hooks.

scythe

Scythe reads .sql files statically and compiles them into database access code: row types, query functions and type mappings that stay in sync with the schema. Because it needs no database connection or network access, it can run inside a pre-commit hook.

Type inference follows nullability through joins, CTEs, window functions and aggregates, and maps enums, arrays and JSON to language-native types. It ships 59 built-in rules: lint rules such as UPDATE without WHERE or SELECT *, and audit rules covering dangerous functions, GRANT to PUBLIC and migration-safety issues such as locking ALTER statements. scythe check verifies that committed generated code still matches the SQL it came from, and can check for schema drift against a live PostgreSQL catalog.

It targets one database engine per configuration block rather than abstracting across engines like an ORM, and is written in Rust under the MIT license.

More in Code quality

See all 94
  • Critic

    critic.run

    A code-change viewer, backed by Y Combinator, built for reviewing work written by coding agents, presenting a plain-language narrative of each change alongside the diff and a running conversation with the agent.

  • GitIntel

    hoangsonww.github.io

    An MCP server that computes git repository analytics such as hotspots, churn, temporal coupling, knowledge maps and risk scoring entirely from local commit history, for AI coding agents like Claude Code and Codex.

  • Axint

    axint.ai

    A verification layer for AI coding agents working on Apple projects: it runs real Xcode builds and tests against the Swift an agent wrote, reconciles static analysis findings against that evidence, and returns a signed proof with the exact repairs still needed.