Skip to content

chkit pull

Shortcut for chkit plugin pull schema. Introspects your live ClickHouse instance and generates a deterministic schema file (TypeScript, or Python under chkit-py).

chkit pull [flags]
FlagTypeDefaultDescription
-o, --out-file <path>string—Override output file path
-d, --database <db>string—Limit pull to specific databases (repeat or comma-separate)
--dryrunbooleanfalsePrint the operation plan without writing files
-f, --forcebooleanfalseAllow overwriting an existing output file

Global flags documented on CLI Overview.

This command delegates to the pull plugin’s schema command. Register the pull plugin in your config’s plugins array to set its options (outFile, databases, …). Without a registration, chkit pull and chkit plugin pull schema run the installed pull plugin with its defaults, as chkit-py does. A pull plugin registered with enabled: false stays off: the command then fails with exit code 1 and “Pull plugin is not configured. Add it to config.plugins first.”

In chkit-py, pull is a built-in command, so there is no plugin to register; chkit pull schema and chkit plugin pull schema run it too.

Terminal window
chkit pull --out-file ./src/db/schema/pulled.ts
Terminal window
chkit pull --database analytics --dryrun
CodeMeaning
0Success
1Error
2Invalid plugin options