Skip to content

iot-tools CLI Reference

IoT development tools for schema generation, gateway management, and more

Quick Reference

elastic

Elasticsearch management commands

CommandDescription
elastic statusCheck Elasticsearch cluster connection and status
elastic compare-mappingsCompare current index template with generated mappings
elastic migrateUpload component templates and index template to Elastics...
elastic migrate-component-templatesUpload only component templates to Elasticsearch cluster
elastic migrate-index-templateUpload only index template to Elasticsearch cluster
elastic rolloverRollover data streams to create new backing indices with ...
elastic config setSet Elasticsearch configuration value (cloudId or apiKey)
elastic config getGet Elasticsearch configuration value (cloudId or apiKey)

clients

API client generation commands

CommandDescription
clients generateGenerate TypeScript and .NET API clients from OpenAPI spec

dev

Development environment commands

CommandDescription
dev setupCheck prerequisites and setup development environment

gateway

Edge Gateway build and deployment commands

CommandDescription
gateway publishPublish Edge Gateway for different platforms
gateway config setSet default gateway target
gateway config getGet default gateway target
gateway remote deployDeploy Edge Gateway to remote host via SSH
gateway remote statusCheck Edge Gateway status on remote host
gateway remote logsView Edge Gateway logs on remote host
gateway remote restart-serviceRestart Edge Gateway service on remote host
gateway remote config listList all configuration from remote gateway
gateway remote config getGet configuration value from remote gateway
gateway remote config setSet configuration value on remote gateway

Standalone Commands

CommandDescription
depsShow command dependency tree

↑ Back to Top


Commands

deps

📍 Path: iot-tools deps

Show command dependency tree

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools deps
  • With custom options (Advanced configuration)
    bash
    iot-tools deps --with-deps-only

Full Usage:

bash
iot-tools deps [options]

Options

OptionTypeDescriptionDefault
--filterstringFilter by command name pattern-
--with-deps-onlyflagShow only commands with dependencies-

Examples

bash
iot-tools deps
bash
iot-tools deps --with-deps-only
bash
iot-tools deps --filter elastic

elastic

📍 Path: iot-tools elastic

Elasticsearch management commands

Available Subcommands:

CommandDescription
statusCheck Elasticsearch cluster connection and status
compare-mappingsCompare current index template with generated mappings
migrateUpload component templates and index template to Elasticsearch cluster
migrate-component-templatesUpload only component templates to Elasticsearch cluster
migrate-index-templateUpload only index template to Elasticsearch cluster
rolloverRollover data streams to create new backing indices with updated template
configManage Elasticsearch configuration

elastic status

📍 Path: iot-tools elastic status | Parent: elastic

Check Elasticsearch cluster connection and status

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools elastic status elastic

Full Usage:

bash
iot-tools elastic status

Examples

bash
iot-tools elastic status elastic
bash
iot-tools elastic status

elastic compare-mappings

📍 Path: iot-tools elastic compare-mappings | Parent: elastic

Compare current index template with generated mappings

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools elastic compare-mappings elastic
  • With custom options (Advanced configuration)
    bash
    iot-tools elastic compare-mappings --template metrics-* elastic

Full Usage:

bash
iot-tools elastic compare-mappings [options]

Options

OptionTypeDescriptionDefault
--detailed, -dflagShow detailed diff-
--input, -istringPath to metrics JSON file-
--template, -tstringName of the index template to compare (defaults to metrics-*)-

Examples

bash
iot-tools elastic compare-mappings elastic
bash
iot-tools elastic compare-mappings
bash
iot-tools elastic compare-mappings --template metrics-* elastic
bash
iot-tools elastic compare-mappings --detailed

elastic migrate

📍 Path: iot-tools elastic migrate | Parent: elastic

Upload component templates and index template to Elasticsearch cluster

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools elastic migrate elastic
  • With custom options (Advanced configuration)
    bash
    iot-tools elastic migrate --dry-run elastic

