CLI Reference
Install
macOS, Linux
curl -fsSL https://hotdata.dev/install | sh
Uses Homebrew (brew install hotdata-dev/tap/cli) when brew is present,
otherwise installs a prebuilt binary into ~/.hotdata/cli. Set
HOTDATA_NO_BREW=1 to skip Homebrew.
From source (requires Rust)
cargo install --path .
Or download a binary from Releases. Update with hotdata manage upgrade. In an interactive terminal the CLI checks for a new release before API commands and offers to upgrade; set HOTDATA_NO_UPDATE_CHECK=1 to skip the check.
Connect
Authenticate via browser:
hotdata auth login
This launches a browser window where you can sign in and authorize the CLI. To create a new account:
hotdata auth register # GitHub OAuth; add --email for email + password
Check status or sign out:
hotdata auth status
hotdata auth logout
Alternatively, pass an API key directly:
hotdata <command> --api-key <api_key>
Or set the HOTDATA_API_KEY environment variable (also loaded from .env files):
export HOTDATA_API_KEY=<api_key>
hotdata <command>
API key priority (lowest to highest): config file → HOTDATA_API_KEY env var → --api-key flag.
Global options
| Option | Description |
|---|---|
--api-key <key> | API key (overrides env var and config) |
--no-input | Disable interactive prompts; error instead |
-v, --version | Print version |
-h, --help | Print help |
Most commands also accept -w, --workspace-id <id> and -o, --output <table\|json\|yaml>. Run hotdata <command> --help for the complete flags on any command.
Four commands accept table\|json\|csv instead, and never yaml:
querydatabases querysearch "<text>"databases results get
databases results list stays on table\|json\|yaml. query status, databases query status, and search create take no -o.
Workspaces
hotdata workspaces list
hotdata workspaces use [<workspace_id>]
listshows all workspaces with a*marker on the active one.useswitches the active workspace. Omit the ID for interactive selection.- The active workspace is the default for all commands that accept
-w.
Databases
Instant databases are Hotdata-owned catalogs you populate with csv, json, or parquet files. Tables are addressed as <catalog>.<schema>.<table> in SQL, where <catalog> is the alias set with --catalog at create time.
hotdata databases list [--limit <n>] [--cursor <token>] [-o table|json|yaml]
hotdata databases count
hotdata databases show <name_or_id>
hotdata databases create \
[--catalog <alias>] \
[--name <label>] \
[--table <name>]... \
[--schema <schema>] \
[--attach <database[=alias]>]... \
[--expires-at <duration>] \
[--if-not-exists]
hotdata databases use <database_id>
hotdata databases unset
hotdata databases remove <name_or_id>
createmints a database:--catalogsets the SQL alias (SELECT … FROM <alias>.schema.table). It must be[a-z_][a-z0-9_]*and globally unique.--nameis a free-form display label.--table(repeatable) declares tables up front. It acceptsschema.tabledot notation to span schemas.--schemasets the default schema for bare--tableentries (defaultpublic).--attach(repeatable) attaches another database as a queryable catalog. It accepts a database name, catalog alias, or id, with an optionaldatabase=aliasto set the SQL alias (--attach reference --attach salesdb=sales).--expires-ataccepts a relative duration (24h,7d,90m) or an RFC 3339 timestamp. Without it, the database never expires.--if-not-exists(requires--name) returns the existing database with that name instead of creating another, so a script can bind to its database on every run.
usemarks a database as the default for subsequent commands and takes the database id printed bycreate(unlikeshow/removeand-d/--database, it does not resolve a name or catalog alias);unsetclears it.removedeletes the database and all its tables.
Fork a database
hotdata databases fork [<database>] [--name <label>] [--expires-at <duration>]
- Forks an instant database into a new, independent database with the same schemas, tables, and data.
- The fork answers to the same SQL catalog alias inside its own query scope. Writes to one never affect the other.
- Use it to experiment safely before a risky change.
- The source defaults to the current database.
--namedefaults to<source-name>-fork. - Attached catalogs are re-attached to the fork; indexes are not carried over.
- A fork answers to the same catalog alias as its source, so
--catalogis ambiguous for that alias. Address either one by id:databases load --database <id>-d <id>databases use <id>
Lineage
hotdata databases lineage [<database>] [--forks-limit <n>]
- Prints the fork family tree from the root down, with the given database (default: the current one) marked in place. Every reachable generation is included.
- Lineage is a historical record, not a live link: a fork and its source stay independent, and a deleted generation remains in the chain. Forks made before the server recorded lineage carry none.
Attach another database
hotdata databases attach <database> [-d <name_or_id>] [--alias <alias>]
hotdata databases detach <database> [-d <name_or_id>]
attachmakes another instant database's tables visible inside this one, so you can join across the two in one query.- Name the other database by name, catalog alias, or id.
- In SQL, its tables are
<alias>.<schema>.<table>, or<catalog-alias>.<schema>.<table>when--aliasis omitted. --aliasis required when the other database kept the stockdefaultcatalog name:defaultcannot be attached under its own name.-d/--databaseselects the database to attach into (defaults to the current database).detachremoves an attachment, withdrawing visibility without deleting any data. Accepts the database name, catalog alias, or id, or the alias it was attached under.- Attaching is read-only and not transitive. See Sharing a catalog.
Load a file into a table
hotdata databases load --catalog <alias> --table <table> --file <path> [--format csv|json|parquet]
hotdata databases load --catalog <alias> --table <table> --url <https://...>
hotdata databases load --catalog <alias> --table <table> --upload-id <id>
hotdata databases load --catalog <alias> --table <table> --result-id <id>
hotdata databases load --database <id> --table <table> --file <path>
hotdata databases load --catalog <alias> --table <table> --file <path> \
--mode replace|append|upsert|update|delete [--key <col>]...
--catalogis the alias set at create time;--schemadefaults topublic.--database <id|name>targets the database directly and takes precedence over--catalog; use it when forks share an alias.- Sources:
--fileuploads from a local path;--urldownloads a remote file;--upload-iduses a pre-staged upload fromPOST /v1/uploads;--result-idloads a saved query result (which must belong to the target database). - csv, json, and parquet are accepted.
- The format comes from the extension:
.json,.jsonl, and.ndjsonall mean json.--formatoverrides it. For an unrecognised extension, the server detects the format from the bytes. - A json file is read in any shape: an array of objects, a pretty-printed document, or one object per line.
- The load itself takes newline-delimited json only.
--fileand--urlconvert the other two shapes locally before upload. --modesets how the rows are applied:replace(default) replaces the table's contents,appendadds them (--appendis shorthand), andupsert,updateanddeletematch existing rows by key.upsert,updateanddeleteneed a key: the one the table was declared with (databases tables add --key), or--key <col>on the load. Repeat--keyfor a composite key (--key tenant --key id).- Concurrent loads into one table are serialised server-side. While another load holds the table the server answers
409 RESOURCE_LOCKEDwith aRetry-After, and the CLI keeps retrying for--retry-timeoutseconds (default 60;0fails immediately).
Manage tables
hotdata databases tables [<database>]
hotdata databases tables list [--database <name_or_id>] [--schema <p>] [--table <p>] [--limit <n>]
hotdata databases tables add <table> [--database <name_or_id>] [--schema <s>] [--key <col>]... \
[--key-determines <col>]... [--sorted-by <col>[=desc]]... [--partition-by <col>[=year|month|day|hour]]...
hotdata databases tables show <catalog.schema.table>
hotdata databases tables load <table> [--database <name_or_id>] [--schema <s>] (--file|--url|--upload-id|--result-id) \
[--mode replace|append|upsert|update|delete] [--key <col>]...
hotdata databases tables remove <table | schema.table | catalog.schema.table> [--database <name_or_id>] [--schema <s>]
tables(ortables list) lists the tables in a database;--databasedefaults to the current database.showprints column definitions forcatalog.schema.table(orschema.tablewith an active database).tables adddeclares a table before its first load:--keynames the column that identifies a row (repeat for a composite key). A key enablesupsert,updateanddeleteloads. Without one, the table still loads withreplaceandappend.--key-determinesnames a column whose value is fixed by the key. Declare it only where that holds, or a keyed load can leave a duplicate key behind.--sorted-byand--partition-byset the on-disk layout. They cannot be changed once the table exists.
tables loadloads a csv, json, or parquet file or a saved result into a table, addressing the database by--databaserather than by--catalog.--modeand--keywork as fordatabases load.tables removedrops a table from the database. Aschema.tablename takes precedence over--schema; acatalog.schema.tablename picks the database by its catalog, and cannot be combined with--database.
Context
Sync named Markdown context files with an instant database — persistent notes and schema documentation scoped to a database, useful for giving agents durable context.
hotdata databases context list [-d <database>] [--prefix <p>]
hotdata databases context show <name> [-d <database>]
hotdata databases context pull <name> [--force] [--dry-run] [-d <database>]
hotdata databases context push <name> [--dry-run] [-d <database>]
pulldownloads context to./<NAME>.md(--forceoverwrites an existing file);pushuploads./<NAME>.mdto the database as named context.<name>follows SQL identifier rules; a trailing.mdis ignored (e.g.USER.md→USER).
Query run history & results
hotdata databases queries list [--status <csv>] [--limit <n>] [--cursor <token>]
hotdata databases queries <query_run_id>
hotdata databases results list [--limit <n>] [--offset <n>]
hotdata databases results get <result_id> [-o table|json|csv]
queries listshows past runs with status, timing, row count, and a truncated SQL preview (default limit 20);--statusfilters by run status (comma-separated, e.g.running,failed). View a run by ID for full metadata (timings,result_id, SQL).- Every query result is stored automatically — retrieve rows with
results get <result_id>(theresult-idprinted in a query's footer) without re-running the query.
Query
query is a top-level shortcut into databases query.
hotdata query "<sql>" \
[-d <database>] \
[--dialect hotsql|duckdb|postgres|snowflake|clickhouse] \
[-o table|json|csv]
hotdata query status <query_run_id>
- Default output is
table, which prints results with row count and execution time. -d/--databaseruns against a specific instant database. The default is the current database set viadatabases use.- It takes the database id, sent as the
X-Database-Idheader. It does not resolve a name or catalog alias. --dialectnames the SQL the query is written in. Anything other thanhotsql(the default) is transpiled to HotSQL server-side before it runs; writes follow the same rules ashotsql. See SQL dialects.queryalso runsINSERT,CREATE TABLE,CREATE TABLE ASandDROP TABLEon the current database's own tables. The API key needs thewritepermission. The result is one row with arows_affectedcolumn.UPDATEandDELETEare not supported in SQL yet. Usehotdata databases load --mode update|delete|upsert. See Writing data with SQL.- Long-running queries fall back to async execution and return a
query_run_id. Poll it withhotdata query status <query_run_id>. - Exit codes for
query status:0succeeded,1failed,2still running (poll again),3succeeded but the result is a truncated preview. - When a table the query reads has a rollup, the footer and
-o jsonsay whether it was used.
Ingest
An ingest is a saved load definition: it reads from an external source and writes rows into an instant database.
- Add the source with
hotdata ingest sources add. - Create an ingest that reads it. The selector and destination are fixed at creation.
- Watch it with
hotdata ingest logs <id>. Runs are scheduled, so creating an ingest returns no run id.
# Create a load definition (source + what to read + where it lands)
hotdata ingest create --source <name_or_id> --sql "SELECT * FROM <schema>.<table>" --database-id <db>
hotdata ingest create --source <name_or_id> --all --database-id <db>
hotdata ingest create --source <name_or_id> --table <t>... --type scheduled --every 1h --database-id <db>
# Inspect and control ingests
hotdata ingest list [--datasource-id <id>] [--type <t>] [--state <s>]
hotdata ingest show <ingest_id>
hotdata ingest logs [<ingest_id>] [--status <s>] [--wait] [--wait-timeout <s>]
hotdata ingest run <run_id> [--wait]
hotdata ingest pause <ingest_id>
hotdata ingest resume <ingest_id>
hotdata ingest schedule <ingest_id> [--every <dur>] [--next now|<rfc3339>]
hotdata ingest remove <ingest_id>
createneeds a--source(ads_…id or a display name) and a selector.- Selector flags:
--sqlfor SQL sources:SELECT <cols|*> FROM [<schema>.]<table> [WHERE …] [LIMIT n]--raw-sqlfor a verbatim query in the source's own dialect--all--table,--topicor--table-path, depending on the family--selectorfor raw family JSON
- Destination flags:
--database-id--dest-tableor--dest-table-prefix--dest-schema(defaultpublic)--write-mode replace|upsert
--typeisone-time(default),scheduled, orcontinuous(--stream). Recurring types need--everyor--schedule.- There is no
run-nowverb — bring a run forward withhotdata ingest schedule <id> --next now. pausecancels the active run and stops future ones;resumeclears the stop but runs nothing immediately (one-time ingests can't be resumed — create a new one).logslists an ingest's runs (newest first);run <run_id>shows one run. Both accept--waitto watch until a terminal state (exit0succeeded,1failed/cancelled,2still queued/running).removesoft-deletes the ingest and releases its destination table; the table, its data, and the source are never deleted.
Sources
A source (datasource) stores an external system's connection config and credentials. It's surfaced under ingest sources so a source and the ingests that read it share one command tree.
hotdata ingest sources types [<name>]
hotdata ingest sources fields [<family>]
hotdata ingest sources test --family <family> [--config <json>] [--credentials <json>] [--bucket-url <url>]
hotdata ingest sources add [--family <family>] [--display-name <name>] [--config <json>] [--credentials <json>]
hotdata ingest sources list [--family <f>] [--state <s>]
hotdata ingest sources show <datasource_id>
hotdata ingest sources update-config <datasource_id> [--config <json>] [--credentials <json>]
hotdata ingest sources remove <datasource_id>
- Families:
sql,rest,filesystem,iceberg,delta,ducklake,kafka,derived.sqlcovers any SQL dialect. The dialect goes in the config.filesystemcovers buckets.derivedbuilds a table from another table in your own workspace.
hotdata ingest sources fieldsprints the list with each family's required config.typesbrowses the catalog of source types and their families;fields <family>shows the config, credentials, and selector fields a family accepts (generated by the service, so it matches exactly what the API accepts).testchecks a config and credentials without creating anything —validmeans the shape was accepted,probedmeans the source was actually contacted.addreturns a stableds_…id and loads no data. On a terminal it prompts for the source type and fields. Skip the prompts with--no-inputand--config.- Config and credentials are JSON: inline,
@file.json, or@-for stdin. Use@fileto keep secrets out of argv. update-configappends a config version — rotate credentials by passing the same config plus new--credentials.removesoft-deletes a source; its ingests must be removed first.
Search
Full-text (BM25) and vector search over an indexed table column, plus index and embedding-provider management.
hotdata search "<query text>" \
--index <name> \
[-d <database>] \
[--select <columns>] \
[--limit <n>] \
[-o table|json|csv]
- The search type (full-text vs vector) is inferred from the index.
--indexaddresses the index by name (fromhotdata search list);-d/--databaseis the database the index lives in (defaults to the active database). - Full-text results are ordered by relevance (descending); vector results by distance (ascending).
--selectlimits the returned columns (comma-separated, defaults to all).
Manage indexes
hotdata search create [<name>] --type text|vector|sorted --from <catalog.schema.table | schema.table> --column <col> [-d <database>] \
[--metric l2|cosine|dot] \
[--algorithm hnsw|ivf] [--nlist <n>] [--probe-fraction <f>] [--vector-precision <precision>] \
[--provider <embedding_provider_id>] \
[--dimensions <n>] [--output-column <name>] [--description "..."] \
[--async]
hotdata search list [-d <database>] [--schema <s>] [--table <t>]
hotdata search show <name> [-d <database>]
hotdata search remove <name> [-d <database>]
--type:text(BM25 full-text),vector(similarity), orsorted(range/equality filters).textis the CLI's name for the index type the API callsbm25. The index name is derived from table, column, and type when omitted.--metricapplies to vector indexes.--providerenables server-side auto-embeddings on a text column;--dimensionsoverrides the embedding output dimensions and--output-columnnames the generated column (default{column}_embedding).- An index created with
--providermust be the only index on its table. See vector indexes. --asyncsubmits index creation as a background job — poll withhotdata jobs <job_id>.--algorithmapplies to vector indexes:hnsw(default) orivf.--nlistand--probe-fractionconfigure anivfindex; see IVF indexes.search listandsearch showreport anivfindex's cluster count asnlist.- An index appears in
search listonce its build finishes. While an--asyncbuild runs,search listnotes it andhotdata jobs list --job-type create_indextracks it. --vector-precisionsets how precisely a vector index stores each value:float64,float32,float16,float8orint8.hnswaccepts all butint8and defaults to the column's precision;ivfacceptsint8(its default) orfloat32.
Embedding providers
Embedding providers are the models behind vector search.
hotdata search embeddings list
hotdata search embeddings show <id>
hotdata search embeddings add --name <name> --provider-type local|service \
[--config '{"model":"..."}'] \
[--provider-api-key <key> | --secret-name <name>]
hotdata search embeddings update <id> [--name <name>] [--config <json>] [--provider-api-key <key> | --secret-name <name>]
hotdata search embeddings remove <id>
--provider-type localuses a local embedding model;servicecalls an external API (e.g. OpenAI).--provider-api-keyauto-creates a managed secret for the provider's API key;--secret-namereferences an existing secret instead.
Rollups
A rollup keeps a table pre-aggregated by time. See the rollups guide.
hotdata rollups create <catalog.schema.table | schema.table> \
--time-column <col> --bucket <duration> \
--measure <kind[:column]> [--measure ...] \
[--dimensions <a,b>] [--filter "<sql>"] [--window <duration>] \
[-d <database>] [--async] [-o table|json|yaml]
hotdata rollups list [-d <database>] [--schema <s>] [--table <schema.table>] [-o table|json|yaml]
hotdata rollups show <rollup_id> [-d <database>] [-o table|json|yaml]
hotdata rollups rebuild <rollup_id> [-d <database>] [--async] [-o table|json|yaml]
hotdata rollups window <catalog.schema.table | schema.table> <duration> [-d <database>] [-o table|json|yaml]
hotdata rollups remove <rollup_id> [-d <database>]
hotdata rollups create public.requests --time-column ts --bucket 1h \
--dimensions region,status \
--measure count --measure numeric:bytes --measure approx_percentile:latency_ms
- The table must already hold data, and
--time-columnmust be a UTC timestamp. - Durations are
30s,5m,1h,1d, or a number of seconds.--bucketis the finest time grouping the rollup answers. --measureis repeated:count,count:<col>,sum:<col>,min:<col>,max:<col>,numeric:<col>(count, sum, avg, min and max), orapprox_percentile:<col>.--dimensionslists the columns queries group or filter by.createandrebuildwait until the rollup isready.--asyncreturns once the build has started; poll withhotdata rollups show <rollup_id>.createrestricts writes to the table. See Writes to a table with rollups.windowsets how long rows stay editable. It applies to every rollup on the table.rebuildis for a rollup that isneeds_rebuildorbuild_failed.- A rollup cannot be changed:
removeit andcreateit again.
Jobs
hotdata jobs list \
[--job-type <type>] \
[--status <status>] \
[--all] \
[--limit <n>] [--offset <n>] \
[-o table|json|yaml]
hotdata jobs <job_id>
listshows only active jobs (pendingandrunning) by default; use--allto see every job.--job-typeaccepts:create_index,managed_load,database_fork,ivf_rebalance_sweep,rollup_build,rollup_refresh_sweep.--statusaccepts:pending,running,succeeded,partially_succeeded,failed.
Manage
Account, configuration, and CLI maintenance.
hotdata manage usage [--since <rfc3339>] [-o table|json|yaml]
hotdata manage completions bash|zsh|fish
hotdata manage upgrade
hotdata manage skills install [--project]
hotdata manage skills status
usageshows workspace usage: query count, bytes scanned, and stored bytes.--sincecounts usage from an RFC 3339 timestamp (e.g.2026-06-01T00:00:00Z); defaults to the current billing window.completionsprints a shell completion script;upgradeupdates the CLI to the latest release (brew upgradefor Homebrew installs, otherwise a direct binary download) and refreshes the installed skill to match.skills installinstalls or refreshes the hotdata agent skill in~/.agents/skillsand links it into detected agent directories (Claude Code, pi).--projectinstalls into the current project instead of globally.- The install script already runs this step, so a fresh install needs no separate call. See Agent Skills.
Support
hotdata support report -m <text> --subject <subject> [--kind bug|question|billing|feature|account|other] \
[--severity urgent|high|medium|low] [--logs <file|->] [--context KEY=VALUE]... [--no-workspace]
- Files a support ticket from the terminal. Omit
-min an interactive terminal to compose the report in$EDITOR, where the first non-comment line is the subject. --logsattaches a text file (-reads stdin, capped at 256 KiB client-side);--contextadds up to 20 key/value pairs. The current workspace is attached unless--no-workspaceis given. Replies go to the email on your Hotdata account.
Configuration
Config is stored at ~/.hotdata/config.yml, keyed by profile (default: default). Override the config directory with HOTDATA_CONFIG_DIR.
| Variable | Description |
|---|---|
HOTDATA_API_KEY | API key (overrides the config file) |
HOTDATA_WORKSPACE | Default workspace ID for the current process |
HOTDATA_DATABASE | Default instant database for the current process; overrides the saved current database, but an explicit -d wins |
HOTDATA_API_URL | Override the API endpoint (default https://api.hotdata.dev/v1) |
HOTDATA_APP_URL | Override the app URL used for browser auth |
HOTDATA_NO_UPDATE_CHECK | Skip the interactive new-release check |
HOTDATA_UPLOAD_CONCURRENCY | Parallel parts for multipart uploads in databases load (default 12) |