diff --git a/README.md b/README.md index bd6be02..41fcca1 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,26 @@ chkit is an open-source CLI for ClickHouse. Review migration SQL before applying [Get started](https://chkit.obsessiondb.com/getting-started/) · [Build a data source](https://chkit.obsessiondb.com/api-sync/quickstart/) · [Documentation](https://chkit.obsessiondb.com) -New to chkit? Scaffold the small [hello example](examples/hello) with `bun create chkit@latest my-app --example hello`, or clone that folder and follow its README. The heavier ClickBench load stays at [`examples/clickbench`](examples/clickbench). - > **Beta:** the public API is still evolving. Keep the CLI, core, and plugins on matching versions. +## Get started in 2 minutes + +Scaffold [hello](examples/hello), the default example: two MergeTree tables (`users` and `events`) and one migration. No dataset load. + +```sh +bun create chkit@latest my-app --example hello +cd my-app +# claim a free ObsessionDB instance from the prompt, or set CLICKHOUSE_URL +bun run migrate +bunx chkit query "SELECT name FROM system.tables WHERE database = 'default' AND name IN ('users', 'events') ORDER BY name" +``` + +Bare `bun create chkit@latest` uses the same hello default. The npm, pnpm, and yarn equivalents are `npm create chkit@latest`, `pnpm create chkit@latest`, and `yarn create chkit`. + +You can also clone [`examples/hello`](examples/hello) and follow its README. The heavier ClickBench path is `bun create chkit@latest my-app --example clickbench`, or [`examples/clickbench`](examples/clickbench). + +Continue in [Getting started](https://chkit.obsessiondb.com/getting-started/). + ## Why chkit - **Define tables and views.** Keep ClickHouse tables, views, materialized views, and dictionaries in code. Import the schema from an existing database. diff --git a/packages/create-chkit/README.md b/packages/create-chkit/README.md index 259deca..014f591 100644 --- a/packages/create-chkit/README.md +++ b/packages/create-chkit/README.md @@ -14,10 +14,10 @@ pnpm create chkit@latest yarn create chkit ``` -Pick an example by name: +Pick an example by name. `hello` is the default when `--example` is omitted: ```sh -bun create chkit@latest my-app --example clickbench +bun create chkit@latest my-app --example hello ``` ## Options @@ -25,7 +25,7 @@ bun create chkit@latest my-app --example clickbench | Flag | Description | | --- | --- | | `[project-directory]` | Target directory. Prompted if omitted. | -| `-e, --example ` | Example to scaffold. Bare name (`clickbench`) or full GitHub URL. Prompted with the list of bundled examples if omitted. | +| `-e, --example ` | Example to scaffold. Bare name (`hello`, `clickbench`) or full GitHub URL. Prompted with the list of bundled examples if omitted. `hello` is the default. | | `-m, --package-manager ` | `npm`, `pnpm`, `yarn`, or `bun`. Auto-detected from the invoking package manager. | | `--skip-install` | Skip installing dependencies after scaffolding. | | `-v, --version` | Print version. | @@ -35,6 +35,7 @@ bun create chkit@latest my-app --example clickbench | Name | Description | | --- | --- | -| `clickbench` | Full ClickBench schema and dataset load against ObsessionDB / ClickHouse. | +| `hello` | Default. Two small tables (`users`, `events`) and one migration. No dataset load. Claim a free ObsessionDB instance from the scaffold prompt, or set `CLICKHOUSE_URL`. | +| `clickbench` | Full ClickBench schema and dataset load against ObsessionDB or ClickHouse. | -See the [chkit documentation](https://chkit.obsessiondb.com) for the full list. +See [Getting started](https://chkit.obsessiondb.com/getting-started/).