Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/src/content/docs/ai-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ It guides decisions about raw versus shaped data, transformations, pagination, i
bun create chkit@latest my-chkit-app --example hello
```

`hello` is the small default schema (two tables, one migration). Pass `--example clickbench` for the full ClickBench dataset load.
`hello` is two tables and one migration. Pass `--example hello` as shown: the published interactive prompt still preselects `clickbench` until `create-chkit` is republished. Pass `--example clickbench` for the full ClickBench dataset load.

It then runs the same connect flow as `chkit init` (Step 4). Drive it non-interactively with `--connect <choice>` (and `--email` for the claim path), or `--skip-onboarding` to scaffold only.

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/content/docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For manual setup, start with an example or add chkit to an existing project.
<LinkCard
title="Start with an example"
href="/getting-started/with-an-example/"
description="Scaffold the hello example with create-chkit: two tables and one migration. ClickBench stays available for a full dataset load."
description="Scaffold hello with create-chkit --example hello: two tables and one migration. The published prompt still preselects ClickBench until create-chkit is republished."
/>
<LinkCard
title="Add to an existing project"
Expand Down
18 changes: 8 additions & 10 deletions apps/docs/src/content/docs/getting-started/with-an-example.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar:
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. The default example is [`hello`](https://github.com/obsessiondb/chkit/tree/main/examples/hello): two small tables and one migration.
`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. [`hello`](https://github.com/obsessiondb/chkit/tree/main/examples/hello) is two small tables and one migration. Pass `--example hello` to scaffold it.

:::note[Working in Python?]
The `create-chkit` examples are TypeScript projects. For Python, start with `pip install chkit-py` and run `chkit init` in your project instead — see the [Python overview](/python/overview/).
Expand All @@ -21,14 +21,12 @@ The `create-chkit` examples are TypeScript projects. For Python, start with `pip

## Scaffold a project

Run the package without arguments to be prompted for a project name and to pick from the bundled examples. `hello` is the default in the repository manifest; pass `--example hello` to select it directly.

<PackagedCommand create="chkit@latest" />

Pass a project directory and select `hello` explicitly:
Pass `--example hello`:

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

Omitting `--example` prompts from the manifest bundled in the installed `create-chkit` package. That published prompt still preselects `clickbench` and does not list `hello` until `create-chkit` is republished. `--example` downloads the named example from the repository, so `--example hello` works on the current release. The repository manifest default is already `hello`; the prompt picks that up on the next release.

The scaffold then asks how to connect:

```
Expand All @@ -49,18 +47,18 @@ For the full ClickBench schema and public dataset load, pass `--example clickben
| 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. |
| `-e, --example <name>` | Example name or full GitHub URL. If omitted, prompted from the manifest bundled in the installed package. |
| `-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 |
| --- | --- |
| `hello` | Two small tables and one migration. Default. Claim a free ObsessionDB instance or use local ClickHouse. |
| `clickbench` | Full ClickBench schema and dataset load against ObsessionDB or ClickHouse. |
| `hello` | Two small tables and one migration. Default in the repository manifest. Claim a free ObsessionDB instance or use local ClickHouse. |
| `clickbench` | Full ClickBench schema and dataset load against ObsessionDB or ClickHouse. Preselected by the published interactive prompt until `create-chkit` is republished. |

The list and default live in [`examples/manifest.json`](https://github.com/obsessiondb/chkit/blob/main/examples/manifest.json). The same `hello` project can be cloned from [`examples/hello`](https://github.com/obsessiondb/chkit/tree/main/examples/hello) without the scaffolder.
The list and repository default live in [`examples/manifest.json`](https://github.com/obsessiondb/chkit/blob/main/examples/manifest.json). The same `hello` project can be cloned from [`examples/hello`](https://github.com/obsessiondb/chkit/tree/main/examples/hello) without the scaffolder.

## Run your first migration

Expand Down
13 changes: 11 additions & 2 deletions packages/create-chkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ yarn create chkit

Pick an example by name:

```sh
bun create chkit@latest my-app --example hello
```

`hello` is two tables and one migration. Omitting `--example` prompts from the manifest bundled in the installed package. Published `create-chkit` still preselects `clickbench` and does not list `hello` until that package is republished. `--example` downloads `examples/<name>` from the chkit repository, so `--example hello` works on the current release.

`clickbench` is the full ClickBench schema and dataset load:

```sh
bun create chkit@latest my-app --example clickbench
```
Expand All @@ -25,7 +33,7 @@ bun create chkit@latest my-app --example clickbench
| Flag | Description |
| --- | --- |
| `[project-directory]` | Target directory. Prompted if omitted. |
| `-e, --example <name>` | Example to scaffold. Bare name (`clickbench`) or full GitHub URL. Prompted with the list of bundled examples if omitted. |
| `-e, --example <name>` | Example to scaffold. Bare name (`hello`, `clickbench`) or full GitHub URL. If omitted, prompted from the manifest bundled in the installed package. |
| `-m, --package-manager <pm>` | `npm`, `pnpm`, `yarn`, or `bun`. Auto-detected from the invoking package manager. |
| `--skip-install` | Skip installing dependencies after scaffolding. |
| `-v, --version` | Print version. |
Expand All @@ -35,6 +43,7 @@ bun create chkit@latest my-app --example clickbench

| Name | Description |
| --- | --- |
| `hello` | Two small tables and one migration. Default in the repository manifest. |
| `clickbench` | Full ClickBench schema and dataset load against ObsessionDB / ClickHouse. |

See the [chkit documentation](https://chkit.obsessiondb.com) for the full list.
See the [chkit documentation](https://chkit.obsessiondb.com/getting-started/with-an-example/) for the scaffold flow.
Loading