Start with an example
create-chkit scaffolds a working chkit project by downloading a curated example from the chkit repository and wiring it up against your chosen package manager. Use this path when you want a known-good project as a starting point.
Prerequisites
Section titled “Prerequisites”- Node.js 20+ or Bun 1.3.5+
- A ClickHouse endpoint (
CLICKHOUSE_URL, optionallyCLICKHOUSE_USER,CLICKHOUSE_PASSWORD)
Scaffold a project
Section titled “Scaffold a project”Run the package without arguments to be prompted for a project name and to pick from the list of bundled examples.
$ bun create chkit@latest$ npm create chkit@latest$ pnpm create chkit@latest$ yarn create chkit Pass a project directory and pick an example explicitly:
$ bun create chkit@latest my-chkit-app --example clickbench$ npm create chkit@latest my-chkit-app -- --example clickbench$ pnpm create chkit@latest my-chkit-app --example clickbench$ yarn create chkit my-chkit-app --example clickbench Options
Section titled “Options”| Flag | Description |
|---|---|
[project-directory] | Target directory. Prompted if omitted. |
-e, --example <name> | Example name or full GitHub URL. Prompted with the list of bundled examples if omitted. |
-m, --package-manager <pm> | npm, pnpm, yarn, or bun. Auto-detected from the invoking package manager. |
--skip-install | Skip installing dependencies after scaffolding. |
Examples
Section titled “Examples”| Name | Description |
|---|---|
clickbench | Full ClickBench schema and dataset load against ObsessionDB or ClickHouse. |
More examples will land in the examples/ directory over time.
Run your first migration
Section titled “Run your first migration”Once the scaffold completes:
cd my-chkit-appexport CLICKHOUSE_URL=http://localhost:8123# export CLICKHOUSE_PASSWORD=...bun run migrateWhere to next
Section titled “Where to next”- CLI reference — every command and flag
- Configuration — wire up
clickhouse.config.ts - Add chkit to an existing project — the other path