Skip to content
th

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

  • profile resolves a profile to a full record, and walks its posts (--posts) or replies (--replies).
  • post fetches a single post in full, streams its reply thread (--replies), or prints the upstream HTML (--raw).
  • replies streams a post's replies as their own records.
  • feed walks a profile's most-recent posts.
  • search runs a logged-out keyword search.
  • id classifies any handle, id, shortcode, or URL offline, rewriting threads.net links to their canonical threads.com form.
  • db build / db query crawl 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, and version round 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.