bird is for X · knit is for Threads

knit

Knit your agent into Threads — safely.

An agent-friendly CLI for Instagram's Threads, built on the official API. Read-only by default, posting gated in the binary, prompt-injection-fenced, machine-readable.

$ go install github.com/rnwolfe/knit/cmd/knit@latest
Why knit

Plenty of Threads CLIs exist.
None is built for an agent to drive safely.

Read-only by default

Every mutation is blocked unless you pass --allow-mutations — enforced in the binary, returning a structured MUTATION_BLOCKED (exit 12). No "type y" prompt that deadlocks a headless agent.

Reviewed-artifact publishing

post create --dry-run emits the exact plan + a hash; --apply <hash> publishes only that plan. No blind --yes on an irreversible public post.

Prompt-injection-fenced

It's a public feed. Post, reply, search, mention text and bios are wrapped as untrusted data, never instructions — on by default in agent mode.

Machine-readable & official

knit schema dumps the command tree, exit codes, and live safety state; knit agent prints the embedded contract. Built on the official API → low breakage risk.

The surface

Noun-verb, read by default

Nine reads, six gated mutations. Every read returns a stable {schemaVersion, data, nextCursor} envelope — --limit and --select keep it inside an agent's context window.

knit profile get me
knit post list --limit 50
knit post get <id>
knit reply tree <id>
knit search posts "ai"
knit mentions list
knit insights account
knit post create ⊘ gated
knit post delete ⊘ gated
Install & run

On your machine in one line

$ brew install rnwolfe/tap/knit   # macOS / Linux