hotdata-cli README

The project's README from github.com/hotdata-dev/hotdata-cli. As one markdown file: README.md.

Hotdata
Hotdata CLI
Command line interface for Hotdata.

release build coverage


Load your data into a Hotdata database, then query, join, and search it with plain SQL. Data can come from files on your machine, a URL, or an external source such as Postgres, S3, Iceberg, Kafka, or one of ~150 API services.

📖 Full documentation: hotdata.dev/docs

Install

curl -fsSL https://hotdata.dev/install | sh

That's it. The installer uses Homebrew if you have it (brew install hotdata-dev/tap/cli) and also installs the Hotdata skill for AI coding agents such as Claude Code. You can also download a binary from Releases.

The CLI tells you when a new version is out; upgrade with hotdata manage upgrade.

Quickstart

# 1. Log in (or create an account with: hotdata auth register)
hotdata auth login

# 2. Create a database and make it your current one
hotdata databases create --catalog demo
hotdata databases use demo

# 3. Load some data
hotdata databases load --catalog demo --table trips \
  --url https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2024-01.parquet

# 4. Query it
hotdata query "SELECT count(*) FROM demo.public.trips"

Tables are addressed as catalog.schema.table. Here the catalog is demo and the default schema is public. The examples below build on this demo database. For a longer walkthrough, see the quick start guide.

Load your data

From a file or URL (CSV, JSON, or Parquet). Point --file at your own file, or --url at one online:

hotdata databases load --catalog demo --table my_table --file ./my-data.csv

A load replaces the table. To add rows instead, use --mode append:

hotdata databases load --catalog demo --table my_table --file ./more-data.csv --mode append

To change existing rows by key, use --mode update, --mode delete, or --mode upsert with --key <column>.

From an external source such as Postgres, MySQL, S3, GCS, Iceberg, Kafka, or an API service: first save the connection details as a datasource, then create an ingest that copies data into your database once or on a schedule.

hotdata ingest sources types        # see what you can connect to
hotdata ingest sources add          # save a datasource (you'll be prompted)
hotdata ingest create --source "prod postgres" --table orders --database-id <database-id>
hotdata ingest list                 # check on your ingests

More in the docs: loading data and importing from external sources.

Query

hotdata databases tables list                       # what can I query?
hotdata databases tables show demo.public.trips     # columns and types
hotdata query "SELECT * FROM demo.public.trips LIMIT 10"

SQL is PostgreSQL-style. Add -o json or -o csv to change the output format. If you prefer another dialect, pass --dialect duckdb, postgres, snowflake, or clickhouse and the query is translated for you.

You can also write with SQL. INSERT, CREATE TABLE, CREATE TABLE AS, and DROP TABLE work on your current database's tables (your API key needs the write permission):

hotdata query "CREATE TABLE events (id BIGINT, kind TEXT)"
hotdata query "INSERT INTO events VALUES (1, 'signup'), (2, 'login')"

UPDATE and DELETE aren't supported in SQL yet; use databases load with --mode update, --mode delete, or --mode upsert instead.

Long-running queries finish in the background. The CLI prints an id you can check with hotdata query status <id>.

Column names are case-sensitive: wrap names with capital letters in double quotes, like "PULocationID". See the SQL reference for the supported syntax and functions.

Join across databases

Keep reference data in its own database and attach it wherever you need it. No data is copied. For example, load NYC's taxi zone names into a zones database, attach it to demo, and find the busiest pickup zones:

hotdata databases create --catalog zones
hotdata databases load --catalog zones --table zones \
  --url https://d37ci6vzurychx.cloudfront.net/misc/taxi_zone_lookup.csv
hotdata databases attach zones

hotdata query 'SELECT z."Zone", count(*) AS trips
               FROM demo.public.trips t
               JOIN zones.public.zones z ON z."LocationID" = t."PULocationID"
               GROUP BY z."Zone" ORDER BY trips DESC LIMIT 5'

Attached tables are read-only. hotdata databases detach zones removes the link without deleting anything.

Build a search index on a column, then search it. Using the zones table from above:

hotdata search create zone_names --type text --from zones.public.zones --column Zone
hotdata search "airport" --index zone_names -d zones

That returns JFK, LaGuardia, and Newark airports. An index lives in the same database as its table, so pass -d when that isn't your current database.

Rollups

