# chkit > ClickHouse schema management in TypeScript, with Python support in beta. Define schemas in code, review migration SQL, and detect drift. chkit defines ClickHouse schemas, generates and applies reviewable migration SQL, and detects drift. Schema plugins add introspection, type generation, and SQL backfills (beta). Each link below points to the raw Markdown of that page. ## Schema Management Start with getting-started.md or tutorials/first-schema.md. Define schemas, review migrations, and detect drift. - [Schema Management for AI Agents](https://chkit.obsessiondb.com/ai-agents.md): Set up ClickHouse schema definitions, generate migration SQL, and operate the chkit schema workflow on a user's behalf. - [Getting Started with Schema Management](https://chkit.obsessiondb.com/getting-started.md): Define a ClickHouse schema, review the generated migration SQL, and deploy the first change. - [chkit check](https://chkit.obsessiondb.com/cli/check.md): Run policy checks for CI gates covering pending migrations, checksums, drift, and plugins. - [chkit codegen](https://chkit.obsessiondb.com/cli/codegen.md): Generate typed row models (TypeScript types or Pydantic models), plus TypeScript-only insert helpers and runtime migration modules from schema definitions. - [chkit drift](https://chkit.obsessiondb.com/cli/drift.md): Compare the snapshot against live ClickHouse and report schema differences. - [chkit generate](https://chkit.obsessiondb.com/cli/generate.md): Diff schema definitions against the last snapshot and produce migration SQL. - [chkit init](https://chkit.obsessiondb.com/cli/init.md): Scaffold a chkit project — config, example schema, dependencies, and an optional database connection. - [chkit migrate](https://chkit.obsessiondb.com/cli/migrate.md): Apply pending migration files to ClickHouse. - [Schema CLI Overview](https://chkit.obsessiondb.com/cli/overview.md): Commands for ClickHouse schema definitions, migrations, introspection, and drift checks. - [chkit plugin](https://chkit.obsessiondb.com/cli/plugin.md): List installed plugins or run plugin commands. - [chkit pull](https://chkit.obsessiondb.com/cli/pull.md): Introspect live ClickHouse and generate a schema file. - [chkit query](https://chkit.obsessiondb.com/cli/query.md): Run a SQL query against the configured ClickHouse target. - [chkit snapshot](https://chkit.obsessiondb.com/cli/snapshot.md): Rebuild snapshot.json from your schema definitions, for example after two branches conflict on it. - [chkit status](https://chkit.obsessiondb.com/cli/status.md): Show migration status including total, applied, pending, and checksum mismatches. - [Configuration Overview](https://chkit.obsessiondb.com/configuration/overview.md): clickhouse.config.ts / clickhouse.config.py structure and defaults. - [Add to an existing project](https://chkit.obsessiondb.com/getting-started/add-to-existing-project.md): Adopt an existing ClickHouse database into a TypeScript project, establish a reviewed migration baseline, and ship the first change without losing data. - [Start with an example](https://chkit.obsessiondb.com/getting-started/with-an-example.md): Scaffold the hello example with create-chkit and apply its first migration. - [CI/CD Integration](https://chkit.obsessiondb.com/guides/ci-cd.md): Run chkit schema validation, migration deployment, and type checking in continuous integration pipelines. - [ClickHouse compatibility](https://chkit.obsessiondb.com/guides/clickhouse-compatibility.md): Which ClickHouse versions and engines chkit supports, and which features are version-gated. - [Zero-downtime structural migrations](https://chkit.obsessiondb.com/guides/data-preserving-migrations.md): Change a populated table's sorting key, primary key, partition key or engine while writers keep inserting, with chkit generate --cutover. - [The migration workflow](https://chkit.obsessiondb.com/guides/migration-workflow.md): How chkit's ahead-of-time migration model works: what snapshot.json holds, which files to commit, and how a team deploys when only some developers can reach production. - [Troubleshooting](https://chkit.obsessiondb.com/guides/troubleshooting.md): Common chkit errors mapped to their causes and fixes — missing dependencies, connection and auth failures, rejected migrations, blocked destructive operations, and drift. - [Backfill Jobs](https://chkit.obsessiondb.com/obsessiondb/backfills.md): Use the beta backfill plugin to submit managed ObsessionDB jobs and track their progress in the console. - [Engine Rewriting](https://chkit.obsessiondb.com/obsessiondb/engine-rewriting.md): How one set of schema files with Shared engines works against both ObsessionDB and regular ClickHouse. - [Getting Started with ObsessionDB](https://chkit.obsessiondb.com/obsessiondb/getting-started.md): Connect chkit to ObsessionDB from the CLI — claim a free dev instance, sign up with a one-time email code, or log in to an existing account. - [ObsessionDB Overview](https://chkit.obsessiondb.com/obsessiondb/overview.md): First-class integration with ObsessionDB — engine rewriting, service selection, and remote execution from one schema. - [Services](https://chkit.obsessiondb.com/obsessiondb/services.md): List, select, alias, and override ObsessionDB services per command — and how queries route through the ObsessionDB API. - [Backfill Plugin (beta)](https://chkit.obsessiondb.com/plugins/backfill.md): Plan and resume partition/sort-key SQL replays, including historical materialized-view aggregates. - [Codegen Plugin](https://chkit.obsessiondb.com/plugins/codegen.md): Generate TypeScript row types, optional Zod schemas, typed insert helpers, and runtime migration modules from chkit schema definitions. - [Schema Plugins](https://chkit.obsessiondb.com/plugins/overview.md): Extend schema management with row model generation, live schema imports, SQL backfills, and database connections. - [Pull Plugin](https://chkit.obsessiondb.com/plugins/pull.md): Introspect live ClickHouse tables, views, materialized views, and dictionaries and generate chkit schema files. - [Python Core API (beta)](https://chkit.obsessiondb.com/python/core-api.md): The beta Python implementation's chkit.core pipeline for loading, validation, diffing, planning, snapshots, and SQL rendering. - [Python Overview (beta)](https://chkit.obsessiondb.com/python/overview.md): Define ClickHouse schemas and run migrations with the beta Python implementation, chkit-py. - [Schema DSL Reference](https://chkit.obsessiondb.com/schema/dsl-reference.md): Complete reference for chkit schema definition functions, column types, and table options — in TypeScript and Python. - [Kafka tables](https://chkit.obsessiondb.com/schema/kafka.md): Define Kafka queues and materialized-view ingestion pipelines in schema code. - [Schema Overview](https://chkit.obsessiondb.com/schema/overview.md): How chkit thinks about ClickHouse schema and where to learn each piece of the DSL. - [Queries](https://chkit.obsessiondb.com/schema/queries.md): Define typed ClickHouse queries as tagged templates, compose them and call them with their params. - [Refreshable Materialized Views](https://chkit.obsessiondb.com/schema/refreshable-views.md): Schedule ClickHouse materialized views to refresh on a cron-like cadence, with APPEND mode, DEPENDS ON chains, and the three hard rules chkit enforces. - [Tutorial: your first schema](https://chkit.obsessiondb.com/tutorials/first-schema.md): Build a chkit project from an empty folder — migrate the starter table to a live database, insert and query rows, then evolve the schema. ## Sync (beta) chkit Sync copies business app data into ClickHouse using editable TypeScript integrations. Start with sync.md; destination schemas and migrations use Schema Management. - [API sync model](https://chkit.obsessiondb.com/api-sync.md): Understand the streams, pipelines, and checkpoints used by chkit Sync (beta). - [Sync integrations](https://chkit.obsessiondb.com/integrations.md): Browse editable API integrations for chkit Sync (beta), including synced records, setup guides, and limitations. - [chkit Sync (beta)](https://chkit.obsessiondb.com/sync.md): Sync data from business apps into ClickHouse with editable TypeScript integrations and checkpointed API pulls. - [Sync authoring skill](https://chkit.obsessiondb.com/api-sync/agent-skill.md): Install an agent skill for implementing new sources with chkit Sync (beta). - [Attio template](https://chkit.obsessiondb.com/api-sync/attio.md): Find the Attio integration guide for installation, synced resources, and ClickHouse queries. - [Destinations and transformations](https://chkit.obsessiondb.com/api-sync/destinations.md): Store raw data for flexible ClickHouse transformations or map records into a known schema before loading. - [Incremental syncs](https://chkit.obsessiondb.com/api-sync/incremental-syncs.md): Start with a full sync, then use time windows or durable provider state to fetch changes. - [Loading and batching](https://chkit.obsessiondb.com/api-sync/loading.md): Choose direct inserts or opt-in staged deduplication, with explicit identity, concurrency and recovery limits. - [Scheduling and recovery](https://chkit.obsessiondb.com/api-sync/operations.md): Schedule chkit Sync (beta), select streams, configure retries, and recover overlapping or interrupted runs. - [Sync quickstart](https://chkit.obsessiondb.com/api-sync/quickstart.md): Install chkit Sync (beta), load a public API into ClickHouse, and query it through a SQL view. - [Readers and pagination](https://chkit.obsessiondb.com/api-sync/readers.md): Fetch bounded pages, then add child collections and provider-specific behavior as needed. - [Publish a registry](https://chkit.obsessiondb.com/api-sync/registry-authoring.md): Build and host versioned templates for chkit Sync (beta) with editable schemas and API readers. - [Provider templates](https://chkit.obsessiondb.com/api-sync/templates.md): Install editable provider schemas and readers for chkit Sync (beta) with one command. - [Test a source](https://chkit.obsessiondb.com/api-sync/testing.md): Verify chkit Sync (beta) source selection, checkpoint safety, and replay with in-memory adapters. - [chkit add](https://chkit.obsessiondb.com/cli/add.md): Install an editable provider template and its dependencies for chkit Sync (beta). - [chkit ingest](https://chkit.obsessiondb.com/cli/ingest.md): Run, inspect, diagnose, or repair streams with chkit Sync (beta). - [chkit registry](https://chkit.obsessiondb.com/cli/registry.md): Browse, inspect, and build versioned provider templates for chkit Sync (beta). - [Integrating ClickHouse with Attio](https://chkit.obsessiondb.com/integrations/attio.md): Sync Attio CRM records, custom objects, lists, notes, tasks, and members into ClickHouse with chkit Sync (beta). - [Integrating ClickHouse with Circleback](https://chkit.obsessiondb.com/integrations/circleback.md): Sync Circleback meetings, transcripts, action items, people, and companies into ClickHouse with chkit Sync (beta). - [Integrating ClickHouse with GitHub](https://chkit.obsessiondb.com/integrations/github.md): Sync GitHub issues, pull requests, discussions, reviews, commits, and stargazers into ClickHouse with chkit Sync (beta). - [Integrating ClickHouse with Google Calendar](https://chkit.obsessiondb.com/integrations/google-calendar.md): Sync Google Calendar events with resumable pages and sync-token checkpoints using chkit Sync (beta). - [Integrating ClickHouse with Google Meet](https://chkit.obsessiondb.com/integrations/google-meet.md): Load six independent Google Meet resources into ClickHouse with chkit Sync (beta). - [Integrating ClickHouse with Lemlist](https://chkit.obsessiondb.com/integrations/lemlist.md): Sync seven independent Lemlist resource streams into ClickHouse with chkit Sync (beta). - [Integrating ClickHouse with Linear](https://chkit.obsessiondb.com/integrations/linear.md): Load nine independent Linear resources into ClickHouse with recoverable checkpoints using chkit Sync (beta). - [Integrating ClickHouse with Slack](https://chkit.obsessiondb.com/integrations/slack.md): Sync Slack conversations, users, message history, and thread replies into ClickHouse with chkit Sync (beta). - [Sync plugin reference](https://chkit.obsessiondb.com/plugins/ingest.md): Configure chkit Sync (beta) with TypeScript readers and overlap-tolerant ClickHouse journal checkpoints. - [Sync CLI](https://chkit.obsessiondb.com/sync/cli.md): Discover templates and run, inspect, or recover streams with chkit Sync (beta). ## Blog Articles and project updates. - [chkit is now available in Python (alpha)](https://chkit.obsessiondb.com/blog/chkit-python.md): chkit-py is the alpha Python implementation of the ClickHouse schema-as-code toolkit, sharing migration artifacts with TypeScript chkit. - [The era of OLAP deserves the tooling relational has had for years](https://chkit.obsessiondb.com/blog/olap-deserves-better-tooling.md): Why we built ch-kit: schema-as-code, migrations, and guardrails for ClickHouse, after running it at near-petabyte scale.