docId: cli

source: cli

slug: cli

title: LakeQL CLI

documentType: unknown

contentOrigin: static-doc

content:
---
title: LakeQL CLI
navTitle: CLI
description: Schema introspection and code generation CLI.
entrypoint: /docs/cli/overview/installation
---

navTitle: CLI

keywords: lakeql schema introspection generation


docId: cli/commands/create-endpoint

slug: commands/create-endpoint

title: create-endpoint

text: create-endpoint

content:
---
title: create-endpoint
navTitle: create-endpoint
description: Generate a custom endpoint from a JSON definition file.
---

# create-endpoint

Generate a custom endpoint (query + mutation) from a JSON definition file. The definition file can be created using the [Endpoint Builder](/endpoint-builder) UI or written by hand.

## Generated files

Files are written to `schemas/custom/<catalog>/<schema>/<tableName>/`:

- `config.ts` — Endpoint configuration
- `interface.ts` — TypeScript interface for the endpoint fields
- `query-schema.ts` — GraphQL query schema definition
- `mutation-schema.ts` — GraphQL mutation schema with write pipeline resolver (only when mutation is configured)
- `validations.ts` — Zod validation schema (only when fields have validations configured)
- `json-schema.json` — JSON Schema representation
- `endpoint.json` — The endpoint definition (for re-generation)

<Note>
  The `mutation-schema.ts` and `validations.ts` files are only generated when
  the endpoint definition includes mutation configuration. Query-only endpoints
  skip these files entirely.
</Note>

## Usage

```bash
lakeql-cli create-endpoint --from-file ./my-endpoint.json
```

### With mutation enabled

```
✔ Loaded definition: user_events (catalog: hive, schema: analytics)
  → schemas/custom/hive/analytics/user_events/config.ts
  → schemas/custom/hive/analytics/user_events/interface.ts
  → schemas/custom/hive/analytics/user_events/query-schema.ts
  → schemas/custom/hive/analytics/user_events/mutation-schema.ts
  → schemas/custom/hive/analytics/user_events/validations.ts
  → schemas/custom/hive/analytics/user_events/json-schema.json
  → schemas/custom/hive/analytics/user_events/endpoint.json
  Load strategy: full_load
✔ Config registry updated
```

### Without mutation (query-only)

```
✔ Loaded definition: my_table (catalog: analytics, schema: tracking)
  → schemas/custom/analytics/tracking/my_table/config.ts
  → schemas/custom/analytics/tracking/my_table/interface.ts
  → schemas/custom/analytics/tracking/my_table/query-schema.ts
  → schemas/custom/analytics/tracking/my_table/json-schema.json
  → schemas/custom/analytics/tracking/my_table/endpoint.json
  mutation: disabled
✔ Config registry updated
```

## Definition file format

The JSON definition file must conform to the `EndpointDefinitionFormat` schema:

```json
{
  "version": "1.0",
  "tableName": "user_events",
  "catalog": "hive",
  "schema": "analytics",
  "fields": [
    {
      "name": "email",
      "type": "String",
      "options": {
        "required": true,
        "validations": [{ "type": "email" }]
      }
    },
    {
      "name": "age",
      "type": "Integer",
      "options": {
        "required": false,
        "validations": [
          { "type": "min", "value": 0 },
          { "type": "max", "value": 150 }
        ]
      }
    },
    { "name": "event_id", "type": "String" },
    { "name": "timestamp", "type": "DateTime" },
    {
      "name": "metadata",
      "type": "Object",
      "fields": [{ "name": "source", "type": "String" }]
    },
    {
      "name": "tags",
      "type": "Array",
      "items": { "type": "String" }
    }
  ],
  "mutation": {
    "loadStrategy": "full_load",
    "type": "s3",
    "bucket": "my-datalake",
    "basePath": "warehouse/analytics/user_events",
    "endpoint": "https://s3.eu-central-1.amazonaws.com"
  }
}
```

### Supported field types

- **Primitives:** String, Integer, Float, Boolean, Date, DateTime
- **Object:** Nested object with child fields (max 5 levels)
- **Array:** Array of primitives or objects

### Mutation configuration

The optional `mutation` field controls whether a write pipeline is generated for this endpoint. Set it to `false` (or omit it) for query-only endpoints. Set it to a configuration object to enable the mutation pipeline.

<InterfaceReference
  file="schema-generator/src/endpoint-schema"
  name="MutationConfig"
