Skip to content

Channel Commands

The doover channel command group lets you interact with channels on the Doover Data API. All channel commands require an --agent flag to specify which agent context to operate in.

Agent Context

Every channel command requires --agent to identify the agent that owns the channels:

doover channel get my-channel --agent 12345

You can find your agent ID with:

doover agent list

Getting a Channel

doover channel get <channel-name> --agent <agent-id>

Retrieves the current state of a channel aggregate, including its latest message.

Creating a Channel

doover channel create <channel-name> --agent <agent-id>

Creates a new channel under the specified agent.

Publishing to a Channel

Publish a Message

doover channel publish <channel-name> <message> --agent <agent-id>

Publishes a message to a channel's aggregate. The message can be a JSON string or plain text:

# Publish JSON data
doover channel publish sensor_data '{"temperature": 22.5, "humidity": 65}' --agent 12345

# Publish a string value
doover channel publish status "online" --agent 12345

Publish a File

doover channel publish-file <channel-name> <file-path> --agent <agent-id>

Publishes the contents of a file to a channel's aggregate:

doover channel publish-file config_backup ./backup.json --agent 12345

Following a Channel

doover channel follow <channel-name> [poll-rate] --agent <agent-id>

Follows a channel in real-time, polling for updates at the specified interval (default: 5 seconds):

# Follow with default 5-second polling
doover channel follow sensor_data --agent 12345

# Follow with 2-second polling
doover channel follow sensor_data 2 --agent 12345

The command runs until interrupted with Ctrl+C, printing each new message as it arrives.

Common Options

All channel commands accept:

OptionDescription
--agentAgent ID (required)
--profileAuthentication profile to use

Related Pages