Full Usage:

bash
iot-tools elastic migrate [options]

Options

OptionTypeDescriptionDefault
--dry-runflagDry run - show what would be uploaded without making changes-
--force, -fflagForce overwrite existing component templates-

Examples

bash
iot-tools elastic migrate elastic
bash
iot-tools elastic migrate
bash
iot-tools elastic migrate --dry-run elastic
bash
iot-tools elastic migrate --force

elastic migrate-component-templates

📍 Path: iot-tools elastic migrate-component-templates | Parent: elastic

Upload only component templates to Elasticsearch cluster

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools elastic migrate-component-templates elastic
  • With custom options (Advanced configuration)
    bash
    iot-tools elastic migrate-component-templates --dry-run elastic

Full Usage:

bash
iot-tools elastic migrate-component-templates [options]

Options

OptionTypeDescriptionDefault
--dry-runflagDry run - show what would be uploaded without making changes-
--force, -fflagForce overwrite existing component templates-

Examples

bash
iot-tools elastic migrate-component-templates elastic
bash
iot-tools elastic migrate-component-templates
bash
iot-tools elastic migrate-component-templates --dry-run elastic
bash
iot-tools elastic migrate-component-templates --force

elastic migrate-index-template

📍 Path: iot-tools elastic migrate-index-template | Parent: elastic

Upload only index template to Elasticsearch cluster

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools elastic migrate-index-template elastic
  • With custom options (Advanced configuration)
    bash
    iot-tools elastic migrate-index-template --dry-run elastic

Full Usage:

bash
iot-tools elastic migrate-index-template [options]

Options

OptionTypeDescriptionDefault
--dry-runflagDry run - show what would be uploaded without making changes-
--force, -fflagForce overwrite existing index template-

Examples

bash
iot-tools elastic migrate-index-template elastic
bash
iot-tools elastic migrate-index-template
bash
iot-tools elastic migrate-index-template --dry-run elastic
bash
iot-tools elastic migrate-index-template --force

elastic rollover

📍 Path: iot-tools elastic rollover | Parent: elastic

Rollover data streams to create new backing indices with updated template

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools elastic rollover elastic
  • With custom options (Advanced configuration)
    bash
    iot-tools elastic rollover --dry-run elastic

Full Usage:

bash
iot-tools elastic rollover [options]

Options

OptionTypeDescriptionDefault
--dry-runflagDry run - show what would be rolled over without making changes-
--streamstringData stream name pattern to rollover (default: metrics*)-

Examples

bash
iot-tools elastic rollover elastic
bash
iot-tools elastic rollover
bash
iot-tools elastic rollover --dry-run elastic
bash
iot-tools elastic rollover --stream iot-metrics*

elastic config

📍 Path: iot-tools elastic config | Parent: elastic

Manage Elasticsearch configuration

Available Subcommands:

CommandDescription
setSet Elasticsearch configuration value (cloudId or apiKey)
getGet Elasticsearch configuration value (cloudId or apiKey)

elastic config set

📍 Path: iot-tools elastic config set | Parent: elastic config

Set Elasticsearch configuration value (cloudId or apiKey)

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools elastic config set elastic config

Full Usage:

bash
iot-tools elastic config set <arguments>

Arguments

  • KEY (required) - Type: string Configuration key (cloudId or apiKey)
  • VALUE (required) - Type: string Configuration value

Examples

bash
iot-tools elastic config set elastic config
bash
iot-tools elastic config set cloudId my-deployment:dXMtY2VudHJhbDEuZ2Nw... elastic config
bash
iot-tools elastic config set apiKey VnVhQ2ZHY0JDZGJrU...

elastic config get

📍 Path: iot-tools elastic config get | Parent: elastic config

Get Elasticsearch configuration value (cloudId or apiKey)

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools elastic config get elastic config

Full Usage:

bash
iot-tools elastic config get <arguments>

