Skip to content

Repository files navigation

threadterm

CI Release License: MIT

Threads in your terminal. Login like bird — auto from Chrome.

threadterm login          # reads Threads session from your browser
threadterm                # TUI
threadterm feed --json    # agents
threadterm --demo         # try offline first

Not affiliated with Meta. Be logged into threads.com in Chrome/Firefox first. Official Graph API is optional.


Why threadterm

  • Browser-cookie login by default (no Meta developer app required)
  • TUI + scriptable JSON CLI in one tool
  • Search, latest, profile, thread views for automation workflows
  • Themeable terminal UX with keyboard-first navigation

How to use (TUI)

Key Action
j / k move
/ search posts
y copy link/text to clipboard
f / r your following feed
d public discover (not your feed)
enter open thread
c compose
R / L reply / like
a login (cookies / write / demo)
t / T theme picker / cycle
? help
q quit

Mouse select/copy works in the terminal (mouse capture is off). Use y to yank the selected post link.

Login

# 1. Log into https://www.threads.com in Chrome
# 2. Then:
threadterm login

Same UX as bird for Twitter — auto cookie extract, no DevTools.

Details: docs/AUTH.md

Themes

jade · ocean · ember · mono · orchid

threadterm theme ocean

Install

go install github.com/arifaqyl/threadterm/cmd/threadterm@latest

Prebuilt binaries (Windows/macOS/Linux) are published on GitHub Releases.

Windows (from source):

git clone https://github.com/arifaqyl/threadterm.git
cd threadterm
go build -o threadterm.exe ./cmd/threadterm
.\threadterm.exe --demo

CLI (agent-friendly)

threadterm login                 # auto from Chrome/Firefox
threadterm status --json
threadterm feed --json -n 25     # your following feed
threadterm feed --discover       # public sample (opt-in)
threadterm search "LRT KL" --json        # post search (needs Python + Playwright)
threadterm search-users "myrapidkl"      # account search
threadterm latest zuck --json -n 10
threadterm profile mosseri --json
threadterm reply <post-id> "good point"  # reply by id (same as TUI R key)
threadterm whoami --json
threadterm doctor

Automation guide: docs/AGENTS.md

Env: THREADS_SESSIONID, THREADS_CSRFTOKEN, THREADS_DS_USER_ID, THREADS_MID, THREADS_IG_DID, THREADTERM_THEME, THREADTERM_DEMO=1

feed --discover pulls a public sample from seed accounts (Malaysia transit preset). Override with THREADTERM_DISCOVERY_SEEDS="user1,user2", or set THREADTERM_DISCOVERY_SEEDS=none to disable seeding.

Post search uses headless Chromium via Playwright (same approach as TrafficMY):

pip install playwright
playwright install chromium

Architecture

demo          → offline synthetic feed
session       → browser cookies (primary live)
session+write → cookies + Bloks bearer (post/like)
token         → official Graph API (optional)

Powered under the hood by threads-go for the private session surface.


Disclaimer

Respect Meta’s terms. Cookie/private APIs can break. Don’t abuse rate limits. Use your own account.

Security

  • Credentials are stored locally at ~/.threadterm/config.json (file 0600, dir 0700) as plaintext JSON — the same trust model as other CLI cookie tools. Run threadterm logout to clear the session and bearer token.
  • No telemetry, no analytics, no background network calls. The only outbound traffic is to threads.com (and a local Playwright/Chromium instance for post search). threadterm doctor masks tokens; passwords are never logged.
  • Post search/feed via Playwright passes your session cookies to a local Python subprocess over stdin — fine on a single-user desktop, not intended for a shared server.
  • config.Load() fails loudly on a corrupt config file rather than silently ignoring it.
  • Not affiliated with Meta. Cookie/private-API clients can break or hit 2FA/checkpoints; browser-cookie login is the default and password login is a fallback that may be blocked.

License

MIT © Arif Aqyl

About

Threads in your terminal - a Bubble Tea TUI + CLI with cookie login, following feed, search, and copy

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages