v0.1.1
Error-path and field-naming fixes from a full command audit.
A pass over every command, run live against threads.com, turned up four rough edges. This release fixes them.
A missing profile no longer returns fake data
Asking for a handle that has no public profile used to return a record built
from the logged-out page's generic "Join Threads" description, with no id and a
placeholder bio, and exit 0. A real profile page always embeds the user
object, the only place the numeric id appears, so a page without one is the wall,
not a profile. th profile now reports not found (exit 3) in that case.
--fields and --template share one field vocabulary
Before, --template only accepted the Go field names ({{.LikeCount}}), while
--fields and the table header used the short column aliases (likes). You can
now name a field three ways in either flag:
- the column alias, like
likes - the JSON key, like
like_count - the Go field name, like
LikeCount
This also lets --fields pull a field that has no column alias, such as
user_id or quote_count.
Misuse exits 2
A wrong argument count, an unknown flag, and an unknown command now all exit 2,
matching the documented exit-code table, instead of the generic 1.
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.1.