Arguments

  • KEY (required) - Type: string Configuration key (cloudId or apiKey)

Examples

bash
iot-tools elastic config get elastic config
bash
iot-tools elastic config get cloudId elastic config
bash
iot-tools elastic config get apiKey



clients

📍 Path: iot-tools clients

API client generation commands

Available Subcommands:

CommandDescription
generateGenerate TypeScript and .NET API clients from OpenAPI spec

clients generate

📍 Path: iot-tools clients generate | Parent: clients

Generate TypeScript and .NET API clients from OpenAPI spec

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools clients generate clients
  • With custom options (Advanced configuration)
    bash
    iot-tools clients generate --skip-typescript clients

Full Usage:

bash
iot-tools clients generate [options]

Options

OptionTypeDescriptionDefault
--skip-dotnetflagSkip .NET client generation-
--skip-typescriptflagSkip TypeScript client generation-

Examples

bash
iot-tools clients generate clients
bash
iot-tools clients generate
bash
iot-tools clients generate --skip-typescript clients
bash
iot-tools clients generate --skip-dotnet


dev

📍 Path: iot-tools dev

Development environment commands

Available Subcommands:

CommandDescription
setupCheck prerequisites and setup development environment

dev setup

📍 Path: iot-tools dev setup | Parent: dev

Check prerequisites and setup development environment

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools dev setup dev
  • With custom options (Advanced configuration)
    bash
    iot-tools dev setup --install-tools

Full Usage:

bash
iot-tools dev setup [options]

Options

OptionTypeDescriptionDefault
--install-tools, -tflagInstall global .NET tools (dotnet-ef, refitter)-

Examples

bash
iot-tools dev setup dev
bash
iot-tools dev setup
bash
iot-tools dev setup --install-tools


gateway

📍 Path: iot-tools gateway

Edge Gateway build and deployment commands

Available Subcommands:

CommandDescription
publishPublish Edge Gateway for different platforms
configManage local gateway configuration
remoteManage remote gateway instances

gateway publish

📍 Path: iot-tools gateway publish | Parent: gateway

Publish Edge Gateway for different platforms

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway publish gateway
  • With custom options (Advanced configuration)
    bash
    iot-tools gateway publish --runtime linux-musl-arm64 gateway

Full Usage:

bash
iot-tools gateway publish [options]

Options

OptionTypeDescriptionDefault
--runtime, -rstringRuntime identifier (linux-x64 or linux-arm64)-

Examples

bash
iot-tools gateway publish gateway
bash
iot-tools gateway publish
bash
iot-tools gateway publish --runtime linux-musl-arm64 gateway
bash
iot-tools gateway publish -r linux-musl-x64 gateway
bash
iot-tools gateway publish -r linux-arm64

gateway config

📍 Path: iot-tools gateway config | Parent: gateway

Manage local gateway configuration

Available Subcommands:

CommandDescription
setSet default gateway target
getGet default gateway target

gateway config set

📍 Path: iot-tools gateway config set | Parent: gateway config

Set default gateway target

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway config set gateway config

Full Usage:

bash
iot-tools gateway config set <arguments>

Arguments

  • TARGET (required) - Type: string SSH target: user@hostname (e.g., root@10.20.0.93) or SSH config host alias

Examples

bash
iot-tools gateway config set gateway config
bash
iot-tools gateway config set root@10.20.0.93 gateway config
bash
iot-tools gateway config set my-gateway

gateway config get

📍 Path: iot-tools gateway config get | Parent: gateway config

Get default gateway target

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway config get gateway config

Full Usage:

bash
iot-tools gateway config get

Examples

bash
iot-tools gateway config get gateway config
bash
iot-tools gateway config get


gateway remote

📍 Path: iot-tools gateway remote | Parent: gateway

Manage remote gateway instances

Available Subcommands:

