Skip to content

Streaming stdout for long-running commands (sync, webhook, daemon) #15

@longevityboris

Description

@longevityboris

Commands that take time (`sync`, especially cold-start multi-account sync) emit nothing until done, then fire one JSON envelope. Clients with UI progress indicators have nothing to render.

Proposal

Add `--stream` flag that emits NDJSON events as they happen:

```jsonl
{"event":"sync.started","accounts":6}
{"event":"sync.account.done","account":"x@y.com","received":2,"sent":0}
{"event":"sync.account.done","account":"a@b.com","received":0,"sent":1}
...
{"event":"sync.completed","total_received":5,"total_sent":1}
```

  • Non-streaming default stays as-is (one JSON envelope at exit).
  • Streaming is opt-in, so existing scripts don't break.
  • Minimail can render "Syncing 3/6 · alice@x.com" in real time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions