Lakehousecat CLI
The lhc command-line interface is one of four ways to interact with Lakehousecat — alongside the UI, the REST API, and the Claude Code Plugin (which drives this CLI through natural-language skills). It gives you full terminal control over your instance: datasource management, model configuration, user provisioning, analytics, and more. Every operation available through the REST API is accessible via lhc.
This reference documents the supported public CLI surface. Commands and flags not listed here are internal to the CLI tool and subject to change without notice.
Installation
Download the latest lhc binary for your platform from cli.lakehousecat.com:
# macOS / Linux — one-liner (detects platform automatically)
V=$(curl -fsSL https://cli.lakehousecat.com/latest/manifest.json | python3 -c "import json,sys; print(json.load(sys.stdin)['version'])")
OS=$(uname -s | tr A-Z a-z)
ARCH=$(uname -m | sed "s/x86_64/amd64/;s/aarch64/arm64/")
curl -fsSL "https://cli.lakehousecat.com/$V/$OS-$ARCH/lhc" -o "lhc-$OS-$ARCH"
curl -fsSL "https://cli.lakehousecat.com/$V/checksums.txt" | grep " lhc-$OS-$ARCH\$" | shasum -a 256 --check
mkdir -p ~/.local/bin
install -m 0755 "lhc-$OS-$ARCH" ~/.local/bin/lhc
Make sure ~/.local/bin is on your PATH (export PATH="$HOME/.local/bin:$PATH"). To install
system-wide instead, use sudo install -m 0755 "lhc-$OS-$ARCH" /usr/local/bin/lhc — plain curl -o
into /usr/local/bin fails without sudo on most Linux/WSL setups.
Or download a specific version directly:
| Platform | URL |
|---|---|
| macOS (Apple Silicon) | https://cli.lakehousecat.com/<version>/darwin-arm64/lhc |
| macOS (Intel) | https://cli.lakehousecat.com/<version>/darwin-amd64/lhc |
| Linux (x86_64) | https://cli.lakehousecat.com/<version>/linux-amd64/lhc |
| Linux (ARM64) | https://cli.lakehousecat.com/<version>/linux-arm64/lhc |
| Windows (x86_64) | https://cli.lakehousecat.com/<version>/windows-amd64/lhc.exe |
| Windows (ARM64) | https://cli.lakehousecat.com/<version>/windows-arm64/lhc.exe |
The latest version and release date are always available at:
https://cli.lakehousecat.com/latest/manifest.json
After downloading, verify the binary with the published checksums. checksums.txt lists entries by
platform-suffixed filename (e.g. lhc-linux-amd64), not by the plain lhc name the download URL
ends in — save the download under that same platform-suffixed name so the checksum line matches it,
then filter to that one line before checking:
curl -fsSL "https://cli.lakehousecat.com/<version>/checksums.txt" | grep " lhc-<os>-<arch>\$" | shasum -a 256 --check
Authentication
All commands require a configured profile with an API key. Generate your API key in the Lakehousecat UI:
Account Settings → Security → API Keys → Generate API Key
Store it in a profile:
lhc configure
# Endpoint (e.g. https://my.lakehousecat.com): https://acme.lakehousecat.com
# API Key: lhc-...
This writes the key to ~/.lhc/credentials and the endpoint to ~/.lhc/config. See Authentication & Setup for the full setup guide.
To confirm which user a key resolves to, and with which role, use whoami:
lhc whoami
Global Flags
All lhc commands accept these flags:
| Flag | Description |
|---|---|
--profile <name> | Use a specific named profile (default: default) |
--select <fields> | Comma-separated fields to include in table output (e.g., id,name,status) |
--insecure | Skip TLS certificate verification (for self-signed certs) |
--ca-cert <path> | Trust a specific PEM certificate for this connection (for self-signed certs), without disabling verification entirely. Mutually exclusive with --insecure. |
--output table|json|yaml | Output format (default: table) |
--json | Shorthand for --output json |
The environment variable LHC_PROFILE overrides --profile.
--ca-cert and --insecure cannot be combined — the CLI exits with an error if both are set,
either as flags or as a flag against a profile that already has ca_cert configured (see
configure). See Self-Signed Certificates for when to use which.
In table output, *_at timestamp fields (created_at, updated_at, expires_at, etc.) are automatically rendered as YYYY-MM-DD HH:MM (UTC) instead of raw Unix epoch values.
Command Groups
| Group | Service | Description |
|---|---|---|
instance | LHC Core | Instance version, license state, and encryption-key rotation |
users | LHC Core | Invite and manage users |
groups | LHC Core | Manage groups and membership |
models | LHC Core | Manage custom models, export and import |
sessions | LHC Core / LLM | Manage chat sessions |
jobs | LHC Core | Manage job definitions and runs |
prompts | LHC Core | Create and manage reusable prompt templates |
backup / restore | LHC Core | Trigger full backup and restore of Postgres, ClickHouse, and object storage |
samples | LHC Core | Install bundled Sample packages (datasources, model, data, dashboards) |
datasources | Semantic | Manage semantic datasources, export and import |
semantic | Semantic | Semantic extraction, hierarchies, and descriptions |
analytics | Analytics | Generate charts, run pipeline steps, validate SQL |
charts | Analytics | Manage and share charts |
dashboards | Analytics | Manage, share, and approve dashboards |
configure | — | Manage CLI profiles |
whoami | LHC Core | Show the identity and role behind the configured API key |
Use Cases
The following guides walk through end-to-end scenarios using the CLI:
| Use Case | Commands involved |
|---|---|
| Authentication & Setup | configure, whoami, instance info |
| Manage Datasources | datasources * |
| Manage Models | models * |
| Manage Users & Groups | users *, groups * |
| Manage Sessions | sessions * |
| Manage Analytics | charts *, dashboards * |
| Manage Jobs | jobs * |
| Backup & Restore | backup, restore |
Scope Limitations
The following capabilities are not available through the CLI:
- Audio transcription — use the Audio API directly
- Chat / LLM interaction — the CLI manages configuration, not interactive sessions