consumer Command

Table of Contents

  1. Overview
  2. Syntax
  3. Subcommands
  4. create Options
  5. drain Options
  6. Examples
  7. Version History
  8. Related Commands

Overview

The consumer command manages result consumers: it provisions bounded buffers for job, probe, or target so CLI, TUI, MCP, or API clients can pull diagnostic event streams on their own schedule.

Use create, drain, status, and close to decouple the producer (observation commands writing into the buffer) from the consumer (clients pulling at their own pace), so the target is never blocked and unread events are not lost.

Syntax

peeka-cli consumer <subcommand> [options]

Subcommands

Subcommand Description
create Create a result consumer
list List result consumers
status --consumer <id> Show consumer status
drain --consumer <id> Read buffered records
close --consumer <id> Close a consumer
cleanup Clean closed or failed consumers

create Options

Option Description
--target <id> Owning target
--source cli/tui/mcp/api/internal Request source
--scope-type job/probe/target Scope type to consume
--scope-id <id> Job, probe, or target ID
--client <id> Optional owning client
--max-buffer-size <n> Maximum buffered records, default 1000
--backpressure-policy drop_oldest/drop_newest/fail Policy when the buffer is full, default drop_oldest

drain Options

Option Description
--limit <n> Maximum records to return, default 100
--after-sequence <n> Return records with sequence greater than this value
--timeout-ms <n> Wait up to this many milliseconds for new records, default 0

All subcommands support --format table or --format json.

Examples

peeka-cli consumer create \
  --target target_abcd1234 \
  --source cli \
  --scope-type probe \
  --scope-id probe_123 \
  --format json

peeka-cli consumer drain --consumer consumer_123 --limit 50 --format json
peeka-cli consumer close --consumer consumer_123
peeka-cli consumer cleanup --target target_abcd1234

Version History

Version Release Date Changes
0.1.16 2026-06-07 Added the consumer command group
  • client - Manage client sessions
  • job - Manage command jobs
  • probe - Manage probe runs

Back to top

Copyright © 2026 Peeka contributors. Distributed under the Apache License 2.0.

This site uses Just the Docs, a documentation theme for Jekyll.