Standalone, agent-friendly Go CLI for Kusto workflows. It provides human-readable subcommands and also includes a advanced API explorer for advanced automation.
It runs as a self-contained Go binary with standard environment and Azure CLI authentication options.
brew tap sozercan/repo
brew install kusto-cliPrebuilt archives for Linux, macOS, and Windows are published on the GitHub Releases page. Each release includes checksums.txt.
go build -o bin/kusto-cli ./cmd/kusto-cliUse the public sample endpoint for examples:
Cluster URI: https://help.kusto.windows.net
Database: Samples
Run a query:
kusto-cli --service-uri https://help.kusto.windows.net --database Samples query 'StormEvents | count'List databases:
kusto-cli --service-uri https://help.kusto.windows.net --database Samples databases listDescribe a table:
kusto-cli --service-uri https://help.kusto.windows.net --database Samples tables describe StormEventsSample rows:
kusto-cli --service-uri https://help.kusto.windows.net --database Samples tables sample StormEvents 5Run as an stdio service:
kusto-cli --service-uri https://help.kusto.windows.net --database Samples servekusto-cli is non-interactive by default. It resolves a bearer token in this order when --auth auto is used:
KUSTO_ACCESS_TOKENaz account get-access-token --resource https://kusto.kusto.windows.net
Check auth:
kusto-cli auth status| Command | Description |
|---|---|
kusto-cli query '<kql>' |
Run a KQL query |
kusto-cli command '.show tables' |
Run a management command |
kusto-cli databases list |
List databases |
kusto-cli tables list |
List tables |
kusto-cli tables describe <table> |
Describe a table |
kusto-cli tables sample <table> [size] |
Sample rows from a table |
kusto-cli entities list <type> |
List entities by type |
kusto-cli services list |
List configured services |
kusto-cli deeplink '<kql>' |
Build a web explorer deeplink |
kusto-cli queryplan '<kql>' |
Show query plan |
kusto-cli diagnostics |
Run diagnostics |
kusto-cli api tools |
List API tools |
kusto-cli api schema <tool> |
Show API tool schema |
kusto-cli api call <tool> '<json>' |
Call a API tool |
Direct commands support:
-o json
-o table
-o tsvExample:
kusto-cli --service-uri https://help.kusto.windows.net --database Samples -o table query 'StormEvents | count'| Flag | Description |
|---|---|
--allow-write |
Allow write-capable operations such as inline ingestion and non-.show management commands |
--dry-run |
Preview write-capable direct calls without executing |
--no-input |
Reserved for non-interactive consistency |
--force |
Reserved for confirmation consistency |
make test-short
make vet
make build-static