CommandDescription
deployDeploy Edge Gateway to remote host via SSH
statusCheck Edge Gateway status on remote host
logsView Edge Gateway logs on remote host
restart-serviceRestart Edge Gateway service on remote host
configManage remote gateway configuration

gateway remote deploy

📍 Path: iot-tools gateway remote deploy | Parent: gateway remote

Deploy Edge Gateway to remote host via SSH

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway remote deploy gateway remote

Full Usage:

bash
iot-tools gateway remote deploy <arguments> [options]

Arguments

  • TARGET - Type: string SSH target: user@hostname (e.g., compulab@10.20.0.93) or SSH config host alias (e.g., my-gateway). Uses default from .env if not specified.

Options

OptionTypeDescriptionDefault
--identity, -istringPath to SSH identity file (private key). Overrides SSH config if specified.-
--restartflagAutomatically restart the gateway service after deployment-
--runtime, -rstringRuntime identifier of the published gateway to deploy (auto-detected if not specified)-
--source, -sstringPath to published gateway files (auto-detected if not specified)-
--ssh-configstringPath to SSH config file (defaults to ~/.ssh/config)-

Examples

bash
iot-tools gateway remote deploy gateway remote
bash
iot-tools gateway remote deploy my-gateway gateway remote
bash
iot-tools gateway remote deploy compulab@10.20.0.93
bash
iot-tools gateway remote deploy -i ./id_rsa

gateway remote status

📍 Path: iot-tools gateway remote status | Parent: gateway remote

Check Edge Gateway status on remote host

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway remote status gateway remote

Full Usage:

bash
iot-tools gateway remote status <arguments> [options]

Arguments

  • TARGET - Type: string SSH target: user@hostname (e.g., compulab@10.20.0.93) or SSH config host alias (e.g., my-gateway). Uses default from .env if not specified.

Options

OptionTypeDescriptionDefault
--identity, -istringPath to SSH identity file (private key). Overrides SSH config if specified.-
--ssh-configstringPath to SSH config file (defaults to ~/.ssh/config)-

Examples

bash
iot-tools gateway remote status gateway remote
bash
iot-tools gateway remote status my-gateway gateway remote
bash
iot-tools gateway remote status root@10.20.0.93

gateway remote logs

📍 Path: iot-tools gateway remote logs | Parent: gateway remote

View Edge Gateway logs on remote host

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway remote logs gateway remote

Full Usage:

bash
iot-tools gateway remote logs <arguments> [options]

Arguments

  • TARGET - Type: string SSH target: user@hostname (e.g., compulab@10.20.0.93) or SSH config host alias (e.g., my-gateway). Uses default from .env if not specified.

Options

OptionTypeDescriptionDefault
--follow, -fflagFollow log output in real-time-
--identity, -istringPath to SSH identity file (private key). Overrides SSH config if specified.-
--lines, -nint?Number of log lines to show (default: all recent logs)-
--since, -sstringShow logs since specified time (e.g., '1 hour ago', '2024-12-18 14:00:00')-
--ssh-configstringPath to SSH config file (defaults to ~/.ssh/config)-

Examples

bash
iot-tools gateway remote logs gateway remote
bash
iot-tools gateway remote logs my-gateway
bash
iot-tools gateway remote logs -f gateway remote
bash
iot-tools gateway remote logs root@10.20.0.93
bash
iot-tools gateway remote logs -n 50

gateway remote restart-service

📍 Path: iot-tools gateway remote restart-service | Parent: gateway remote

Restart Edge Gateway service on remote host

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway remote restart-service gateway remote

Full Usage:

bash
iot-tools gateway remote restart-service <arguments> [options]

Arguments

  • TARGET - Type: string SSH target: user@hostname (e.g., compulab@10.20.0.93) or SSH config host alias. Uses default if not specified.

Options

OptionTypeDescriptionDefault
--identity, -istringPath to SSH identity file (private key). Overrides SSH config if specified.-
--ssh-configstringPath to SSH config file (defaults to ~/.ssh/config)-

