🚧🚧🚧🚧 NOTE 🚧🚧🚧🚧This repo has been renamed from
slonik-toolstopgkit. The two packages included inslonik-tools-@slonik/migratorand@slonik/typegen- are replaced by@pgkit/migratorand@pgkit/typegen.Both are almost entriely backwards-compatible with their
@slonik/counterparts, but some reconfiguration may be required. They also now depend on@pgkit/clientinstead of slonik. See below for more details on each packages (as well as some new ones!)Right now, the default branch has been set to
pgkit. You can still access slonik-tools on themainbranch. Soon, the pgkit branch will be merged into main, the repo renamed, and the slonik-based libraries will live in a slonik-tools branch. Security updates will still be applied, and even feature requests will be considered if a need arises that isn't covered by pgkit.
(almost) everything you need for working with postgres in node.js
- @pgkit/client - A strongly-typed postgres client for node.js. Lets you just write SQL, safely.
- @pgkit/typegen - A library that uses pgkit to generate typescript interfaces based on your sql queries.
- @pgkit/schemainspect - Inspects tables, views, materialized views, constraints, indexes, sequences, enums, functions, and extensions. Handles table partitioning and inheritance.
- @pgkit/migra - A schema diff tool for PostgreSQL, written in TypeScript. Generates SQL scripts to migrate a database to a target state.
- @pgkit/admin - A no-config admin UI for running queries against PostgreSQL database, with autocomplete for tables, columns, views, functions etc.
- @pgkit/migrator - A cli migration tool for postgres, using pgkit.
Intended to include, some day:
- A SQL formatter - sql-formatter and @sqltools/formatter are good options, but produce pretty verbose statements. prettier-plugin-sql-cst is fantastic, but requires prettier.
- A barrel package of all the above, for convenient installation