Skip to content

Getting Started with Schema Management

chkit manages ClickHouse schemas and migrations in TypeScript and Python: define tables in code, generate SQL, review the migration, and apply it to the database.

Start with the first-schema tutorial to learn the workflow from an empty folder, or add chkit to an existing application.

Paste this prompt into your coding agent to install chkit, configure the project, and prepare the first migration. The prompt links to the agent instructions.

Set up chkit (ClickHouse schema management) in this repo. First fetch https://chkit.obsessiondb.com/ai-agents.md and follow the instructions there: install the agent skill, scaffold the config, recommend any plugins this project needs, and walk me through the first migration. Don't apply anything to the database without confirming with me first.

Prefer a complete TypeScript starter? Start with the schema example to scaffold two tables and their migration.

Already have tables in ClickHouse? Use schema introspection to import their definitions before planning changes. For typed application code, add row model generation after defining the schema.

Choose the runtime for the project’s language and a database target:

  • Node.js 20+ or Bun 1.3.5+ for TypeScript, or Python 3.11+ for Python
  • A ClickHouse 24.x or newer endpoint (see compatibility), or a free ObsessionDB dev instance claimed during setup. For a direct connection, set CLICKHOUSE_URL and any required CLICKHOUSE_USER / CLICKHOUSE_PASSWORD values.

Once either path is working: