Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Hotdata
Hotdata CLI
Command line interface for Hotdata.

release build coverage


Query, search, and join your data from one place — external databases, APIs, cloud storage, Iceberg catalogs, and files you upload — with plain SQL and a few commands.

Install

brew install hotdata-dev/tap/cli        # Homebrew
cargo install --path .                  # from source (requires Rust)

Or grab a binary from Releases. Stay current with hotdata manage upgrade; enable tab completion with hotdata manage completions bash|zsh|fish.

Quickstart

hotdata auth login                            # or: hotdata auth register
hotdata databases create --catalog demo
hotdata databases load --catalog demo --table trips \
  --url https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2024-01.parquet
hotdata query "SELECT count(*) FROM demo.public.trips"

The core loop: create an instant database, put data in it, query it with PostgreSQL-dialect SQL. Everything else builds on that.

Getting your data in

Upload a file directly — csv, json, or parquet:

hotdata databases load --catalog demo --table listings --file ./listings.csv

The format comes from the extension; pass --format csv|json|parquet when the extension is missing or misleading. json is read whatever shape it arrives in — an array of objects, a pretty-printed document, or one object per line.

A load replaces the table by default. --mode append adds rows to an existing table instead:

hotdata databases load --catalog demo --table listings --file ./more-listings.parquet --mode append

Import from an external source — Postgres/MySQL, S3/GCS buckets, Iceberg, Kafka, ~150 API services — via a datasource (ds_…) and a saved ingest (ing_…):

hotdata ingest sources types                  # browse source types and families
hotdata ingest sources fields sql             # config/credentials/selector a family takes
hotdata ingest sources add                     # create a datasource (prompts, or --config @src.json)

hotdata ingest create --source "prod postgres" --table orders --database-id db_123
hotdata ingest logs <ing_…>                    # attempts for an ingest, newest first
hotdata ingest run <run_…> --wait              # show one attempt; exits 0 done / 1 failed / 2 in flight

ingest sources update-config rotates credentials; ingest pause|resume|schedule control a scheduled ingest. Data lands in an instant database — query it like any other.

Query and explore

hotdata databases tables list                  # every queryable table
hotdata databases tables show <table>          # columns and types
hotdata query "<sql>" [-o table|json|csv]      # HotSQL (PostgreSQL dialect)

Write SQL in another dialect and the server transpiles it to HotSQL — --dialect accepts hotsql (default), duckdb, postgres, snowflake (read-only for a non-default dialect):

hotdata query "SELECT IFF(n > 0, 'pos', 'neg') FROM t" --dialect snowflake

Long queries go async and print a query_run_id — poll with hotdata query status <id> (exit 0 done / 1 failed / 2 running / 3 done but the printed result is a truncated preview). Re-fetch past results with hotdata databases results get <result-id>; browse history with hotdata databases queries list.

Join across databases

Attach another instant database and join its live tables directly, no copying:

hotdata databases attach prod-replica --alias prod
hotdata query "SELECT t.id, o.total FROM demo.public.tickets t
               JOIN prod.public.orders o ON o.ticket_id = t.id"

The attached database is read-only here: loads still go to your own database, and detach withdraws visibility without deleting anything. --alias is required when the other database kept the stock default catalog name.

Search

Create an index once, then search server-side. Vector search auto-embeds the column and the query — no embedding keys or client setup:

hotdata search create trips_notes --type text --from demo.public.trips --column notes
hotdata search "airport surcharge dispute" --index trips_notes

Use --type vector for semantic search. Indexes resolve in the active database (hotdata databases use <id>); pass -d/--database <id> to target another. Bring your own model with hotdata search embeddings add.

Use it from scripts and agents

  • Every listing command takes -o json|yaml; query status and ingest run expose script-friendly exit codes.
  • Authenticate non-interactively with --api-key, or HOTDATA_API_KEY in the environment or a .env file.
  • hotdata manage skills install installs bundled agent skills — Markdown playbooks that teach AI coding agents (Claude Code and friends) the full CLI.
  • hotdata databases context push|show DATAMODEL stores your data model as shared, server-side Markdown so humans and agents query with the same map.

Getting help

File a support ticket without leaving the terminal:

hotdata support report -m "Queries against work_abc have been timing out for an hour" --subject "Queries timing out"
hotdata support report --logs ./stderr.txt --context env=staging

Omit -m in an interactive terminal to compose the report in $EDITOR instead. Replies go to the email on your HotData account.

Commands

The full command surface. The top level has nine groups — auth, workspaces, databases, query, jobs, ingest, search, manage, and support. Run hotdata <command> --help for full flags on any command.

CommandWhat it does
auth loginLog in via browser
auth registerCreate a new account via browser (GitHub OAuth; --email for email + password)
auth logoutRemove authentication for a profile
auth statusShow authentication status
workspaces listList all workspaces
workspaces useSet the default workspace
databases listList instant databases in the workspace
databases countCount instant databases in the workspace
databases showShow details for an instant database
databases createCreate a new instant database
databases forkFork a database into a new, independent database
databases lineageShow a database's whole fork family tree
databases attachAttach another database so its tables are queryable
databases detachDetach a previously attached database
databases useSet the current (default) database
databases unsetClear the current database
databases removeDelete a database and all its tables
databases loadLoad a csv/json/parquet file or saved result into a table (--mode replace|append|delete|update|upsert)
databases tables addDeclare a table with its key and storage layout
databases tables listList tables in a database
databases tables showShow column definitions for a table
databases tables loadSame as databases load, addressed by database instead of catalog
databases tables removeDelete a table from a database
databases context listList named contexts in a database
databases context showPrint context content to stdout
databases context pullDownload context to ./<NAME>.md
databases context pushUpload ./<NAME>.md as named context
databases queryExecute a SQL query against a database
databases query statusCheck a running query and retrieve results
databases queries listList query runs
databases results getShow a stored query result by ID
databases results listList stored query results
query "<sql>"Execute a SQL query (shortcut for databases query)
query statusCheck a running query and retrieve results
jobs listList background jobs (active by default)
jobs <id>Show one background job
ingest createCreate a load definition
ingest listList the ingests in the workspace
ingest showShow one ingest: state, selector, destination, schedule
ingest pauseStop an ingest (cancel the active run and future runs)
ingest resumeClear a stop and let the schedule dispatch again
ingest scheduleChange when a scheduled/continuous ingest runs next
ingest logsList the runs of one ingest
ingest runShow one run: status, snapshots, timings
ingest removeDelete an ingest and release its destination table
ingest sources testCheck a config and credentials without creating anything
ingest sources addCreate a datasource and its first config version
ingest sources listList the datasources in the workspace
ingest sources showShow one datasource: state, config, discovery
ingest sources update-configAppend a config version (rotate credentials)
ingest sources removeDelete a datasource
ingest sources typesBrowse the catalog of source types
ingest sources fieldsShow the fields a source family accepts
search "<text>" --index <name>Run a full-text or vector search against an index
search createCreate a search index over a table column
search listList search indexes
search showShow one search index by name
search removeRemove a search index by name
search embeddings listList embedding providers
search embeddings showShow one embedding provider
search embeddings addCreate a new embedding provider
search embeddings updateUpdate an embedding provider
search embeddings removeDelete an embedding provider
manage usageShow workspace usage: queries, bytes scanned, stored bytes
manage completionsGenerate shell completions (bash, zsh, fish)
manage upgradeUpgrade the CLI to the latest release
manage skills installInstall/update the agent skill into agent directories
manage skills statusShow the agent skill's installation status
manage skills listList installed skills (alias for status)
support reportFile a support ticket with the HotData team

Configuration

Config lives at ~/.hotdata/config.yml (profile-keyed). Environment variables:

VariableDescriptionDefault
HOTDATA_API_KEYAPI key (overrides config file; also read from .env)
HOTDATA_WORKSPACELock every command to one workspace
HOTDATA_API_URLAPI base URLhttps://api.hotdata.dev/v1
HOTDATA_APP_URLApp URL for browser loginhttps://app.hotdata.dev

API-key precedence, lowest to highest: config file → HOTDATA_API_KEY → --api-key.

Development

cargo build && cargo test

Release process: see docs/RELEASING.md.

关于 About

CLI for Hotdata

语言 Languages

Rust99.1%
Shell0.7%
Python0.2%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
538
Total Commits
峰值: 67次/周
Less
More

核心贡献者 Contributors