Examples

bash
iot-tools gateway remote restart-service gateway remote
bash
iot-tools gateway remote restart-service my-gateway gateway remote
bash
iot-tools gateway remote restart-service root@10.20.0.93
bash
iot-tools gateway remote restart-service -i ./id_rsa

gateway remote config

📍 Path: iot-tools gateway remote config | Parent: gateway remote

Manage remote gateway configuration

Available Subcommands:

CommandDescription
listList all configuration from remote gateway
getGet configuration value from remote gateway
setSet configuration value on remote gateway

gateway remote config list

📍 Path: iot-tools gateway remote config list | Parent: gateway remote config

List all configuration from remote gateway

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway remote config list gateway remote config

Full Usage:

bash
iot-tools gateway remote config list <arguments> [options]

Arguments

  • TARGET - Type: string SSH target: user@hostname (e.g., compulab@10.20.0.93) or SSH config host alias (e.g., my-gateway). Uses default from .env if not specified.

Options

OptionTypeDescriptionDefault
--identity, -istringPath to SSH identity file (private key). Overrides SSH config if specified.-
--ssh-configstringPath to SSH config file (defaults to ~/.ssh/config)-

Examples

bash
iot-tools gateway remote config list gateway remote config
bash
iot-tools gateway remote config list root@10.20.0.93

gateway remote config get

📍 Path: iot-tools gateway remote config get | Parent: gateway remote config

Get configuration value from remote gateway

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway remote config get gateway remote config
  • With custom options (Advanced configuration)
    bash
    iot-tools gateway remote config get --key GatewayId gateway remote config

Full Usage:

bash
iot-tools gateway remote config get <arguments> [options]

Arguments

  • TARGET - Type: string SSH target: user@hostname (e.g., compulab@10.20.0.93) or SSH config host alias (e.g., my-gateway). Uses default from .env if not specified.

Options

OptionTypeDescriptionDefault
--identity, -istringPath to SSH identity file (private key). Overrides SSH config if specified.-
--key, -kstringConfiguration key to retrieve (supports colon-separated paths like 'Section:Key')-
--ssh-configstringPath to SSH config file (defaults to ~/.ssh/config)-

Examples

bash
iot-tools gateway remote config get gateway remote config
bash
iot-tools gateway remote config get
bash
iot-tools gateway remote config get --key GatewayId gateway remote config
bash
iot-tools gateway remote config get root@10.20.0.93
bash
iot-tools gateway remote config get --key GatewayId

gateway remote config set

📍 Path: iot-tools gateway remote config set | Parent: gateway remote config

Set configuration value on remote gateway

Common Usage:

  • Basic usage with default settings (Quick start)
    bash
    iot-tools gateway remote config set gateway remote config
  • With custom options (Advanced configuration)
    bash
    iot-tools gateway remote config set --key GatewayId --value gateway-001 gateway remote config

Full Usage:

bash
iot-tools gateway remote config set <arguments> [options]

Arguments

  • TARGET - Type: string SSH target: user@hostname (e.g., compulab@10.20.0.93) or SSH config host alias (e.g., my-gateway). Uses default from .env if not specified.

Options

OptionTypeDescriptionDefault
--identity, -istringPath to SSH identity file (private key). Overrides SSH config if specified.-
--key, -kstringConfiguration key to set (supports colon-separated paths like 'Section:Key')-
--restart, -rflagAutomatically restart the gateway service after updating configuration-
--ssh-configstringPath to SSH config file (defaults to ~/.ssh/config)-
--value, -vstringConfiguration value to set-

Examples

bash
iot-tools gateway remote config set gateway remote config
bash
iot-tools gateway remote config set
bash
iot-tools gateway remote config set --key GatewayId --value gateway-001 gateway remote config
bash
iot-tools gateway remote config set root@10.20.0.93
bash
iot-tools gateway remote config set -k GatewayId -v gateway-001