A rollup keeps a table pre-aggregated by time, so dashboards and reports that aggregate a large, time-stamped table over days or weeks stay fast. You keep querying the table; an aggregate query the rollup can answer reads it instead.

hotdata rollups create public.requests --time-column ts --bucket 1h \
  --dimensions region,status \
  --measure count --measure numeric:bytes --measure approx_percentile:latency_ms

hotdata query "SELECT date_trunc('day', ts) AS day, region, count(*), avg(bytes)
               FROM public.requests GROUP BY 1, 2"
# ... [rollup: used]

create waits for the rollup to build; pass --async to return right away. hotdata query tells you whether a rollup answered: used, not_matched (the query's shape doesn't fit it), or not_ready (still building, or it needs hotdata rollups rebuild).

Creating a rollup restricts writes to its table: rows older than the window (one hour by default; change it with hotdata rollups window) can no longer be changed or deleted. Appends always work. See the rollups guide for the details.

Your current workspace and database

Most commands run against your current workspace and database, so you don't have to name them every time.

Your choice is saved on this machine and survives logging out and back in.

Scripts, CI, and AI agents

Claude Code plugin

To get the agent skill through Claude Code's plugin manager instead, which updates it with each release:

/plugin marketplace add hotdata-dev/claude-plugins
/plugin install hotdata-cli@hotdata

Self-hosted marketplaces don't auto-update by default. To get each release automatically, open /plugin, go to Marketplaces, select hotdata, and choose Enable auto-update. Otherwise run /plugin marketplace update hotdata when a new version ships.

Use either the plugin or the installer's skill, not both: if you installed the CLI with the script above, install it with HOTDATA_NO_SKILLS=1 or Claude Code will list the skill twice.

For what the plugin runs, sends, and fetches, see plugin/README.md.

Getting help

Reference

All commands
Command What it does
auth login Log in via browser
auth register Create a new account via browser (GitHub OAuth; --email for email + password)
auth logout Remove authentication for a profile
auth status Show authentication status
workspaces list List all workspaces
workspaces use Switch the current workspace (remembered across logins)
databases list List instant databases in the workspace
databases count Count instant databases in the workspace
databases show Show details for an instant database
databases create Create a new instant database
databases fork Fork a database into a new, independent database
databases lineage Show a database's whole fork family tree
databases attach Attach another database so its tables are queryable
databases detach Detach a previously attached database
databases use Switch the current database (remembered across logins)
databases unset Clear the current database
databases remove Delete a database and all its tables
databases load Load a csv/json/parquet file or saved result into a table (--mode replace|append|delete|update|upsert)
databases tables add Declare a table with its key and storage layout
databases tables list List tables in a database
databases tables show Show column definitions for a table
databases tables load Same as databases load, addressed by database instead of catalog
databases tables remove Delete a table from a database
databases context list List named contexts in a database
databases context show Print context content to stdout
databases context pull Download context to ./<NAME>.md
databases context push Upload ./<NAME>.md as named context
databases query Execute a SQL query against a database
databases query status Check a running query and retrieve results
databases queries list List query runs
databases results get Show a stored query result by ID
databases results list List stored query results
query "<sql>" Execute a SQL query (shortcut for databases query)
query status Check a running query and retrieve results
jobs list List background jobs (active by default)
jobs <id> Show one background job
ingest create Create a load definition
ingest list List the ingests in the workspace
ingest show Show one ingest: state, selector, destination, schedule
ingest pause Stop an ingest (cancel the active run and future runs)
ingest resume Clear a stop and let the schedule dispatch again
ingest schedule Change when a scheduled/continuous ingest runs next
ingest logs List the runs of one ingest
ingest run Show one run: status, snapshots, timings
ingest remove Delete an ingest and release its destination table
ingest sources test Check a config and credentials without creating anything
ingest sources add Create a datasource and its first config version
ingest sources list List the datasources in the workspace
ingest sources show Show one datasource: state, config, discovery
ingest sources update-config Append a config version (rotate credentials)
ingest sources remove Delete a datasource
ingest sources types Browse the catalog of source types
ingest sources fields Show the fields a source family accepts
search "<text>" --index <name> Run a full-text or vector search against an index
search create Create a search index over a table column
search list List search indexes
search show Show one search index by name
search remove Remove a search index by name
search embeddings list List embedding providers
search embeddings show Show one embedding provider
search embeddings add Create a new embedding provider
search embeddings update Update an embedding provider
search embeddings remove Delete an embedding provider
rollups create Create a rollup on a table and wait for it to build
rollups list List the rollups in a database
rollups show Show one rollup: what it keeps, its status, its build progress
rollups rebuild Build a rollup again (after its table was replaced, or a failed build)
rollups window Set how long a table's rows stay editable after their time
rollups remove Remove a rollup; the table does not change
manage usage Show workspace usage: queries, bytes scanned, stored bytes
manage completions Generate shell completions (bash, zsh, fish)
manage upgrade Upgrade the CLI to the latest release
manage skills install Install/update the agent skill into agent directories
manage skills status Show the agent skill's installation status
manage skills list List installed skills (alias for status)
support report File a support ticket with the Hotdata team
Configuration and environment variables

