Skip to main content

THTH

THTH は、自分の SNS アカウントで調べる・投稿する・予約する・振り返るためのコマンドラインツールです(Threads・Bluesky・Mastodon・X)。

CLI なので、Claude Code などの AI アシスタントがそのまま操作できます。同梱の MCP サーバーとスキルは、その操作を楽にするための補助です。THTH は何を書くかを決めません。頼まれたときだけ動きます。

English: README.en.md · サイト: https://thth.me · 文書の索引: docs/README.md

できること

Threads Bluesky Mastodon X
投稿・予約 ○ ○ ○ ○
削除 ○ ○ ○ ○
返信とインサイト(表示・いいね・返信などの数)の取得 ○ ○ ○ 数だけ(3.16.0・THTH から出した投稿)
キーワード検索(thth topics --search・thth where) ○ ○ ○ -
言及(thth mentions) ○ ○ ○ -
プロフィールと場所の検索 ○ - - -
  • 調べる: thth topics <アカウント> --search <語> で、その語の件数・投稿者の数・最新の投稿を見ます。thth where は「次にどこで話すか」を、自分がすでに絡んだ相手を重ねて探します。X の行には投稿者のフォロワー数(「フォロワー 1.2 万」)と投稿数も付きます(--json は author_followers・author_posts。保存しません)。
  • 出す: thth send で今すぐ、thth schedule で予約、--reply-to で返信です。
  • 予約も --production で(3.24.0): thth.me の鍵の道の thth schedule は、--production が無ければ下書きを置いて lint だけにします(send と同じ)。過去の時刻の予約はサーバも断ります(リリースノート 3.24.0)。
  • 出来事と数の要約(3.23.0): thth events <口座|project> --after <next_cursor> --json で出来事(公開・返信・言及・止まり・予算)を取りこぼさず読み直し、thth summary で数を 1 つにまとめます。observe --json は sections_by_name で節を名前で引けます(リリースノート 3.23.0)。
  • 本文は全文で(3.21.0): 検索(topics --search・where)・thread・mentions は他人の投稿の本文を切らずに画面と --json に出します(保存はしません)。Threads の検索は --since・--until・--media で絞れます。thth.me の鍵でも thread・where・who が使えます。VM で打つ thth send にも安全装置(間隔・1 日の上限・連投)が掛かります(リリースノート 3.21.0)。
  • 振り返る: thth collect が投稿後 1 時間〜30 日の決まった時点で返信とインサイトを取得し、thth replies・thth measured で読みます。
  • 再投稿といいね: thth repost・unrepost・like・unlike(3.15.0 から)。Threads は再投稿だけ(Threads の API にいいねが無い)。Bluesky は両方。Mastodon と X のいいねは、そのアカウントを認可し直してから(リリースノート 3.15.0)。
  • 検索の語ごとの数を残す・絞る(3.18.0): thth where … --also|--aggregate --keep で語ごとの数だけを日付つきで残し(5 未満は欠測・本文や名前は残さない)、thth where-log <project> [--budget N --medium x] で当たり率と翌日の配り直しを見ます。--ja・--question・--no-replies で表示を絞ります(X の --ja は検索に lang:ja を足して読む本数を減らす)(リリースノート 3.18.0)。
  • X の非公開リスト: thth list create|add|remove|show(3.17.0 から・X だけ)。公開のリストは作らない。足す・外すは人が選んだ少数だけ(1 回 10 人まで)。アカウントを認可し直してから(リリースノート 3.17.0)。
  • X のコミュニティ: thth community search <account> <語…> で探し、thth send <account> --community <id> か queue の front-matter community_id: で出す(3.19.0 から・X だけ)。参加は X の画面で先に(API に参加の口は無い)。返信とは同時に使えない。各コミュニティの規則は人が読んで守る(リリースノート 3.19.0)。
  • X のトレンドと語ごとの投稿数: thth trends <account> [--woeid N] [--max N](既定は日本)と thth counts <account> <語> [--granularity hour|day](直近 7 日)(3.19.0 から・X だけ・1 回の有償の読み取り・保存しない)。

はじめ方

招待された人

運営(gotoq)から届いた招待リンクを開き、Threads で認可します。そのあとターミナルで次を打ちます。

pip install thth
thth login

ブラウザが開くので、アカウント名とアカウントのシークレットを入れて許可します。以後は自分のアカウントにそのまま使えます。

thth posts <アカウント>
thth topics <アカウント> --search コーヒー
thth send <アカウント> --text "こんにちは"

サーバーも Meta アプリも git も要りません。手順の全体は 招待されたら にあります。

自分の機械で運用する人(運営者)

アカウントの台帳を自分の機械に置き、下書きのファイルを承認してから timer で出す運用もできます。承認は 2 段(本文と digest を見せる → その digest で確定)で、記録は git に残ります。準備は 統一ガイド、日々の使い方は プロジェクトのセッション向け にあります。

AI アシスタントから使う

claude mcp add thth -- thth-mcp

MCP の道具は CLI の写しで、同じ thth コマンドを呼ぶだけです。スキル(skills/thth/)は「投稿する前に何を見るか」「返信をどう扱うか」をアシスタントに教えます。キーはアシスタントに渡しません。thth login が手元に置いたキーを thth コマンドが使います。

ガード

アシスタントが誤って走っても、アカウントごとのガードで止まります。

ガード 既定
投稿の最短間隔(返信には掛けない) 6 時間
1 日の投稿 8 件
1 日の削除 5 件
急な連投 10 分に 3 件を超えたらアカウントを止める
夜間 22:00〜07:00 は今すぐの投稿をしない

アシスタントが変えられるのは、厳しくする向きだけです。緩める・止まったアカウントを戻す・キーを発行し直すのは、オーナーが https://thth.me/activity でアカウントのシークレットを使って行います。

保存しないもの

  • 検索結果(topics --search・where・thread・who)の本文と投稿者は、その場で見せるだけで保存しません。where … --keep のときだけ、語ごとの数(件数・問いの形・分類・also の当たり)を日付つきで project の私有の置き場に残します(5 未満は欠測・thth where-log で読む・3.18.0)。
  • ダイレクトメッセージは読みません。
  • トークンとシークレットは、ログと出力から伏せます。

詳しくは プライバシーポリシー にあります。

コマンドの一覧

thth --help で各コマンドの説明が出ます。

動くもの(thth --help の全サブコマンド): lint・preview・approve・account・revoke・posts・replies・measured・threads・after・analytics-report・study-report・study・unanswered・handoff-report・observe・morning・events・summary・serve-reports・worker・topics・forms・queue・schedule・throw・run・systemd・board・collect・pull・auth・refresh・maintain・send・doctor・app・token・ask・mentions・profile・thread・where・where-log・who・retract・repost・unrepost・like・unlike・list・community・trends・counts・inflight・location・notifications・report・plaza・map・admin・login・logout。

版と配布

  • 版の正本は thth/VERSION です。手元の版は thth --version で確かめます。
  • main への push は保存だけです。release を進めると運営のサーバーに出て、版の tag を push すると PyPI と MCP registry に出ます。
  • 依存は 0 です。入口は thth と thth-mcp の 2 つです。
  • AI エージェント向けの試用の記録: headlesson の THTH のページ(THTH と同じ運営)。3.15.0 の導入と --help を 2026-10-11 に確かめた記録で、投稿と予約は試していません。

ライセンス

MIT。

MCP registry

registry は「この PyPI の名前を名乗ってよいのは誰か」を、配布物の README にある次の 1 行で確かめます。消さないでください。

mcp-name: io.github.aokings/thth

Metadata

Release files for thth 3.24.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thth 3.24.0
File Size Uploaded Provenance
thth-3.24.0.tar.gz 2.4 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for thth 3.24.0
File Interpreter ABI Platform
thth-3.24.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.7 MB

Release files / thth-3.24.0.tar.gz

Download URL thth-3.24.0.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
7a3bf0ebeebec24e925b5ebfb91f0a9e7dcbd63efc290290f63d8af08e0a38f0
BLAKE2b-256 checksum
How to use checksums
4006373c4995541c50d4660031d23439be911e79768e92ad2e9865eab3c915d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / thth-3.24.0-py3-none-any.whl

Download URL thth-3.24.0-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
292f506fa824999ba40133cdfa4250f65512f333fecfc33c0c4e0d3214a12df6
BLAKE2b-256 checksum
How to use checksums
8452e5b2b426ea7c8a0aaa59ce479b326f4e4393e4a552d6a8a49109ed178138
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Security for thth 3.24.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for thth-3.24.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.24.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page