ktm shell send

Send a shell command to a device

Send a shell command to a device

Usage

ktm shell send [flags]

Examples

# Dial a USSD shortcode and wait for the menu
ktm shell send --product 123 --owner 0789800356 --type USSD --command '{"input":"#131#"}' --wait

# Navigate a USSD menu (send option "1" to continue the session)
ktm shell send --product 123 --owner 0789800356 --type USSD --command '{"input":"1"}' --wait

# Send an HTTP API call via web agent
ktm shell send --product 456 --owner my-agent --type ETH_HTTP_API --command '{"http_method":"GET","url":"https://example.com/api/health"}'

# Fire and forget (returns immediately with shell ID)
ktm shell send --product 123 --owner 0789800356 --type DATA_PING --command '{"host":"8.8.8.8","count":3}'

Flags

FlagTypeDefaultDescription
--commandstringCommand payload as JSON (required)
--ownerstringDevice identifier: MSISDN for SIM, hostname for Ethernet (required)
--productintProduct ID (required)
--typestringAction type (e.g. USSD, ETH_HTTP_API) — see 'shell types' (required)
--waitbooleanWait for the command to complete before returning

Details

Submit a single shell command for execution on a SIM card or web agent.

The --type flag accepts the full action type name (e.g. USSD, ETH_HTTP_API). Use 'shell types' to see all available action types and their required command fields.

USSD is session-based: dial the root shortcode first (e.g. --command '{"input":"*199#"}'), then check the result with 'shell get'. If the session is OPEN, send follow-up menu options as separate commands (e.g. --command '{"input":"1"}'). Prefer step-by-step navigation over long shortcodes like 1995# — only use long shortcodes when you know the exact path. Sessions expire after ~30s of inactivity.

Global flags (--output, --debug, --host, …) apply to every command. See the command reference overview.

What's next?

All commands

Browse the full CLI reference.

Get started

Install the CLI and authenticate.

Last updated on