Quickstart
Install
Section titled “Install”go install github.com/rnwolfe/knit/cmd/knit@latest # best for agentsbrew install rnwolfe/tap/knit # best for humansOr download a signed binary from Releases (linux · macOS · windows, amd64 · arm64).
Authenticate
Section titled “Authenticate”You need a Threads access token. If you don’t have one yet, follow Get a Threads token first.
printf '%s' "$THREADS_TOKEN" | knit auth login --token-stdin # headless; token never on argvknit auth status --json # account · expiry · publish quotaFirst reads
Section titled “First reads”knit profile get me --jsonknit post list --json | jq '.data[] | {id, text}'knit search posts "ai agents" --json | jq -r '.scope' # "public" or "self"Every read returns a stable envelope:
{ "schemaVersion": 1, "data": [ /* ... */ ], "nextCursor": "…" }--limit N bounds the list; --select id,text projects fields; pass nextCursor back via
--cursor to page.
Publish (gated)
Section titled “Publish (gated)”Publishing is blocked unless you opt in. Preview first, then apply:
knit post create --text "hello from knit" --dry-run # plan + hash, nothing postedknit post create --text "hello from knit" --allow-mutationsVerify your setup
Section titled “Verify your setup”knit doctor --for-agent --jsonNext: the command reference or why knit is agent-safe.