Watch events
line watch
line watch --timeout 30s
line watch --limit 10
line watch --from-now
line watch --json | your-programIn a terminal, watch prints one line per message with the time, chat, sender,
and text or attachment type:
14:05 Alice: See you at 7 ↵ bring snacks
14:06 Family · Bob: Running late
14:07 You → Alice: On my wayNames are looked up once per chat or person and cached; if a lookup fails, the
ID is shown. Other events are hidden unless you add --verbose. A hidden event
still moves the saved position forward but doesn't count toward --limit.
When stdout isn't a terminal (a pipe or file), or with --json, watch writes
one JSON event per line to stdout, in the same format as earlier releases.
Status messages go to stderr. Scripts that run watch in a terminal should pass
--json.
The first run starts at LINE's current position. Later runs continue from a
saved checkpoint; --from-now discards it and starts with new events.
| Event | Meaning |
|---|---|
message | A message was sent or received. |
operation | Another LINE notification. |
resync_required | LINE reported a gap; refresh chats and messages. |
Use revision to remove duplicates: if the process stops between writing an
event and saving its checkpoint, that event can appear again. Only one watcher
can run at a time.