---
title: Start with an example
description: Scaffold a working chkit project from a curated example with create-chkit.
sidebar:
  order: 1
---

import PackagedCommand from '../../../components/PackagedCommand.astro';
import Command from '../../../components/Command.astro';

`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

- Node.js 20+ or Bun 1.3.5+
- A ClickHouse endpoint (`CLICKHOUSE_URL`, optionally `CLICKHOUSE_USER`, `CLICKHOUSE_PASSWORD`)

## Scaffold a project

Run the package without arguments to be prompted for a project name and to pick from the list of bundled examples.

<PackagedCommand create="chkit@latest" />

Pass a project directory and pick an example explicitly:

<PackagedCommand create="chkit@latest" args="my-chkit-app --example clickbench" />

## 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

| Name | Description |
| --- | --- |
| `clickbench` | Full ClickBench schema and dataset load against ObsessionDB or ClickHouse. |

More examples will land in the [`examples/` directory](https://github.com/obsessiondb/chkit/tree/main/examples) over time.

## Run your first migration

Once the scaffold completes:

```sh
cd my-chkit-app
export CLICKHOUSE_URL=http://localhost:8123
# export CLICKHOUSE_PASSWORD=...
bun run migrate
```

## Where to next

- [CLI reference](/cli/overview/) — every command and flag
- [Configuration](/configuration/overview/) — wire up `clickhouse.config.ts`
- [Add chkit to an existing project](/getting-started/add-to-existing-project/) — the other path
