Skip to content

TuringCore/sentiment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bluesky Sentiment (Go)

Small Go CLI that samples recent Bluesky posts, scores sentiment, and prints an ASCII trend chart for the last hour.

By default it uses a lightweight local word-list model (zero API cost). Optional Claude relabeling is available only for uncertain posts, with strict per-run call limits.

Why this keeps token spend low

  • Local sentiment pass on all posts first.
  • Only low-confidence posts are sent to Claude.
  • Batches multiple posts into one Claude call.
  • Hard cap with --claude-max-calls.
  • Text is truncated before sending to Claude.

Quick start

go run .

Example output includes:

  • Sample size in past hour
  • Overall positive/neutral/negative counts
  • 6 buckets of 10-minute sentiment bars (+ positive, = neutral, - negative)

Claude-assisted mode

Set your key and enable relabeling:

export CLAUDE_API_KEY="your_key_here"
go run . --use-claude --claude-model claude-3-5-haiku-latest --claude-max-calls 2

Useful flags

  • --queries "the,and,that,this,with" sample terms used for public search
  • --window 60 minutes of data to include
  • --limit 30 posts per query term
  • --max-posts 180 total deduped posts cap
  • --uncertain-cutoff 1 local score threshold to escalate
  • --claude-batch-size 20 posts per Claude call
  • --claude-max-calls 3 max Claude calls per run

Notes

  • This script uses Bluesky public search API as a lightweight approximation of "current mood".
  • It is intentionally small and cheap, not a production firehose analytics pipeline.

Test

go test ./...

About

Bluesky sentiment

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages