Safeql
Validate and auto-generate TypeScript types from raw SQL queries in PostgreSQL.
Install / Use
/learn @ts-safeql/SafeqlREADME
https://user-images.githubusercontent.com/10504365/192807716-6a4fcbc1-9dc8-4d3b-a63b-2c95c0061689.mp4
Features
-
⚡️ Automatic Type Inference & Validation:
SafeQL automatically infers the type of the query result based on the query itself.
-
🖖 Compatible With Popular SQL Libraries:
SafeQL works with any PostgreSQL client, including Prisma, Sequelize, pg, Postgres.js, and more.
-
🛠️ Easy To Use
SafeQL was built in mind to be easy to use and integrate with your existing codebase.
-
📦 Built with Monorepos & Microservices in mind:
SafeQL was built with monorepos and microservices in mind, and it's easy to use with multiple databases.
Install
I would first recommend follow the instructions in the documentation.
Prerequisites
Set up ESLint following the typescript-eslint Getting Started docs, to enable TypeScript language support in ESLint.
npm install --save-dev @ts-safeql/eslint-plugin libpg-query
Sponsors
<p align="center"> <a href="https://github.com/sponsors/Newbie012"> <img src="https://cdn.jsdelivr.net/gh/newbie012/sponsors/sponsors.svg"> </a> </p>Related Skills
oracle
335.8kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
prose
335.8kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
Writing Hookify Rules
82.7kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Command Development
82.7kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
