# sqlc

> Compile SQL to type-safe code

Source: https://talira.ai/catalog/sqlc-7w8h0kzr
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [libraries / databases / orm](https://talira.ai/categories/libraries/databases/orm), [developer tools / code generation](https://talira.ai/categories/developer-tools/code-generation), [languages / go](https://talira.ai/categories/languages/go)
- Platforms: linux, macos, windows[^3]
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Pricing notes: sqlc Cloud, used by push and managed databases, is free to sign up for.
- Free tier: yes[^1]
- Self-hostable: yes[^3]
- Plugins: yes[^4]

sqlc is a SQL compiler: you write your schema and queries in plain SQL, run `sqlc generate`, and it produces type-safe, idiomatic code with an interface for each query, so you call methods instead of writing querying boilerplate and catch mismatches at build time instead of in production. Go is built in, and plugins generate Kotlin, Python and TypeScript (community plugins add more). PostgreSQL and MySQL support is stable, with SQLite, ClickHouse, DuckDB, Spanner and SQL Server in beta. Other commands lint queries (`vet`), verify schema changes, format SQL and analyze result types; `push` and managed databases use the free sqlc Cloud. A single binary for Linux, macOS and Windows, MIT licensed.

## Links

- Website: https://sqlc.dev/
- GitHub: https://github.com/sqlc-dev/sqlc
- Docs: https://docs.sqlc.dev/

## Problems it solves

- write raw SQL in Go but get type-safe generated code instead of hand-written scanning
- catch SQL query and schema mismatches at build time instead of at runtime
- a type-safe database layer in Go without an ORM
- generate TypeScript, Python or Kotlin code from SQL queries
- lint SQL queries in CI for unsafe patterns
- check that a schema migration doesn't break existing queries

## Features

- type-safe code generated from SQL schema and queries
- built-in Go generator; plugins for Kotlin, Python and TypeScript
- PostgreSQL and MySQL (stable); SQLite, ClickHouse, DuckDB, Spanner and SQL Server (beta)
- vet command for linting queries
- verify command for checking schema changes
- fmt, parse and analyze commands
- query annotations, macros, type overrides and struct configuration
- codegen plugins for more languages
- online playground
- push and managed databases through sqlc Cloud

## Capabilities

- Has a command line tool: plan not known
- Takes plugins: plan not known

## Trust

Overall: 0.26 out of 1.
Signals: backing 0.00, extensibility 0.40.

- has a plugin system

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [ent](https://talira.ai/catalog/ent-dd76d5tj.md): An entity framework for Go
- [Prisma ORM](https://talira.ai/catalog/prisma-orm-3y118vyc.md): One schema. Every query type-safe.
- [SQLAlchemy](https://talira.ai/catalog/sqlalchemy-wd7fb2fw.md): The Python SQL toolkit and Object Relational Mapper
- [Slick](https://talira.ai/catalog/slick-q0ye0vc9.md): Functional Relational Mapping for Scala

## Sources

[^1]: https://docs.sqlc.dev/en/latest/howto/push.html (checked 24 Nov 2026)
[^2]: https://github.com/sqlc-dev/sqlc/blob/main/LICENSE (checked 24 Nov 2026)
[^3]: https://sqlc.dev/ (checked 24 Nov 2026)
[^4]: https://docs.sqlc.dev/en/latest/reference/language-support.html (checked 24 Nov 2026)
