
About sqlc
sqlc is a command line tool that generates type-safe code from SQL queries. You write the SQL, and sqlc creates the functions your application calls.
What it does
sqlc reads your SQL queries and schema, then produces code that matches them. Mistakes in queries can be caught before the code runs, instead of appearing at runtime. The project lists the programming languages and databases it supports, and it is open source under the MIT licence.
Key features
- Generates functions from your SQL queries
- Type-safe interfaces for query results
- Catches query problems before runtime
- Runs on Linux, macOS and Windows
- Supports several programming languages
Who it's for
Backend developers who prefer writing SQL by hand and want typed code without a full ORM. It fits teams that want the query logic to stay visible in plain SQL files.
Pricing and good to know
sqlc is open source under the MIT licence and free to download. It runs as a command line tool, so it fits into build scripts and CI. Because it generates code, commit the output and rerun the tool whenever a query changes.
Highlights
- Generates functions from SQL queries
- Type-safe interfaces for query results
- Catches query problems before runtime
- Runs on Linux, macOS and Windows
- Supports several programming languages












