v0.1.0
The first th release.
The first release of th, a command line for Threads.
th reads threads.com anonymously, as a web crawler, with no login and no
browser. It fetches the server-rendered page behind a profile or post, parses
the embedded JSON into typed records, and prints them in whatever format you
ask for.
Commands
profileresolves a profile to a full record, and walks its posts (--posts) or replies (--replies).postfetches a single post in full, streams its reply thread (--replies), or prints the upstream HTML (--raw).repliesstreams a post's replies as their own records.feedwalks a profile's most-recent posts.searchruns a logged-out keyword search.idclassifies any handle, id, shortcode, or URL offline, rewriting threads.net links to their canonical threads.com form.db build/db querycrawl a profile into a local SQLite dataset and query it. The store is pure Go, so the binary stays cgo-free.whoami,config,cache,completion, andversionround out the tree.
How it reads
Every record is a plain struct with JSON tags, rendered through one formatter:
table on a terminal, JSON Lines when piped, plus json, csv, tsv, yaml,
and url. Narrow columns with --fields or template each row with --template.
Responses are cached on disk by URL, and requests are paced and retried.
Private or walled content exits 4; the logged-out GraphQL paths that ride on
rotating query ids exit 3 when an id goes stale, while the server-rendered
surface keeps working. Optional token and session modes add depth on your own
account, off by default.
Install
go install github.com/tamnd/threads-cli/cmd/th@latest
Or download a prebuilt binary from the release page, or run the container image
ghcr.io/tamnd/th:0.1.0.