/>

<Note>
  The `type` field defaults to `"s3"`. Use `"minio"` for local development with
  a MinIO-compatible endpoint. See the [Mutations
  guide](/lakeql/guides/mutations#storage-configuration) for environment
  variable details.
</Note>

#### Mutation with partitioning options

```json
{
  "mutation": {
    "loadStrategy": "append",
    "type": "s3",
    "bucket": "my-datalake",
    "basePath": "warehouse/raw/events",
    "partitioning": "event_date",
    "partitioningFormat": "year/month"
  }
}
```

The `partitioning` and `partitioningFormat` fields are omitted from generated configs when `loadStrategy` is `full_load`. See the [Mutations guide](/lakeql/guides/mutations#partitioning) for full details on each partitioning mode.

See the [Load Strategies](/lakeql/guides/load-strategies) guide for details on when to use each strategy.

<Note>
  Endpoints generated via the `pull` command always set `mutation: false` since
  pulled tables are query-only by default.
</Note>

### Field options

Each field can include an optional `options` object to control mutation input behavior:

<InterfaceReference
  file="schema-generator/src/endpoint-schema"
  name="FieldOptions"
/>

<Note>
  When timestamp-based partitioning is active, the Endpoint Builder
  automatically adds `load_timestamp` (DateTime), `load_timestamp_year`
  (Integer), and `load_timestamp_month` (Integer) fields with `readOnly: true`.
  These fields are populated by the write pipeline at runtime and are queryable
  in Hive and directly in Parquet, but users cannot provide them as mutation
  input.
</Note>

#### Available validations

| Validation | Applies to     | Description                     | Example                                    |
| ---------- | -------------- | ------------------------------- | ------------------------------------------ |
| `email`    | String         | Must be a valid email address   | `{ "type": "email" }`                      |
| `url`      | String         | Must be a valid URL             | `{ "type": "url" }`                        |
| `uuid`     | String         | Must be a valid UUID            | `{ "type": "uuid" }`                       |
| `min`      | Integer, Float | Minimum numeric value           | `{ "type": "min", "value": 0 }`            |
| `max`      | Integer, Float | Maximum numeric value           | `{ "type": "max", "value": 150 }`          |
| `regex`    | String         | Must match a regular expression | `{ "type": "regex", "pattern": "^[A-Z]" }` |

### Validation rules

- `tableName`, `catalog`, `schema`: alphanumeric + underscore, no leading digit, max 128 chars
- Field names: alphanumeric + underscore, no leading digit, max 64 chars
- No duplicate field names at the same nesting level
- Object fields must have at least 1 child field

## Workflow

1. Use the [Endpoint Builder](/endpoint-builder) to define your schema visually
2. Configure mutation support and load strategy if write operations are needed
3. Download the JSON definition file
4. Run `lakeql-cli create-endpoint --from-file ./your-endpoint.json`
5. The generated mutation resolver is fully wired to the write pipeline — no manual stub implementation needed

## Options

<CliCommandDetails command="create-endpoint" />

navTitle: create-endpoint

keywords: create-endpoint generate custom endpoint definition


docId: cli/commands/create-registry

slug: commands/create-registry

title: lakeql-cli create-registry

text: Syntax

text: Usage

text: Options

content:
---
title: "lakeql-cli create-registry"
navTitle: "create-registry"
description: Generates the config registry for type-safe permissions.
---

Scans your project for all `schemas/**/config.ts` files and generates a unified `config-registry.ts`. This registry enables type-safe usage of `createPermission` across your endpoints.

## Syntax

```bash
lakeql-cli create-registry [options]
```

## Usage

```bash
lakeql-cli create-registry
```

```
✔ Found 4 config files in schemas/
✔ Generated config-registry.ts
```

The generated file imports all discovered config modules and re-exports them as a typed registry object.

## Options

<CliCommandDetails command="create-registry" />

navTitle: create-registry

keywords: lakeql-cli create-registry generates config registry


docId: cli/commands/generate-import-config

slug: commands/generate-import-config

title: lakeql-cli generate-import-config

text: Syntax

text: Usage

text: How it works

text: Options

content:
---
title: "lakeql-cli generate-import-config"
navTitle: "generate-import-config"
description: Generate an import.config.mjs from already-pulled schemas.
cliCommand: "generate-import-config"
---

Scans the `schemas/generated/` directory and generates a ready-to-use `import.config.mjs` for the [`pull --bulk`](/cli/commands/pull#bulk-mode) command.

This is useful when you have already pulled a set of schemas and want to re-use them as a bulk config — without having to maintain the file by hand.

## Syntax

```bash
lakeql-cli generate-import-config [options]
```

## Usage

```bash
lakeql-cli generate-import-config
```

If the output file does not exist yet, the command writes it directly:

```
Written to "/my-project/import.config.mjs".
```

### Overwriting an existing file

If the output file already exists, the command warns and prompts for confirmation before overwriting:

Use `--force` to skip the prompt entirely:

```bash
lakeql-cli generate-import-config --force
```

### Custom output path

```bash
lakeql-cli generate-import-config --output ./config/bulk.mjs
```

## How it works

The command reads your `lakeql.config` config file to determine the base path for generated files (same as all other commands).
The `--source-path` flag overrides the config value if needed.

It then scans the directory structure under `schemas/generated/`:

```
schemas/generated/
└── <catalog>/
    └── <schema>/
        └── <table>/       ← each subdirectory becomes a table entry
```

Each catalog/schema combination becomes one entry in the generated config.
Schemas that contain no table subdirectories are silently skipped.

## Options

<CliCommandDetails command="generate-import-config" />

navTitle: generate-import-config

keywords: lakeql-cli generate-import-config generate importconfigmjs already-pulled


docId: cli/commands/init

slug: commands/init

title: lakeql-cli init

text: Syntax

text: Usage

text: Options

content:
---
title: "lakeql-cli init"
navTitle: "init"
description: Initialize a lakeql.config.json configuration file in your project.
---

Scaffolds a `lakeql.config.json` file in the current directory. This config controls where generated code is placed.

If no `src/` directory is detected, the CLI prompts you to choose or specify a source path. If `src/` exists, it is used automatically.

## Syntax

```bash
lakeql-cli init
```

## Usage

```bash
lakeql-cli init
```

```
Detected src/ directory — generated code will be placed in src/
Created lakeql.config.json at /path/to/project/lakeql.config.json
```

If `lakeql.config.json` already exists, the CLI asks whether to overwrite it.

## Options

This command has no options.

navTitle: init

keywords: lakeql-cli initialize lakeqlconfigjson configuration project


docId: cli/commands/list-columns

slug: commands/list-columns

title: lakeql-cli list-columns

text: Syntax

text: Usage

text: Options

content:
---
title: "lakeql-cli list-columns"
navTitle: "list-columns"
description: Lists columns for the specified table including types and descriptions.
---

Queries Trino and prints all columns for a specific table, including their data types, extra metadata, and descriptions.

## Syntax

```bash
lakeql-cli list-columns [options]
```

## Usage

```bash
lakeql-cli list-columns --catalog hive --schema analytics --table users
```

```
┌─────────────┬──────────┬───────┬─────────────────────┐
│ Column Name │ Type     │ Extra │ Description         │
├─────────────┼──────────┼───────┼─────────────────────┤
│ id          │ varchar  │       │ Unique identifier   │
│ email       │ varchar  │       │ User email address  │
│ created_at  │ timestamp│       │ Account creation ts │
│ is_active   │ boolean  │       │ Whether user active │
└─────────────┴──────────┴───────┴─────────────────────┘
```

## Options

<CliCommandDetails command="list-columns" />

navTitle: list-columns

keywords: lakeql-cli list-columns lists columns specified


docId: cli/commands/list-schemas

slug: commands/list-schemas

title: lakeql-cli list-schemas

text: Syntax

text: Usage

text: Options

content:
---
title: "lakeql-cli list-schemas"
navTitle: "list-schemas"
description: Lists available schemas for the configured catalog.
---

Queries Trino and prints all schemas available in the specified catalog.

## Syntax

```bash
lakeql-cli list-schemas [options]
```

## Usage

```bash
lakeql-cli list-schemas --catalog hive
```

```
┌─────────────┐
│ Schema Name │
├─────────────┤
│ default     │
│ analytics   │
│ staging     │
│ raw         │
└─────────────┘
```

## Options

<CliCommandDetails command="list-schemas" />

navTitle: list-schemas

keywords: lakeql-cli list-schemas lists available schemas


docId: cli/commands/list-tables

slug: commands/list-tables

title: lakeql-cli list-tables

text: Syntax

text: Usage

text: Options

content:
---
title: "lakeql-cli list-tables"
navTitle: "list-tables"
description: Lists available tables for the configured catalog and schema.
---

Queries Trino and prints all tables in the specified catalog and schema. If `--schema` is not provided, the CLI prompts you to select one interactively.

## Syntax

```bash
lakeql-cli list-tables [options]
```

## Usage

```bash
lakeql-cli list-tables --catalog hive --schema analytics
```

```
┌────────────────┐
│ Table Name     │
├────────────────┤
│ users          │
│ events         │
│ sessions       │
│ page_views     │
└────────────────┘
```

## Options

<CliCommandDetails command="list-schemas" />

navTitle: list-tables

keywords: lakeql-cli list-tables lists available tables


docId: cli/commands/list-views

slug: commands/list-views

title: lakeql-cli list-views

text: Syntax

text: Usage

text: Options

content:
---
title: "lakeql-cli list-views"
navTitle: "list-views"
description: Lists available views for the configured catalog and schema.
---

Queries Trino and prints all views in the specified catalog and schema. If `--schema` is not provided, the CLI prompts you to select one interactively.

## Syntax

```bash
lakeql-cli list-views [options]
```

## Usage

```bash
lakeql-cli list-views --catalog hive --schema analytics
```

```
┌──────────────────────┐
│ View Name            │
├──────────────────────┤
│ active_users         │
│ daily_revenue        │
│ session_aggregates   │
└──────────────────────┘
```

## Options

<CliCommandDetails command="list-views" />

navTitle: list-views

keywords: lakeql-cli list-views lists available views


docId: cli/commands/pull

slug: commands/pull

title: lakeql-cli pull

text: Usage

text: Bulk mode

text: Error output

text: Generated files

text: Options

content:
---
title: "lakeql-cli pull"
navTitle: "pull"
description: Interactive query endpoint generation based on a remote table.
cliCommand: "pull"
---

Connects to Trino, introspects table columns, and generates a full set of TypeScript files for type-safe query endpoints. When run without flags, the command walks you through interactive prompts to select a schema and tables.

## Usage

```bash
lakeql-cli pull [options]
```

```bash
lakeql-cli pull --catalog hive --schema myschema --table users
```

```
› Pulling 1 item(s) from hive.myschema into ./src/schemas/generated...
❯ Pull 1 item(s)
  ✓ hive.myschema.users
✓ Pull 1 item(s)
✓ Create registry
✔ Pull completed: 1 item(s) generated under ./src/schemas/generated/hive/myschema
```

The registry is generated once after all selected items are processed.

When more than 10 tables are selected in non-bulk mode, `pull` switches to a compact live progress view (`Completed X/Y | Active A/B`) with active load preview, instead of rendering one task line per table.
Use `--concurrency <count>` to override the default limit of `8` concurrent pull operations.

## Bulk mode

When `--bulk` is specified, the command reads a config file and processes multiple schemas and tables in parallel — instead of using interactive prompts.

### Syntax

```bash
lakeql-cli pull --bulk [options]
```

### Config file

The config file is automatically detected by looking for `import.config.{mjs,ts,js,json}` in the current directory (powered by [c12](https://github.com/unjs/c12)). You can override this with `--bulk-config`.

Use the `@type` JSDoc annotation for type-safety and autocomplete:

```javascript
// import.config.mjs

/** @type {import('@lakeql/cli').BulkPullConfig} */
export default [
  {
    schema: "sales",
    tables: ["orders", "customers", "products"],
    views: ["daily_revenue"],
  },
  {
    schema: "analytics",
    tables: ["events", "sessions"],
  },
  {
    schema: "inventory",
    catalog: "warehouse", // optional catalog override per entry
    tables: ["stock_levels"],
    views: ["low_stock_alerts"],
  },
]
```

#### Supported formats

The config file can be any of the following (in precedence order):

1. `import.config.mjs`
2. `import.config.ts`
3. `import.config.js`
4. `import.config.json`

### Config schema

Each entry in the array has the following shape:

| Field     | Type       | Required | Description                      |
| --------- | ---------- | -------- | -------------------------------- |
| `schema`  | `string`   | Yes      | The schema to pull from          |
| `catalog` | `string`   | No       | Catalog override for this entry  |
| `tables`  | `string[]` | No       | Non-empty list of tables to pull |
| `views`   | `string[]` | No       | Non-empty list of views to pull  |

At least one non-empty list (`tables` or `views`) must be provided per entry.
Entries with both lists missing or empty fail validation before execution.

### Catalog precedence

The catalog is resolved in the following order (first match wins):

1. `--catalog` CLI flag (highest priority)
2. `catalog` field in the config entry
3. `HIVE_CATALOG` environment variable (fallback)

### Execution behavior

- All schema entries are processed **in parallel** for faster execution.
- Tables and views within a single entry are processed sequentially for small entries.
- Bulk item pulls are capped globally at 8 concurrent operations across the whole bulk run by default.
- Bulk entries with more than 10 items switch to bounded parallel item processing under that global cap.
- Use `--concurrency <count>` to raise or lower that limit for both bulk and non-bulk multi-item pulls.
- The config registry is generated **once** at the end (not per entry).
- If one entry fails, the remaining entries continue to execute.
- Progress is displayed using a structured task list in the terminal.
- Bulk entries with more than 10 items switch to the same compact live progress view used by large non-bulk pulls.

### Usage

```bash
# Auto-detect config file (import.config.mjs, .ts, .js, or .json)
lakeql-cli pull --bulk

# Using a custom config file
lakeql-cli pull --bulk --bulk-config=./my-import.config.mjs

# With global catalog override
lakeql-cli pull --bulk --catalog my_catalog

# With a custom concurrency limit
lakeql-cli pull --bulk --concurrency 5

# Skip registry generation
lakeql-cli pull --bulk --skip-registry
```

### Terminal output

```
⠋ Pull data
  ✓ hive/sales — 4 item(s) pulled
  ⠋ hive/analytics — 11 item(s)
    › Completed 6/11 | Active 5/8
    ›   - hive.analytics.events_6
    ›   - hive.analytics.events_7
    ›   - hive.analytics.events_8
    ›   - hive.analytics.events_9
    ›   - hive.analytics.events_10
  ✓ warehouse/inventory — 2 item(s) pulled
✓ Pull data
✓ Create registry
```

## Error output

When a request fails, the CLI prints structured output with context and hints:

```text
✖ LakeQL CLI failed.
› Reason: Failed to list schemas.
› Context: list-schemas (catalog=hive)
› Root cause: fetch failed
› Error code: ECONNREFUSED
› Hint: Verify HIVE_HOST/HIVE_PORT, credentials and network reachability to Trino.
```

For non-error aborts (for example prompt cancellation), the headline is shown as a warning and the command exits with code `0`.

### Type export

The `BulkPullConfig` and `BulkPullEntry` types are exported from `@lakeql/cli` for use in your config file:

```ts
import type { BulkPullConfig, BulkPullEntry } from "@lakeql/cli"
```

## Generated files

For each selected table, the following files are created under `schemas/generated/{catalog}/{schema}/{table}/`:

- `config.ts` — Endpoint configuration
- `interface.ts` — TypeScript interface for the table columns
- `query-schema.ts` — GraphQL query schema definition
- `json-schema.json` — JSON Schema representation
- `endpoint.json` — Endpoint definition for re-generation

`pull` generates query-only endpoints, so `mutation-schema.ts` is not created for pulled tables.

Field names from source schemas are normalized to valid identifier names during generation (for example, spaces become underscores).
If two source fields normalize to the same generated name, generation fails with a clear collision error instead of producing ambiguous output.

## Options

<CliCommandDetails command="pull" />

navTitle: pull

keywords: lakeql-cli interactive query endpoint generation


docId: cli/configuration/config-file

slug: configuration/config-file

title: Config File

text: Supported formats

text: Configuration

text: Path resolution

text: Examples

content:
---
title: Config File
description: Reference for the lakeql config file.
---

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):

1. `lakeql.config.mjs` (recommended)
2. `lakeql.config.ts`
3. `lakeql.config.js`
4. `lakeql.config.json`

Config loading is powered by [c12](https://github.com/unjs/c12).

## Configuration

<InterfaceReference file="cli/src/config" name="LakeQLConfig" />

## Path resolution

- Relative paths are resolved from the directory where the config file lives.
- If `src/` is detected during `lakeql-cli init`, `sourcePath` is set to `"src"` automatically.
- The CLI `--source-path` flag overrides the config value for that invocation.

## Examples

### MJS (recommended)

```javascript
// lakeql.config.mjs

/** @type {import('@lakeql/cli').LakeQLConfig} */
export default {
  sourcePath: "src",
}
```

### JSON

```json
{
  "sourcePath": "src"
}
```

With either config, running `lakeql-cli pull` places generated files under `src/schemas/generated/{catalog}/{schema}/{table}/`.

description: Reference for the lakeql config file.

keywords: config reference lakeql supported formats


docId: cli/configuration/environment-variables

slug: configuration/environment-variables

title: Environment Variables

text: Required variables

text: Optional variables

text: Example .env file

content:
---
title: Environment Variables
description: All environment variables used by the LakeQL CLI for Trino connectivity.
---

The LakeQL CLI reads connection details from environment variables. These are required for any command that communicates with Trino.

## Required variables

| Variable        | Type   | Description                                                          |
| --------------- | ------ | -------------------------------------------------------------------- |
| `HIVE_HOST`     | string | Trino host URL including protocol (e.g. `https://trino.example.com`) |
| `HIVE_PORT`     | number | Trino port (e.g. `443`)                                              |
| `HIVE_USERNAME` | string | Authentication username                                              |
| `HIVE_PASSWORD` | string | Authentication password                                              |
| `HIVE_CATALOG`  | string | Default catalog name used when `--catalog` is not provided           |

## Optional variables

| Variable      | Type   | Default | Description                                        |
| ------------- | ------ | ------- | -------------------------------------------------- |
| `HIVE_SOURCE` | string | —       | Optional source identifier sent to Trino           |
| `LOG_LEVEL`   | string | `warn`  | Log verbosity: `debug`, `info`, `warn`, or `error` |

## Example .env file

```bash
# .env
HIVE_HOST=https://trino.example.com
HIVE_PORT=443
HIVE_USERNAME=service-account
HIVE_PASSWORD=s3cur3-p4ssw0rd
HIVE_CATALOG=hive
LOG_LEVEL=info
```

The CLI does not load `.env` automatically.
Make sure variables are present in the process environment before running commands.

You can do this in different ways:

- export variables in your shell session
- use a wrapper like `dotenv-cli`
- run commands through your process manager or CI environment

Example with `dotenv-cli`:

```bash
dotenv -e ./.env -- lakeql-cli pull
```

keywords: variables environment lakeql trino connectivity


docId: cli/overview/installation

slug: overview/installation

title: Installation

text: Install globally

text: Run without installing

text: Run within the monorepo

text: Environment variables

content:
---
title: Installation
description: How to install and run the LakeQL CLI for schema introspection and code generation.
---

The LakeQL CLI (`@lakeql/cli`) orchestrates schema introspection from Trino and generates TypeScript code — interfaces, query schemas, and configs — that power type-safe GraphQL query endpoints in your project.

## Install globally

<Command variant="install">-g @lakeql/cli</Command>

## Run without installing

Use `npx` or `pnpm dlx` to invoke the CLI without a global install:

<Command variant="exec">lakeql-cli</Command>

## Run within the monorepo

If you're working inside the LakeQL monorepo:

```bash
pnpm -F cli cli
```

## Environment variables

The CLI connects to Trino for schema introspection. Set the following environment variables before running any command:

| Variable        | Required | Description                       |
| --------------- | -------- | --------------------------------- |
| `HIVE_HOST`     | Yes      | Trino host URL including protocol |
| `HIVE_PORT`     | Yes      | Trino port                        |
| `HIVE_USERNAME` | Yes      | Authentication username           |
| `HIVE_PASSWORD` | Yes      | Authentication password           |
| `HIVE_CATALOG`  | Yes      | Default catalog name              |

Create a `.env` file in your project root:

```bash
# .env.example
HIVE_HOST=https://trino.example.com
HIVE_PORT=443
HIVE_USERNAME=your-username
HIVE_PASSWORD=your-password
HIVE_CATALOG=hive
```

The CLI does not auto-load `.env` files.
Load variables into the process environment before invocation.

```bash
# Option 1: export in your shell
export HIVE_HOST=https://trino.example.com
export HIVE_PORT=443
export HIVE_USERNAME=your-username
export HIVE_PASSWORD=your-password
export HIVE_CATALOG=hive
lakeql-cli pull

# Option 2: use dotenv-cli
dotenv -e ./.env -- lakeql-cli pull
```

keywords: install installation lakeql schema introspection