LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

create-chkit

Scaffold a chkit ClickHouse project from an example

TLDR

Create a project in a new directory (npm, pnpm, Bun, or Yarn)
$ npm create chkit@latest [my-app] -- --example hello
copy
Same flow with the binary
$ npx create-chkit [my-app] --example hello
copy
Skip dependency install
$ create-chkit [my-app] --example hello --skip-install
copy
Preselect a database connection and skip the prompts
$ create-chkit [my-app] --example clickbench --connect later --skip-onboarding
copy

SYNOPSIS

create-chkit [directory] [-e name] [-m npm|pnpm|yarn|bun] [--skip-install] [--skip-onboarding] [--connect claim|account|clickhouse|later] [--email address] [--code code] [--org-name name]

DESCRIPTION

create-chkit scaffolds a new chkit project from an example. The npm package name is create-chkit, and the program it installs is create-chkit. npm create chkit, pnpm create chkit, bun create chkit, and yarn create chkit all run that program.The directory argument is the target. Omit it and the tool asks. --example is an example name (hello, clickbench) or a full GitHub URL. Omit it and the prompt lists the bundled examples with hello preselected. hello is two small tables and one migration, with no dataset load. clickbench is the ClickBench schema and a dataset load.--package-manager forces npm, pnpm, Yarn, or Bun. When it is omitted, the invoking package manager is detected. --skip-install leaves dependencies uninstalled. --skip-onboarding skips the database connection prompt. --connect preselects that prompt: claim, account, clickhouse, or later. --email and --code fill the claim flow so it does not ask. --org-name overrides the organization name created for a claim.After a normal scaffold, the project is a chkit app: schema files, a config, and a migration. Connect it with the same ClickHouse settings chkit uses, or claim an ObsessionDB instance from the prompt.

PARAMETERS

directory

Target directory for the new project. Prompted when omitted
-e, --example name
Example name or full GitHub URL. Prompted when omitted, with hello preselected
-m, --package-manager pm
npm, pnpm, yarn, or bun. Overrides auto-detection
--skip-install
Do not install dependencies after scaffolding
--skip-onboarding
Skip the database connection prompt
--connect choice
Preselect the connection: claim, account, clickhouse, or later
--email address
Email for the claim flow
--code code
One-time code for the claim flow
--org-name name
Organization name for the auto-created claim, instead of the default
-v, --version
Print the create-chkit version
-h, --help
Print help

CAVEATS

Passing extra flags through npm create needs -- before them (npm create chkit@latest my-app -- --example hello). --email and --code are the claim flow's credentials; do not put a real code in a shell history you share. --skip-install leaves a project that will not run until dependencies are installed. The example list can grow; the prompt is the list for the version you invoked.

HISTORY

create-chkit is the scaffold package in obsessiondb/chkit, MIT-licensed, beside the chkit CLI. Package version lines in the repo are 0.2.0-beta releases.

SEE ALSO

chkit(1), npm(1), pnpm(1), yarn(1), bun(1)

RESOURCES

Copied to clipboard
Kai