The CLI connects to the data source to introspect and generate. It needs the same environment your lakeql.config.ts references: data source hosts, credentials, and so on.
Loading an Env File #
Every command accepts the global --env [path] option. It loads an env file into the environment before the config is read, so a config that references env.* resolves its values:
pnpm lakeql-cli pull --env .env-
Given without a value,
--envdefaults to.env. - Relative paths resolve against the directory you ran the command from.
-
Loading uses Node's built-in
.envparser, so there is no extra dependency. -
A missing or unreadable file is a hard error, because you asked for it explicitly. Omit
--envto use the ambient environment instead.
CLI Log Level #
LOG_LEVEL controls the CLI's own verbosity. Set it to debug, info, warn, or error. It defaults to warn.
1
2
LOG_LEVEL=debug lakeql-cli pull --env .env