Skip to content

Commit 304ef30

Browse files
committed
simple script to parse claude's json messages
1 parent ea62cd9 commit 304ef30

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/extract-text.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
grep --line-buffered -E '^\{"type":"assistant"' "$@" | jq --unbuffered -r '.message.content[]? | select(.type=="text") | .text'

0 commit comments

Comments
 (0)