Reference
Available

CLI reference

Run SQL, inspect plans, and manage local Engine processes from a source checkout.

The krishiv binary is the command-line front door for queries, local development, and daemon operations. Krishiv is pre-release, so the commands below run the binary from a source checkout rather than assuming a published package is available.

Quick start

Build and inspect the command surface

cargo build -p krishiv
cargo run -p krishiv -- --help

Run an embedded query

cargo run -p krishiv -- sql --query "SELECT 42 AS answer"

Quick index

Command map

CommandPurpose
sqlPlan and run SQL. Embedded mode is the default.
explainShow logical and physical plan information.
tableWork with Parquet and optional lakehouse table paths.
streamRegister, push to, and poll continuous stream jobs.
ivmOperate experimental incremental-view jobs.
pipelineWork with declarative source-to-sink pipelines.
doctorPrint the effective deployment configuration.
localStart, inspect, or stop a single-host development cluster.
clusterOperate a process-managed distributed topology.
state, checkpoints, savepoint, restoreInspect and control stateful jobs.

Use cargo run -p krishiv -- <command> --help for the options compiled into your checkout.

Query and plan

SQL options

krishiv sql --query <SQL> [OPTIONS]

-q, --query <SQL>       SQL statement or semicolon-separated statements
--mode <MODE>           embedded, single-node, or distributed
--parquet <NAME=PATH>   register a local Parquet file; repeatable
--local                 force the local execution entry point
--remote                use the configured remote coordinator
--timeout <SECONDS>     accepted for forward compatibility; not yet enforced
--api-key <KEY>         use the policy-enforced SQL entry point

For sql, the top-level -c, --coordinator <URL> option overrides the canonical KRISHIV_COORDINATOR_URL setting. The explain dispatcher does not currently receive that top-level override; set KRISHIV_COORDINATOR_URL if you deliberately inspect a remote plan. A parsed --timeout does not currently cancel work, so do not use it as an operational safeguard.

Examples

cargo run -p krishiv -- sql \
  --parquet events=./events.parquet \
  --query "SELECT kind, COUNT(*) AS n FROM events GROUP BY kind"

The registration exists only for this process.

cargo run -p krishiv -- sql --query \
  "CREATE TABLE t AS SELECT 1 AS id; SELECT * FROM t"

Earlier statements run for side effects. Only the last result is printed.

cargo run -p krishiv -- \
  --coordinator http://127.0.0.1:2003 \
  sql --remote --query "SELECT 42 AS answer"

The endpoint must already expose a compatible Engine service.

Local development cluster

Start the cluster

cargo run -p krishiv -- local start --data-dir /tmp/krishiv-local

Inspect its status

cargo run -p krishiv -- local status --data-dir /tmp/krishiv-local

Stop the cluster

cargo run -p krishiv -- local stop --data-dir /tmp/krishiv-local

CLI process lifetime

In-process job and catalog state does not survive a CLI invocation. Use a long-lived session or coordinator-backed lifecycle for persistent jobs.

Automation and compatibility

Pin automated commands

The CLI and its configuration are preview APIs. Pin an Engine commit when automating commands, and check command help again when upgrading.

The CLI reports the options compiled into the current binary. Treat --help from the pinned build as the final command-line reference for that checkout.

Next steps