Skip to main content

myrmic send

Name

myrmic send - Send a command to a deployed cell

Aliases: command, cmd

Synopsis

myrmic send [OPTIONS] [SRI/SRN] [NAME] [PAYLOAD]

Description

Send a command to a deployed cell. Commands are fire-and-forget - no response is returned.

  • SRI/SRN - required. Identifies the target cell, either by its SRI (UUID) or by its SRN name.
  • NAME - required. Specifies the command to invoke.
  • PAYLOAD - optional. Specifies data to pass to the command. How the value is encoded is described in Payload Encoding.

A trace ID is printed - use it with myrmic telemetry traces to trace the request.

Options

--raw

Decodes the payload as a hex string (an optional 0x prefix is allowed) and sends those raw bytes as-is, bypassing JSON encoding. Use this when the command handler expects a non-JSON wire format.

-v / --verbose

Verbose mode, shows more detail about what the command is doing. Useful for debugging. Can be set to -vv for even more detail.

-h, --help

Prints help information.

Payload Encoding

By default, the payload is sent as JSON. A value that is not valid JSON is automatically wrapped as a JSON string:

InputSent as
{"count": 1}JSON object {"count":1}
[1, 2, 3]JSON array [1,2,3]
42JSON number 42
trueJSON boolean true
helloJSON string "hello"

Pass --raw to send raw bytes instead. The payload is decoded as a hex string (an optional 0x prefix is allowed) and the resulting bytes are sent as-is, with no JSON encoding.

Examples

  1. Send a command with no payload:
myrmic send my-cell ping
  1. Send a JSON object payload:
myrmic send my-cell my_command '{"count": 10}'
  1. Send a bare string - it is wrapped as a JSON string automatically:
myrmic send my-cell greet ada
  1. Send raw bytes from a hex string, bypassing JSON encoding:
myrmic send my-cell my_command 0xdeadbeef --raw
Cookie Policy