LakeQL
Overview
  • Installation
Commands
  • init
  • pull
  • create-registry
  • list-schemas
  • list-tables
  • list-views
  • list-columns
  • create-endpoint
  • generate-import-config
Configuration
  • Environment Variables
  • Config File
GitHub
LakeQL
  1. CLI
  2. Overview
  3. Installation

On this page

  1. Install globally
  2. Run without installing
  3. Run within the monorepo
  4. Environment variables

Installation

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 #

npm install -g @lakeql/cli

Run without installing #

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

npx lakeql-cli

Run within the monorepo #

If you're working inside the LakeQL monorepo:

1
2
pnpm -F cli cli

Environment variables #

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

VariableRequiredDescription
HIVE_HOSTYesTrino host URL including protocol
HIVE_PORTYesTrino port
HIVE_USERNAMEYesAuthentication username
HIVE_PASSWORDYesAuthentication password
HIVE_CATALOGYesDefault catalog name

Create a .env file in your project root:

1
2
3
4
5
6
7
# .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.

1
2
3
4
5
6
7
8
9
10
11
# 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

Previous page

Overview

Next page

Commands