Skip to main content
Append records to a stream. Each newline-delimited input becomes one record.

From stdin

echo -e "hello world\nfoo bar\nthird record" \
  | s2 append s2://my-basin/my-stream
✓ [APPENDED] 0..3 // tail: 3 @ 1771390606217

From a file

s2 append s2://my-basin/my-stream -i records.txt

Interactive

Start an interactive append session where each line you type becomes a record:
s2 append s2://my-basin/my-stream

Piping from another process

nc starwars.s2.dev 23 | s2 append s2://my-basin/starwars

Options

FlagDescription
-f, --fencing-tokenEnforce a fencing token
-m, --match-seq-numEnforce that the first record’s sequence number matches
--formatInput format: text (default), json, json-base64
--lingerHow long to wait for more records before flushing a batch (default: 5ms)
-i, --inputRead from a file instead of stdin