Help · section 31 of 44

Command-Line Interface (dlake)

Mirrors the in-app Help. The live copy in your console and `dlake guide help` are always current.

dlake is the Data Lake’s command-line client (in the spirit of the Stripe / HubSpot CLIs) — script your tenant from a terminal or CI with an API key. The CLI entry in the left menu opens the full guide with every command.

Install — download the self-contained binary for your platform (no runtime needed) and put it on your PATH:

macOS — sign the binary once after downloading. The Mac builds ship unsigned, so run xattr -dr com.apple.quarantine ./dlake then codesign --force --sign - ./dlake (then chmod +x ./dlake). On Apple Silicon this is required for reliability, not just for Gatekeeper: an unsigned binary is validated page-by-page as it runs and can abort intermittently at startupSystem.AccessViolationException ... at Thread+StartHelper.InitializeCulture(), typically on rapid back-to-back invocations, where a retry succeeds. Ad-hoc signing removes it. (The InitializeCulture frame is misleading: dlake runs with invariant globalization on every platform, so there is no culture data involved.)

Sign in once per tenant with an API key (generate one under Settings → API Keys), then work:

dlake register login --email you@example.com      # resume a registration on a new machine
dlake login --domain yourcompany --api-key dlk_...   # stores an encrypted profile (short tenant slug)
dlake keys list                                   # your keys, grouped state incl. project
dlake query "SELECT TOP 10 * FROM DLO.MyTable"    # read-only SQL (RLS-scoped)
dlake export MyTable --format parquet -o my.parquet
dlake s3 put sales ./my.parquet exports/       # stream a file to an S3 bucket
dlake s3 export sales MyTable --format parquet # export a table straight to S3
dlake docs upload invoice.pdf --title "March invoice" --keywords billing
dlake docs upload photo.png --markdown desc.md  # supply a description so an image is searchable
dlake docs search "unpaid invoices" --top 5
dlake admin list                                  # every admin-plane tool, driven generically
dlake admin dab_status
dlake crmpro processes                            # the forward ERP → CRM sync grid
dlake normalsync selected                         # the ERP tables Normal Sync clones

Passing argument values. dlake admin <tool> / dlake tool <tool> map --arg value onto each tool’s JSON schema. Booleans take true/false/1/0/yes/no; an arg whose type is an array or object takes JSON--columns '[{"name":"Id","type":"INT","identity":true,"primaryKey":true}]' — or, better, @file.json to read the value from a file: --columns @columns.json. @file works for any argument (and is the reliable form on Windows, where the shell mangles quoted JSON); @@ passes a literal leading @. Simple lists still accept the comma form (--columns sku,region, --ids 1,2,3). dlake admin <tool> --help prints the schema and repeats these conventions.

Keeping an eye on it — dlake watch. dlake watch polls the surfaces your Data Lake depends on (both APIs, the Data API plane, the sign-up catalog, the published CLI downloads and — with --profile — your own tenant’s web app, its three planes and a live SELECT 1) and alerts you the moment one of them changes state, rather than every cycle. An alert is a timestamped console line plus a desktop notification and the terminal bell, and optionally a small JSON document posted to --webhook (flat, with a ready-made text field, so it reads correctly in Slack or Teams) and appended to --log. A single failed probe is absorbed; two in a row declare a check down, and one success declares it back. dlake watch --once runs a single cycle and exits 0 if everything passed and 1 if anything did not, which is all a cron entry or a scheduled task needs. Nothing is stored and there is no config file.

dlake watch                                     # live table, refreshed every 60s
dlake watch --profile acme --webhook https://hooks.example.com/xyz
dlake watch --once --quiet                      # for a scheduler: exit 0 = all healthy

Multiple tenants = multiple profiles (--profile), like the Stripe CLI’s projects. Everything supports --json for scripting. The dlake admin <tool> passthrough exposes the full Admin Control Plane above — the same tools your key can use (dlake admin list prints them), same permission rules (full-scope admin key), with --help generated from each tool’s schema. First-class dlake s3 … commands add the object-storage outlet (connections, browse, streaming put/get, and table-to-S3 export).