Help · section 31 of 46
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:
- Windows (win-x64)
- Linux x64
- Linux ARM64 (linux-arm64)
- macOS Apple Silicon (osx-arm64)
- macOS Intel (osx-x64)
- SHA256 checksums · or
npm install -g @commercient/dlake
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 startup — System.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
dlake setup export-spec --out setup-spec.json # this tenant's setup as one JSON document (no secrets)
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; the schema comes live from the MCP host when a profile is given, and --help on any command works without one. In PowerShell, quote @file values (--columns "@columns.json"): a bare leading @ is the splatting operator. On dlake admin, a tool with a single object argument (such as a wizard step’s fields) also takes a repeated --field Name=Value: each one sets one name over any JSON given for that argument, and Name=@path reads the value from a file, the easy way to pass a Windows path or a password.
Keeping an eye on it — dlake watch. dlake watch polls the surfaces the CLI depends on (the MCP host, the sign-up catalog, the published CLI downloads and — with --profile — a live SELECT 1 through your own key) 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). Every command after sign-in goes through the MCP host, so the CLI works from any network; dlake keys, dlake projects, dlake s3 and the view changes (dlake view show|create|alter|drop) run on the admin plane and therefore also need a full-scope key owned by an Admin user, while dlake query, dlake export, dlake docs and dlake view list (the views exposed through the Data API) run on the data plane and work with scoped keys.