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 で返信です。
  • ブックマークの連投は記事と別に数える(4.0.1): はてなブックマークは主体の別の窓(既定 10 分に 10 件)で数え、超えても主体を止めずにその 1 件だけ断ります。1 日 30 件・同じホストへ 1 日 3 件(自分の記事は 1 日 1 件のまま)。記事の連投で止める作りは変わりません(リリースノート 4.0.1)。
  • 返信はまとめて出す(4.3.0): 時刻の過ぎた返信は承認したその場で、timer では 1 回でまとめて出します(返信の窓は返信だけで 10 分に 10 件・投稿の窓に数えない・投稿の間隔を掛けない)。使い方は「publish_at を今か過去にしてまとめて承認する」だけです(リリースノート 4.3.0)。
  • 1 件の断りでまとめを止めない(4.2.2): はてなに 1 件だけ断られた札は token を確かめてその札だけ外し、まとめを進めます。断られそうな札(半角の「%」・タグとコメントの長いもの)は 1 段目と lint で予告します(断りません)。止まったまとめは 60 分ごとにしか打たず、thth bookmark batch-resume で今すぐ見直せます。sparse-checkout の定義の外には記録を書かず、直し方を言います(リリースノート 4.2.2)。
  • ブックマークの直しとタグの長さの柵(4.2.0): thth bookmark edit で THTH が付けたブックマークのコメントとタグを 2 段の承認で直す。31 バイトを超えるタグは予告して断る。上限の設定は台帳の limits と別名で書け、断りに根拠と通し方が付きます(リリースノート 4.2.0)。
  • ブックマークを 1 日分まとめて承認する(4.1.0): 札を JSON Lines に並べ、thth bookmark batch の 1 段目で全件の一覧と digest を見て 2 段目で確定。timer が上限の中で時刻を散らして付けます(口座ごと)。あわせて、上限と連投の柵の土台(媒体の特性の台帳)を入れました(リリースノート 4.1.0)。
  • 記事をはてなへ届けて、直したら反映(4.0.0): repo の記事を承認してはてなブログへ公開・予約し(画像はフォトライフへ)、SNS の告知(announces・{article_url})とはてなブックマークを記事に結びます。記事を直せば thth article diff で差分を見て、承認して更新します。はてなの画面で手直しされていれば上書きせず thth conflict で止まります。反応は thth article reactions で記事ごとに。SNS だけの口座の動きと承認の指紋は変わりません(リリースノート 4.0.0)。
  • 返信の連投は止めずに順番待ち(3.25.0): thth send --reply-to(thth.me の send_request も)が急な連投(burst)を超えるとき、口座を止めずにその 1 件を窓が空く時刻の順番待ちに並べ、timer が出します。止めるのは返信でない投稿の連投だけです(リリースノート 3.25.0)。
  • 予約も --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・deliveries・media・article・conflict・hatena・bookmark・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・principal・fotolife・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 4.3.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 4.3.0
File Size Uploaded Provenance
thth-4.3.0.tar.gz 2.9 MB With provenance Details

Built distribution (wheel)

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

Total release size: 4.5 MB

Release files / thth-4.3.0.tar.gz

Download URL thth-4.3.0.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
8ae19d4b6bc92b827f7e0f84083f925c46ce7657e552c737ff3bb9656c1c683e
BLAKE2b-256 checksum
How to use checksums
6c91c7dea0113421c188e323edd215e9f41384f5626a46346f865632aebbc8e9
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 19, 2026.

Transparency log

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

Download URL thth-4.3.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ee937b87365fcf9fa88910c0e725e90ba40aec24a6293b226a42601d5a8b3d8a
BLAKE2b-256 checksum
How to use checksums
211c0da03f39394c1011d91166814ef86c795494c5e85336df077bb4295f0530
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 19, 2026.

Transparency log

Security for thth 4.3.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-4.3.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 19, 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.

Release history Release notifications | RSS feed

This release

4.3.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