KrishivDocs
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.

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"

Core commands

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.

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.

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

cargo run -p krishiv -- local start --data-dir /tmp/krishiv-local
cargo run -p krishiv -- local status --data-dir /tmp/krishiv-local
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.

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

On this page