---
title: "clickhouse.build: An agentic CLI to accelerate Postgres apps with ClickHouse"
description: "clickhouse.build is an open source agentic CLI that adds ClickHouse to Postgres-backed TypeScript apps for analytical queries while leaving transactional work in Postgres."
url: "https://swe.quest/articles/clickhouse-build-an-agentic-cli-to-accelerate-postgres-apps-with-clickhouse-a4f92c15e2d9b3be"
canonical: "https://clickhouse.com/blog/clickhouse-build-agentic-cli-accelerate-postgres-clickhouse-apps"
source: "ClickHouse"
published: "2025-12-02"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 9
tags: ["ai-agents","analytics","postgres","typescript","ai-coding"]
---

# clickhouse.build: An agentic CLI to accelerate Postgres apps with ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-12-02, 9 min read, Announcement. Original: [https://clickhouse.com/blog/clickhouse-build-agentic-cli-accelerate-postgres-clickhouse-apps](https://clickhouse.com/blog/clickhouse-build-agentic-cli-accelerate-postgres-clickhouse-apps)

## Summary

clickhouse.build is an open source agentic CLI that adds ClickHouse to Postgres-backed TypeScript apps for analytical queries while leaving transactional work in Postgres. A scanner agent finds analytical queries in raw SQL, Prisma or Drizzle code. A data migrator then generates ClickPipes Postgres CDC API calls to sync the needed tables. A code migrator, checked by a QA sub-agent against reference codebases, rewrites queries behind a strategy pattern toggled by a USE\_CLICKHOUSE feature flag. The workflow keeps a human in the loop to approve each change and aims to produce a backwards-compatible proof of concept in under an hour.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)

## Prerequisites

- Postgres basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- OLTP vs OLAP workloads ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- TypeScript ORMs ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))

## Keywords

clickhouse.build, ClickHouse, PostgreSQL, ClickPipes, Strands Agents SDK, Amazon Bedrock, Prisma, Drizzle

## Related posts

- [Agentic coding with ClickHouse. One person, one data stack, one full-stack application](https://swe.quest/articles/agentic-coding-with-clickhouse-one-person-one-data-stack-one-full-stack-ca4c2d9fd47cef68.md): ClickHouse · 2026-04-14 · Easy · 13 min read · AI for coding, Analytics & OLAP, Observability, AI agents
  A ClickHouse Solutions Architect with no frontend or backend background built ClickShop, a full-stack retail analytics demo, in a couple of days using Cursor.
- [Introducing pg\_clickhouse: A Postgres extension for querying ClickHouse](https://swe.quest/articles/introducing-pg-clickhouse-a-postgres-extension-for-querying-clickhouse-98de49fb9ae8bb75.md): ClickHouse · 2025-12-10 · Medium · 11 min read · PostgreSQL, Query engines, Analytics & OLAP, SQL
  pg\_clickhouse v0.1.0 is an Apache 2-licensed PostgreSQL foreign data wrapper, derived from clickhouse\_fdw, that runs analytics queries on ClickHouse from Postgres so existing queries can work unmodified by changing search\_path.
- [clickhousectl v0.2.0: Postgres, ClickPipes and more](https://swe.quest/articles/clickhousectl-v0-2-0-postgres-clickpipes-and-more-78a4d21808758ecd.md): ClickHouse · 2026-05-20 · Medium · 5 min read · Developer tools, Analytics & OLAP, PostgreSQL, Data pipelines, Cloud platforms
  clickhousectl v0.2.0 adds Postgres management, both local (Docker-backed, keyed on name and major version 16–18) and as ClickHouse Cloud managed Postgres.
- [A universal interface: How QuintoAndar made ClickHouse plug-and-play with managed Postgres](https://swe.quest/articles/a-universal-interface-how-quintoandar-made-clickhouse-plug-and-play-with-ec413a5dd96fc04f.md): ClickHouse · 2026-08-27 · Easy · 6 min read · Analytics & OLAP, PostgreSQL, Data pipelines, System design
  QuintoAndar's customer data platform replaced a Lambda architecture (a Postgres hot layer plus Kafka Connect into a Delta landing zone processed by 24/7 Databricks jobs with costly MERGE INTO deduplication) by having its event gateway write about 900 million monthly events directly into ClickHouse Cloud, which also serves roughly 300 million API requests a month with sub-second reads.
- [PostgreSQL + ClickHouse as the Open Source unified data stack](https://swe.quest/articles/postgresql-clickhouse-as-the-open-source-unified-data-stack-2760f19ba52907df.md): ClickHouse · 2026-01-27 · Easy · 5 min read · PostgreSQL, Analytics & OLAP, Event-driven architecture, Replication
  An open source stack pairs PostgreSQL as the transactional system of record with ClickHouse for analytics, connected by PeerDB for change data capture and the pg\_clickhouse extension, which transparently offloads analytical queries from Postgres to ClickHouse.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
