The lakeql config file controls where the CLI places generated code. It is created by running lakeql-cli init.
Supported formats #
The CLI supports multiple config file formats, loaded in the following precedence order (first match wins):
-
lakeql.config.mjs(recommended) -
lakeql.config.ts -
lakeql.config.js -
lakeql.config.json
Config loading is powered by c12.
Configuration #
| Property | Type |
|---|---|
| sourcePath | string |
Base path for code generation (schemas, config-registry, etc.). Relative paths are resolved from the project root (where the config file lives). "." | |
Path resolution #
- Relative paths are resolved from the directory where the config file lives.
-
If
src/is detected duringlakeql-cli init,sourcePathis set to"src"automatically. -
The CLI
--source-pathflag overrides the config value for that invocation.
Examples #
MJS (recommended) #
1
2
3
4
5
6
7
// lakeql.config.mjs
/** @type {import('@lakeql/cli').LakeQLConfig} */
export default {
sourcePath: "src",
}
JSON #
1
2
3
4
{
"sourcePath": "src"
}
With either config, running lakeql-cli pull places generated files under src/schemas/generated/{catalog}/{schema}/{table}/.