threads
Threads CLI
Purpose
Read and manage authenticated Threads data using the threads-cli companion
CLI. Reads, dear-algo-whisper, and approved publish-post invocations are
available wherever the Threads skill is supported.
Use the separate threads_messages skill for Threads inboxes and message threads.
Account Linking
Before running any other command, verify the user's Threads account is connected by running threads-cli accounts. If the command returns account info (one or more accounts with id), the account is connected — proceed normally. Cache this result for the rest of the conversation; do not re-run the check before every command. If any subsequent command fails with an auth or account error, re-run threads-cli accounts to recheck account linking status.
If the command fails or returns an empty result indicating no account is linked, the account is not connected. Get the connect URL by running threads-cli connect-url (it outputs JSON with a connect_url field), then tell the user, substituting that URL:
Your Threads account is not connected. To connect it, visit Meta Accounts Center and link your Threads account.
If the user asks to disconnect their Threads account, run threads-cli disconnect-url (it outputs JSON with a disconnect_url field) and direct them to that URL: