Skip to content

Latest commit

 

History

History
1729 lines (1238 loc) · 41.5 KB

File metadata and controls

1729 lines (1238 loc) · 41.5 KB

CLI manual

Generated by CliManualTest.generateCliManualMarkdown.

ktsearch

Usage: ktsearch [<options>] <command> [<args>]...

  Swiss-army CLI for Elasticsearch/OpenSearch operations.

Options:
  --host=<text>             Search host.
  --port=<int>              Search port.
  --cloud-id=<text>         Elastic Cloud ID (overrides host/port, enforces HTTPS).
  --https                   Use HTTPS.
  --http                    Force HTTP.
  --user=<text>             Basic auth username.
  --password=<text>         Basic auth password.
  --elastic-api-key=<text>  Elastic API key.
  --api-key=<text>          Elastic API key (alias for --elastic-api-key).
  --logging                 Enable client request logging.
  --aws-sigv4               Enable AWS SigV4 request signing.
  --aws-region=<text>       AWS region for SigV4 (e.g. us-west-2).
  --aws-service=<text>      AWS SigV4 service name (defaults: aoss/es by host).
  --aws-profile=<text>      AWS shared credentials profile name.
  -h, --help                Show this message and exit

Commands:
  cluster     Cluster-level commands.
  info        Show cluster details from GET /.
  cat         Run cat APIs and render the output as a table.
  cloud       Cloud helper commands.
  index       Index-related commands.
  tasks       Task API commands.
  top         Live cluster/node vitals dashboard. q quit, h/? help, Esc back.
  completion  Generate a tab-complete script for the given shell

ktsearch cluster

Usage: ktsearch cluster [<options>] <command> [<args>]...

  Cluster-level commands.

Options:
  -h, --help  Show this message and exit

Commands:
  health         Show cluster health from GET /_cluster/health.
  stats          Show cluster stats from GET /_cluster/stats.
  state          Show cluster state from GET /_cluster/state.
  settings       Show cluster settings from GET /_cluster/settings.
  pending-tasks  Show pending tasks from GET /_cluster/pending_tasks.

ktsearch cluster health

Usage: ktsearch cluster health [<options>]

  Show cluster health from GET /_cluster/health.

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cluster stats

Usage: ktsearch cluster stats [<options>]

  Show cluster stats from GET /_cluster/stats.

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cluster state

Usage: ktsearch cluster state [<options>]

  Show cluster state from GET /_cluster/state.

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cluster settings

Usage: ktsearch cluster settings [<options>]

  Show cluster settings from GET /_cluster/settings.

Output:
  --csv  Render output as CSV.

Options:
  --include-defaults  Include default settings.
  --flat-settings     Return settings in flat key format.
  -h, --help          Show this message and exit

ktsearch cluster pending-tasks

Usage: ktsearch cluster pending-tasks [<options>]

  Show pending tasks from GET /_cluster/pending_tasks.

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch top

Usage: ktsearch top [<options>]

  Live cluster/node vitals dashboard. q quit, h/? help, Esc back.

Options:
  --interval-seconds=<int>  Polling interval seconds.
  --samples=<int>           Number of refresh cycles. 0 means infinite.
  --no-color                Disable colored output.
  -h, --help                Show this message and exit

ktsearch info

Usage: ktsearch info [<options>]

  Show cluster details from GET /.

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cat

Usage: ktsearch cat [<options>] <command> [<args>]...

  Run cat APIs and render the output as a table.

Options:
  -h, --help  Show this message and exit

Commands:
  aliases
  allocation
  count
  health
  indices
  master
  nodes
  pending-tasks
  recovery
  repositories
  shards
  snapshots
  tasks
  templates
  thread-pool

ktsearch cat aliases

Usage: ktsearch cat aliases [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Alias name.

ktsearch cat allocation

Usage: ktsearch cat allocation [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Node id.

ktsearch cat count

Usage: ktsearch cat count [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Index target.

ktsearch cat health

Usage: ktsearch cat health [<options>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cat indices

Usage: ktsearch cat indices [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Index target.

ktsearch cat master

Usage: ktsearch cat master [<options>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cat nodes

Usage: ktsearch cat nodes [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Node id.

ktsearch cat pending-tasks

Usage: ktsearch cat pending-tasks [<options>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cat recovery

Usage: ktsearch cat recovery [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Index target.

ktsearch cat repositories

Usage: ktsearch cat repositories [<options>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cat shards

Usage: ktsearch cat shards [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Index target.

ktsearch cat snapshots

Usage: ktsearch cat snapshots [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Repository (default: _all).

ktsearch cat tasks

Usage: ktsearch cat tasks [<options>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cat templates

Usage: ktsearch cat templates [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Name.

ktsearch cat thread-pool

Usage: ktsearch cat thread-pool [<options>] [<value>]

Cat Query:
  --columns=<text>                  Comma-separated columns (h).
  --sort=<text>                     Comma-separated sort columns (s).
  --verbose                         Show header row from server (v).
  --help-columns                    Return available columns (help).
  --bytes=(b|kb|mb|gb|tb|pb)        Byte unit.
  --time=(d|h|m|s|ms|micros|nanos)  Time unit.
  --local=(true|false)              Read from local node only (true|false).

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

Arguments:
  <value>  Pattern(s).

ktsearch cloud

Usage: ktsearch cloud [<options>] <command> [<args>]...

  Cloud helper commands.

Options:
  -h, --help  Show this message and exit

Commands:
  elastic  Elastic Cloud helpers.

ktsearch cloud elastic

Usage: ktsearch cloud elastic [<options>] <command> [<args>]...

  Elastic Cloud helpers.

Options:
  -h, --help  Show this message and exit

Commands:
  context  Show effective Elastic Cloud endpoint and auth context.
  check    Check Elastic Cloud endpoint by calling GET /.
  status   Show Elastic Cloud cluster health.

ktsearch cloud elastic context

Usage: ktsearch cloud elastic context [<options>]

  Show effective Elastic Cloud endpoint and auth context.

Options:
  -h, --help  Show this message and exit

ktsearch cloud elastic check

Usage: ktsearch cloud elastic check [<options>]

  Check Elastic Cloud endpoint by calling GET /.

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch cloud elastic status

Usage: ktsearch cloud elastic status [<options>]

  Show Elastic Cloud cluster health.

Output:
  --csv  Render output as CSV.

Options:
  -h, --help  Show this message and exit

ktsearch tasks

Usage: ktsearch tasks [<options>] <command> [<args>]...

  Task API commands.

Options:
  -h, --help  Show this message and exit

Commands:
  status  Get _tasks status for task.
  wait    Poll task until completion.

ktsearch tasks status

Usage: ktsearch tasks status [<options>] <taskid>

  Get _tasks status for task.

Options:
  -h, --help  Show this message and exit

Arguments:
  <taskid>  Task id.

ktsearch tasks wait

Usage: ktsearch tasks wait [<options>] <taskid>

  Poll task until completion.

Options:
  --interval-seconds=<int>  Polling interval seconds.
  --timeout-seconds=<int>   Max wait seconds.
  -h, --help                Show this message and exit

Arguments:
  <taskid>  Task id.

ktsearch index

Usage: ktsearch index [<options>] <command> [<args>]...

  Index-related commands.

Options:
  -h, --help  Show this message and exit

Commands:
  create               Create an index.
  put                  Create an index.
  get                  Get index metadata.
  show                 Get index metadata.
  exists               Check if an index exists.
  refresh              Refresh an index.
  delete               Delete an index.
  rm                   Delete an index.
  doc                  Document CRUD and mget.
  mappings             Manage index mappings.
  settings             Manage index settings.
  template             Manage component/index templates.
  data-stream          Manage data streams.
  alias                Manage aliases with atomic _aliases operations.
  snapshot             Manage snapshot repos/snapshots.
  reindex              Run _reindex.
  reindex-task-status  Get _tasks status for reindex task.
  reindex-wait         Poll reindex task until completion.
  ilm                  Manage ILM policies.
  apply                Apply JSON as mappings/settings/component-template/index-template.
  wait-green           Wait until index health is green.
  wait-exists          Wait until index exists.
  dump                 Dump all index documents to gzipped NDJSON using search_after.
  restore              Restore gzipped NDJSON dump into an index.
  search               Run a search with lucene query string or raw JSON body.

ktsearch index create

Usage: ktsearch index create [<options>] <index>

  Create an index.

Options:
  -d, --data=<text>       Raw JSON body.
  -f, --file=<text>       Read JSON body from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index put

Usage: ktsearch index put [<options>] <index>

  Create an index.

Options:
  -d, --data=<text>       Raw JSON body.
  -f, --file=<text>       Read JSON body from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index get

Usage: ktsearch index get [<options>] <index>

  Get index metadata.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index show

Usage: ktsearch index show [<options>] <index>

  Get index metadata.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index exists

Usage: ktsearch index exists [<options>] <index>

  Check if an index exists.

Options:
  -h, --help  Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index refresh

Usage: ktsearch index refresh [<options>] <index>

  Refresh an index.

Options:
  --allow-no-indices=(true|false)                   Ignore wildcard/alias with only missing indices.
  --expand-wildcards=(open|closed|hidden|none|all)  Wildcard expansion: open|closed|hidden|none|all.
  --ignore-unavailable=(true|false)                 Ignore missing or closed indices.
  --pretty / --no-pretty                            Pretty-print JSON output.
  -h, --help                                        Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index delete

Usage: ktsearch index delete [<options>] <index>

  Delete an index.

Options:
  -y, --yes                          Do not prompt.
  --dry-run                          Preview request without executing.
  --ignore-unavailable=(true|false)  Ignore missing indices (default true).
  --pretty / --no-pretty             Pretty-print JSON output.
  -h, --help                         Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index rm

Usage: ktsearch index rm [<options>] <index>

  Delete an index.

Options:
  -y, --yes                          Do not prompt.
  --dry-run                          Preview request without executing.
  --ignore-unavailable=(true|false)  Ignore missing indices (default true).
  --pretty / --no-pretty             Pretty-print JSON output.
  -h, --help                         Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index doc

Usage: ktsearch index doc [<options>] <command> [<args>]...

  Document CRUD and mget.

Options:
  -h, --help  Show this message and exit

Commands:
  get     Get a document by id.
  index   Index a document.
  delete  Delete a document by id.
  mget    Run _mget on an index.

ktsearch index doc get

Usage: ktsearch index doc get [<options>] <index> <id>

  Get a document by id.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.
  <id>     Document id.

ktsearch index doc index

Usage: ktsearch index doc index [<options>] <index>

  Index a document.

Options:
  --id=<text>               Document id. If omitted, auto id.
  --op-type=(index|create)  Operation type (default index).
  -d, --data=<text>         Raw JSON document.
  -f, --file=<text>         Read JSON document from file.
  --pretty / --no-pretty    Pretty-print JSON output.
  -h, --help                Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index doc delete

Usage: ktsearch index doc delete [<options>] <index> <id>

  Delete a document by id.

Options:
  -y, --yes               Do not prompt.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.
  <id>     Document id.

ktsearch index doc mget

Usage: ktsearch index doc mget [<options>] <index>

  Run _mget on an index.

Options:
  -d, --data=<text>       Raw JSON mget payload.
  -f, --file=<text>       Read JSON payload from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index mappings

Usage: ktsearch index mappings [<options>] <command> [<args>]...

  Manage index mappings.

Options:
  -h, --help  Show this message and exit

Commands:
  get  Get index mappings.
  put  Update index mappings.

ktsearch index mappings get

Usage: ktsearch index mappings get [<options>] <index>

  Get index mappings.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index mappings put

Usage: ktsearch index mappings put [<options>] <index>

  Update index mappings.

Options:
  -d, --data=<text>       Raw JSON body.
  -f, --file=<text>       Read JSON body from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index settings

Usage: ktsearch index settings [<options>] <command> [<args>]...

  Manage index settings.

Options:
  -h, --help  Show this message and exit

Commands:
  get  Get index settings.
  put  Update index settings.

ktsearch index settings get

Usage: ktsearch index settings get [<options>] <index>

  Get index settings.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index settings put

Usage: ktsearch index settings put [<options>] <index>

  Update index settings.

Options:
  -d, --data=<text>       Raw JSON body.
  -f, --file=<text>       Read JSON body from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index template

Usage: ktsearch index template [<options>] <command> [<args>]...

  Manage component/index templates.

Options:
  -h, --help  Show this message and exit

Commands:
  component  Manage component templates.
  index      Manage index templates.

ktsearch index template component

Usage: ktsearch index template component [<options>] <command> [<args>]...

  Manage component templates.

Options:
  -h, --help  Show this message and exit

Commands:
  get     Get template by id or all.
  put     Create or update template.
  delete  Delete a template.

ktsearch index template component get

Usage: ktsearch index template component get [<options>] [<templateid>]

  Get template by id or all.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <templateid>  Template id.

ktsearch index template component put

Usage: ktsearch index template component put [<options>] <templateid>

  Create or update template.

Options:
  -d, --data=<text>       Raw JSON body.
  -f, --file=<text>       Read JSON body from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <templateid>  Template id.

ktsearch index template component delete

Usage: ktsearch index template component delete [<options>] <templateid>

  Delete a template.

Options:
  -y, --yes               Do not prompt.
  --dry-run               Preview request without executing.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <templateid>  Template id.

ktsearch index template index

Usage: ktsearch index template index [<options>] <command> [<args>]...

  Manage index templates.

Options:
  -h, --help  Show this message and exit

Commands:
  get     Get template by id or all.
  put     Create or update template.
  delete  Delete a template.

ktsearch index template index get

Usage: ktsearch index template index get [<options>] [<templateid>]

  Get template by id or all.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <templateid>  Template id.

ktsearch index template index put

Usage: ktsearch index template index put [<options>] <templateid>

  Create or update template.

Options:
  -d, --data=<text>       Raw JSON body.
  -f, --file=<text>       Read JSON body from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <templateid>  Template id.

ktsearch index template index delete

Usage: ktsearch index template index delete [<options>] <templateid>

  Delete a template.

Options:
  -y, --yes               Do not prompt.
  --dry-run               Preview request without executing.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <templateid>  Template id.

ktsearch index data-stream

Usage: ktsearch index data-stream [<options>] <command> [<args>]...

  Manage data streams.

Options:
  -h, --help  Show this message and exit

Commands:
  create  Create a data stream.
  get     Get data stream info.
  delete  Delete a data stream.

ktsearch index data-stream create

Usage: ktsearch index data-stream create [<options>] <namearg>

  Create a data stream.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <namearg>  Data stream name.

ktsearch index data-stream get

Usage: ktsearch index data-stream get [<options>] [<namearg>]

  Get data stream info.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <namearg>  Data stream name.

ktsearch index data-stream delete

Usage: ktsearch index data-stream delete [<options>] <namearg>

  Delete a data stream.

Options:
  -y, --yes               Do not prompt.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <namearg>  Data stream name.

ktsearch index alias

Usage: ktsearch index alias [<options>] <command> [<args>]...

  Manage aliases with atomic _aliases operations.

Options:
  -h, --help  Show this message and exit

Commands:
  get           Get aliases for target or all.
  update        Apply atomic alias actions from JSON.
  add           Atomically add alias to index.
  remove        Atomically remove alias from index.
  remove-index  Atomically remove index via alias API (deletes index).

ktsearch index alias get

Usage: ktsearch index alias get [<options>] [<target>]

  Get aliases for target or all.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <target>  Index or alias target.

ktsearch index alias update

Usage: ktsearch index alias update [<options>]

  Apply atomic alias actions from JSON.

Options:
  -d, --data=<text>       Raw JSON body.
  -f, --file=<text>       Read JSON body from file.
  --dry-run               Print request body without executing.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

ktsearch index alias add

Usage: ktsearch index alias add [<options>] <index> <alias>

  Atomically add alias to index.

Options:
  --write=(true|false)    Set is_write_index true|false.
  --dry-run               Print request body without executing.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.
  <alias>  Alias name.

ktsearch index alias remove

Usage: ktsearch index alias remove [<options>] <index> <alias>

  Atomically remove alias from index.

Options:
  --dry-run               Print request body without executing.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.
  <alias>  Alias name.

ktsearch index alias remove-index

Usage: ktsearch index alias remove-index [<options>] <index>

  Atomically remove index via alias API (deletes index).

Options:
  -y, --yes               Do not prompt.
  --dry-run               Print request body without executing.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index snapshot

Usage: ktsearch index snapshot [<options>] <command> [<args>]...

  Manage snapshot repos/snapshots.

Options:
  -h, --help  Show this message and exit

Commands:
  repo     Manage snapshot repositories.
  create   Create a snapshot.
  list     List snapshots in a repository.
  delete   Delete a snapshot.
  restore  Restore a snapshot.

ktsearch index snapshot repo

Usage: ktsearch index snapshot repo [<options>] <command> [<args>]...

  Manage snapshot repositories.

Options:
  -h, --help  Show this message and exit

Commands:
  create  Create or update a snapshot repo.
  get     Get snapshot repo(s).
  delete  Delete a snapshot repository.
  verify  Verify a snapshot repository.

ktsearch index snapshot repo create

Usage: ktsearch index snapshot repo create [<options>] <repository>

  Create or update a snapshot repo.

Options:
  -d, --data=<text>       Raw JSON body.
  -f, --file=<text>       Read JSON body from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <repository>  Repository name.

ktsearch index snapshot repo get

Usage: ktsearch index snapshot repo get [<options>] [<repository>]

  Get snapshot repo(s).

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <repository>  Repository name.

ktsearch index snapshot repo delete

Usage: ktsearch index snapshot repo delete [<options>] <repository>

  Delete a snapshot repository.

Options:
  -y, --yes               Do not prompt.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <repository>  Repository name.

ktsearch index snapshot repo verify

Usage: ktsearch index snapshot repo verify [<options>] <repository>

  Verify a snapshot repository.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <repository>  Repository name.

ktsearch index snapshot create

Usage: ktsearch index snapshot create [<options>] <repository> <snapshot>

  Create a snapshot.

Options:
  -d, --data=<text>       Optional JSON body.
  -f, --file=<text>       Read JSON body from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <repository>  Repository name.
  <snapshot>    Snapshot name.

ktsearch index snapshot list

Usage: ktsearch index snapshot list [<options>] <repository> [<pattern>]

  List snapshots in a repository.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <repository>  Repository name.
  <pattern>     Snapshot pattern.

ktsearch index snapshot delete

Usage: ktsearch index snapshot delete [<options>] <repository> <snapshot>

  Delete a snapshot.

Options:
  -y, --yes               Do not prompt.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <repository>  Repository name.
  <snapshot>    Snapshot name.

ktsearch index snapshot restore

Usage: ktsearch index snapshot restore [<options>] <repository> <snapshot>

  Restore a snapshot.

Options:
  -d, --data=<text>       Optional restore JSON.
  -f, --file=<text>       Read JSON body from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <repository>  Repository name.
  <snapshot>    Snapshot name.

ktsearch index reindex

Usage: ktsearch index reindex [<options>]

  Run _reindex.

Options:
  -d, --data=<text>           Raw reindex JSON body.
  -f, --file=<text>           Read JSON body from file.
  --wait=(true|false)         Wait for completion true|false (default false).
  --disable-refresh-interval  Temporarily set destination refresh_interval to -1.
  --set-replicas-zero         Temporarily set destination number_of_replicas to 0.
  --progress-reporting        Poll task and print progress when --wait=false.
  --pretty / --no-pretty      Pretty-print JSON output.
  -h, --help                  Show this message and exit

ktsearch index reindex-task-status

Usage: ktsearch index reindex-task-status [<options>] <taskid>

  Get _tasks status for reindex task.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <taskid>  Task id.

ktsearch index reindex-wait

Usage: ktsearch index reindex-wait [<options>] <taskid>

  Poll reindex task until completion.

Options:
  --interval-seconds=<int>  Polling interval seconds.
  --timeout-seconds=<int>   Max wait seconds.
  -h, --help                Show this message and exit

Arguments:
  <taskid>  Task id.

ktsearch index ilm

Usage: ktsearch index ilm [<options>] <command> [<args>]...

  Manage ILM policies.

Options:
  -h, --help  Show this message and exit

Commands:
  put     Create or update ILM policy.
  get     Get ILM policy/policies.
  delete  Delete ILM policy.
  status  Get ILM status.

ktsearch index ilm put

Usage: ktsearch index ilm put [<options>] <policy>

  Create or update ILM policy.

Options:
  -d, --data=<text>       Raw policy JSON.
  -f, --file=<text>       Read JSON from file.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <policy>  Policy id.

ktsearch index ilm get

Usage: ktsearch index ilm get [<options>] [<policy>]

  Get ILM policy/policies.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <policy>  Policy id.

ktsearch index ilm delete

Usage: ktsearch index ilm delete [<options>] <policy>

  Delete ILM policy.

Options:
  -y, --yes               Do not prompt.
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

Arguments:
  <policy>  Policy id.

ktsearch index ilm status

Usage: ktsearch index ilm status [<options>]

  Get ILM status.

Options:
  --pretty / --no-pretty  Pretty-print JSON output.
  -h, --help              Show this message and exit

ktsearch index apply

Usage: ktsearch index apply [<options>] <target>

  Apply JSON as mappings/settings/component-template/index-template.

Options:
  -f, --file=<text>                                                  Input JSON file.
  -d, --data=<text>                                                  Raw JSON payload.
  --kind=(auto|mappings|settings|component-template|index-template)  Kind or auto.
  -h, --help                                                         Show this message and exit

Arguments:
  <target>  Index or template id.

ktsearch index wait-green

Usage: ktsearch index wait-green [<options>] <index>

  Wait until index health is green.

Options:
  --interval-seconds=<int>
  --timeout-seconds=<int>
  -h, --help                Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index wait-exists

Usage: ktsearch index wait-exists [<options>] <index>

  Wait until index exists.

Options:
  --interval-seconds=<int>
  --timeout-seconds=<int>
  -h, --help                Show this message and exit

Arguments:
  <index>  Index name.

ktsearch index dump

Usage: ktsearch index dump [<options>] <index>

  Dump all index documents to gzipped NDJSON using search_after.

Options:
  --output=<text>  Output file path. Defaults to <index>.ndjson.gz.
  -y, --yes        Overwrite without confirmation if file exists.
  --schema         Also export <index>-schema.json with mappings and settings.
  --aliases        Also export <index>-aliases.json with aliases for index.
  -h, --help       Show this message and exit

Arguments:
  <index>  Index name to dump.

ktsearch index restore

Usage: ktsearch index restore [<options>] <index>

  Restore gzipped NDJSON dump into an index.

Options:
  --input=<text>                    Input file path. Defaults to <index>.ndjson.gz.
  --bulk-size=<int>                 Bulk request size.
  --recreate                        Delete and recreate target index before restore.
  --create-if-missing=(true|false)  Create target index when missing (default true).
  --refresh=(wait_for|true|false)   Refresh mode: wait_for|true|false.
  --pipeline=<text>                 Ingest pipeline for restore indexing.
  --routing=<text>                  Routing value for all restored docs.
  --disable-refresh-interval        Temporarily set index refresh_interval to -1.
  --set-replicas-zero               Temporarily set index number_of_replicas to 0.
  --schema                          Load <index>-schema.json and create target index from it.
  --aliases                         Load <index>-aliases.json and apply aliases before restore.
  -y, --yes                         Do not prompt for destructive actions.
  -h, --help                        Show this message and exit

Arguments:
  <index>  Target index name.

ktsearch index search

Usage: ktsearch index search [<options>] <index>

  Run a search with lucene query string or raw JSON body.

Options:
  --query=<text>                                         Lucene query string syntax.
  -d, --data=<text>                                      Raw JSON query body.
  --size=<int>                                           Number of hits to return.
  --offse, --offset=<int>                                Offset for paging. --offse kept for compatibility.
  --fields=<text>                                        Comma-separated list of source fields to include.
  --sort=<text>                                          Sort expression, e.g. timestamp:desc,_id:asc.
  --track-total-hits=<text>                              Track total hits exactly (true|false).
  --timeout=<text>                                       Search timeout, e.g. 30s, 1m.
  --routing=<text>                                       Routing value for shard targeting.
  --preference=<text>                                    Search preference value (e.g. _local).
  --allow-partial-results=<text>                         Allow partial results when shards fail (true|false).
  --pretty / --no-pretty                                 Pretty-print JSON output.
  --output=<text>                                        Write output JSON to file instead of stdout.
  --profile                                              Enable query profiling.
  --explain                                              Include explain output for hits.
  --terminate-after=<int>                                Terminate search after this many docs per shard.
  --search-type=(query_then_fetch|dfs_query_then_fetch)  Search type.
  -h, --help                                             Show this message and exit

Arguments:
  <index>  Index name to search.

ktsearch completion

Usage: ktsearch completion [<options>] <shell>

  Generate a tab-complete script for the given shell

Options:
  -h, --help  Show this message and exit