Config lives at ~/.hotdata/config.yml.

Variable Description Default
HOTDATA_API_KEY API key (overrides config file; also read from .env)
HOTDATA_WORKSPACE Lock every command to one workspace (workspaces use refuses while set)
HOTDATA_DATABASE Database to use when -d/--database is not given; overrides the saved current database
HOTDATA_NO_UPDATE_CHECK Skip the interactive new-release check
HOTDATA_CONFIG_DIR Where config and credentials live ~/.hotdata
HOTDATA_UPLOAD_CONCURRENCY Parallel parts for multipart uploads in databases load 12
HOTDATA_API_URL API base URL https://api.hotdata.dev/v1
HOTDATA_APP_URL App URL for browser login https://app.hotdata.dev

An API key is taken from, in order of priority: --api-key, then HOTDATA_API_KEY, then the config file.

Installer options: HOTDATA_NO_BREW=1 skips Homebrew, HOTDATA_NO_SKILLS=1 skips the agent skill. Tab completion: hotdata manage completions bash|zsh|fish.

Development

cargo build && cargo test

Build from source with cargo install --path . (requires Rust). Release process: docs/RELEASING.md.

hotdata-cli (hotdata-dev/hotdata-cli)

Searching Database…

What is this?Hotdata CLI is a command-line client that lets you query, search, and join data from one place — external databases, APIs, cloud storage, Iceberg catalogs, and uploaded files — using plain SQL and a handful of commands.
Is this a local database engine or a CLI for a cloud service?It's a CLI client, not a local database: it creates an 'instant database' hosted by HotData, and your SQL queries actually run server-side against that.
How do I get it running?Grab a prebuilt binary from the project's GitHub Releases, then create an instant database, load data into it, and query it with PostgreSQL-dialect SQL — that's the core loop everything else builds on.
Do I need a HotData account to use the CLI?Yes — you authenticate with `auth login` via browser (including GitHub OAuth) or by passing an API key through `--api-key` or the HOTDATAAPIKEY environment variable; no local database engine setup is needed.
What happens if I run a big, slow query?Long queries run asynchronously: the CLI prints a queryrunid you poll with `query status`, and the exit code tells you whether it's done, failed, still running, or done with only a truncated preview.
Does this run on Windows, Mac, and Linux?Yes, it's a Rust CLI distributed as cross-platform binaries via GitHub Releases, with shell completion support for bash, zsh, and fish.
Where does my uploaded data actually end up?Uploaded files and ingested data land in a HotData-hosted 'instant database' in the cloud, and even cross-database joins run against that hosted service rather than locally.
Can I join data from two different instant databases without copying it?Yes — you attach another instant database (read-only) and query its tables directly alongside your own; detaching just removes visibility without deleting any data.
Do I need my own embedding model for vector/semantic search?No, vector search auto-embeds both the indexed column and the query server-side with no embedding keys required, though you can bring your own model via `search embeddings add`.
Can AI coding agents like Claude Code use this CLI directly?Yes — `hotdata manage skills install` installs bundled Markdown playbooks that teach agents the full CLI, and `databases context push` shares your data model as a map both humans and agents can query against.
What data sources can I pull data in from besides file uploads?You can ingest from Postgres/MySQL, S3/GCS buckets, Iceberg catalogs, Kafka, and roughly 150 API services via a datasource and a saved, schedulable ingest definition.
Size
2.3 MB
Stars
1.8K
Age
8mo
Commits · 90 Days