DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to let coding agents edit SQL without leaving stale types with Reylo

Keep each query in one .sql file so an agent cannot leave an old type behind, and let tsc find every caller.

Short answer: Set up Reylo as in its README so queries live in .sql files and types come from the SQL itself; then point your agent at the docs as Markdown at Reylo.dev/llms.txt; ask the agent to change a query and then run the typecheck script. All steps.

Who it is forA developer whose agent changes a query but forgets to update the matching TypeScript type.

The problemWhen types live apart from queries, agents fix one and leave the other stale.

The outcomeAgent edits that are checked end to end: change the SQL, and the type check flags every caller it missed.

What you need first

  • TypeScript 7.1 (currently in beta), the first release with content mappers
  • Node 24 or later
  • A running dev database: Postgres, MySQL 8.0.22 or later, or a SQLite file
  • A supported driver such as pg, postgres.js, mysql2, better-sqlite3, Bun.sql or Cloudflare D1

Steps

  1. Set up Reylo as in its README so queries live in .sql files and types come from the SQL itself
  2. Point your agent at the docs as Markdown at Reylo.dev/llms.txt
  3. Ask the agent to change a query and then run the typecheck script
  4. Have it fix every caller the type check reports before it calls the task done

Prompt for your agent

Read reylo.dev/llms.txt, then in <project> change <query>.sql to <change>. Run the typecheck with --runExternalCode and fix every caller it reports. Do not hand-write any row types.

Caveat. The agent still needs access to the dev database for the type check to mean anything.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for colinhacks/reylo and "Let coding agents edit SQL without leaving stale types"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer