Channel Commands
The doover channel command group provides tools for managing Doover channels, including creating channels, publishing messages, managing processors and tasks, and handling subscriptions.
Available Commands
| Command | Description |
|---|---|
get | Get channel information |
create | Create a new channel |
publish | Publish a message to a channel |
publish-file | Publish a file to a processor channel |
follow | Follow channel updates in real-time |
create-processor | Create a processor channel |
publish-processor | Publish a processor package |
create-task | Create a task channel |
invoke-local-task | Invoke a task locally |
subscribe | Add a subscription to a task |
unsubscribe | Remove a subscription from a task |
Getting Channel Information
The doover channel get command retrieves information about a channel.
Usage
doover channel get <CHANNEL_NAME> [OPTIONS]
Options
| Option | Description | Default |
|---|---|---|
--profile | Configuration profile to use | default |
--agent | Agent ID for the channel lookup | From profile |
Example
# Get channel by name doover channel get my-sensor-data # Get channel with specific agent doover channel get my-sensor-data --agent abc123 # Get channel using different profile doover channel get my-sensor-data --profile production
The command first tries to look up the channel by ID, then falls back to looking up by name within the specified agent.
Creating Channels
The doover channel create command creates a new channel.
Usage
doover channel create <CHANNEL_NAME> [OPTIONS]
Options
| Option | Description | Default |
|---|---|---|
--profile | Configuration profile to use | default |
--agent | Agent ID to own the channel | From profile |
Example
# Create a new channel doover channel create temperature-readings # Create channel for specific agent doover channel create temperature-readings --agent abc123
Output:
Channel created successfully. ID: ch_xyz789 Channel Name: temperature-readings Owner Agent: abc123 ...
Publishing Messages
Publishing Data
The doover channel publish command publishes a message to a channel.
Usage
doover channel publish <CHANNEL_NAME> <MESSAGE> [OPTIONS]
Arguments
| Argument | Description |
|---|---|
CHANNEL_NAME | Name of the channel to publish to |
MESSAGE | Message content (string or JSON) |
Example
# Publish a simple string message
doover channel publish my-channel "Hello, world!"
# Publish JSON data
doover channel publish sensor-data '{"temperature": 23.5, "humidity": 65}'
# Publish with specific profile
doover channel publish sensor-data '{"value": 42}' --profile production
If the message is valid JSON, it will be parsed and sent as a structured object.
Publishing Files
The doover channel publish-file command publishes a file to a processor channel.
Usage
doover channel publish-file <CHANNEL_NAME> <FILE_PATH> [OPTIONS]
Example
# Publish a configuration file doover channel publish-file config-channel ./config.json # Publish a data file doover channel publish-file data-channel ./sensor-export.csv
Following Channels
The doover channel follow command subscribes to a channel and displays updates in real-time.
Usage
doover channel follow <CHANNEL_NAME> [POLL_RATE] [OPTIONS]
Arguments
| Argument | Description | Default |
|---|---|---|
CHANNEL_NAME | Channel to follow | (required) |
POLL_RATE | Seconds between checks | 5 |
Example
# Follow a channel with default poll rate doover channel follow sensor-data # Follow with faster updates doover channel follow sensor-data 2 # Follow with 10-second intervals doover channel follow sensor-data 10
The command displays channel information, then continuously polls for aggregate changes and prints updates.
Press Ctrl+C to stop following.
Processor Channels
Processors are special channels that contain executable code for data processing.
Creating a Processor
doover channel create-processor <PROCESSOR_NAME> [OPTIONS]
Example
# Create a processor channel doover channel create-processor >data-aggregator # The > prefix is automatically added if not present doover channel create-processor data-aggregator
Output:
Processor created successfully. ID: proc_abc123 ...
Publishing a Processor Package
The doover channel publish-processor command uploads a processor package to a processor channel.
Usage
doover channel publish-processor <PROCESSOR_NAME> <PACKAGE_PATH> [OPTIONS]
Example
# Publish a processor package doover channel publish-processor >data-aggregator ./my-processor/ # The package path should be a directory containing the processor code doover channel publish-processor >my-processor ./processors/my-processor/
Task Channels
Tasks are channels that trigger processor execution based on subscriptions.
Creating a Task
doover channel create-task <TASK_NAME> <PROCESSOR_NAME> [OPTIONS]
Arguments
| Argument | Description |
|---|---|
TASK_NAME | Name for the task channel (automatically prefixed with @) |
PROCESSOR_NAME | Processor channel to trigger (automatically prefixed with >) |
Example
# Create a task that triggers a processor doover channel create-task daily-aggregation data-aggregator # With explicit prefixes doover channel create-task @daily-aggregation >data-aggregator
Output:
Task created successfully. ID: task_def456 ...
Invoking a Task Locally
The doover channel invoke-local-task command runs a task on your local machine for testing.
Usage
doover channel invoke-local-task <TASK_NAME> --package-path <PATH> [OPTIONS]
Options
| Option | Description | Default |
|---|---|---|
--package-path | Path to the processor package | (required) |
CHANNEL_NAME | Channel to get the last message from | None |
--csv-file | CSV export of messages to process | None |
--parallel-processes | Number of parallel workers | None |
--dry-run | Run without invoking the task | False |
Examples
# Invoke task with a single message from a channel doover channel invoke-local-task @my-task --package-path ./processor/ sensor-data # Invoke task without a message doover channel invoke-local-task @my-task --package-path ./processor/ # Process messages from a CSV export doover channel invoke-local-task @my-task --package-path ./processor/ --csv-file ./messages.csv # Dry run to test setup doover channel invoke-local-task @my-task --package-path ./processor/ --dry-run # Process CSV with parallel workers doover channel invoke-local-task @my-task --package-path ./processor/ --csv-file ./messages.csv --parallel-processes 4
Subscriptions
Tasks can subscribe to channels, triggering the task's processor when the channel receives a message.
Adding a Subscription
doover channel subscribe <TASK_NAME> <CHANNEL_NAME> [OPTIONS]
Example
# Subscribe a task to a channel doover channel subscribe @daily-aggregation sensor-data
Output:
Successfully added sensor-data to @daily-aggregation's subscriptions.
Removing a Subscription
doover channel unsubscribe <TASK_NAME> <CHANNEL_NAME> [OPTIONS]
Example
# Remove a subscription doover channel unsubscribe @daily-aggregation sensor-data
Output:
Successfully removed sensor-data from @daily-aggregation's subscriptions.
Channel Naming Conventions
Doover uses prefixes to distinguish channel types:
| Prefix | Type | Example |
|---|---|---|
| (none) | Regular channel | sensor-data |
> | Processor channel | >data-aggregator |
@ | Task channel | @daily-aggregation |
The CLI automatically adds the appropriate prefix when needed, so you can use either:
# These are equivalent doover channel create-task daily-aggregation data-aggregator doover channel create-task @daily-aggregation >data-aggregator
Error Handling
Common errors and their meanings:
| Error | Cause | Solution |
|---|---|---|
| "Channel not found" | Channel does not exist or wrong agent | Verify channel name and agent ID |
| "Is it owned by this agent?" | Channel belongs to different agent | Use --agent to specify correct agent |
| "That wasn't a task channel" | Used task command on non-task channel | Verify channel type and name prefix |
| "Channel name is not a processor" | Used processor command on non-processor | Verify channel type and name prefix |
Workflow Example
A typical workflow for setting up data processing:
# 1. Create a processor channel
doover channel create-processor >my-processor
# 2. Publish processor code
doover channel publish-processor >my-processor ./my-processor-package/
# 3. Create a task that uses the processor
doover channel create-task @process-data >my-processor
# 4. Create a data channel
doover channel create sensor-readings
# 5. Subscribe the task to the data channel
doover channel subscribe @process-data sensor-readings
# 6. Test locally before deployment
doover channel invoke-local-task @process-data --package-path ./my-processor-package/ sensor-readings --dry-run
# 7. Publish some data
doover channel publish sensor-readings '{"value": 42}'
# 8. Follow the channel for updates
doover channel follow sensor-readings