Typefully Metrics CLI
术-操作 · 术层 skill 全文
本页是 <code>rules/skills/typefully_metrics.md</code> 的逐字投影(仅隐私清洗,零改写)。
时点提示:本页是仓内文件 rules/skills/typefully_metrics.md 的逐字投影(仅做隐私清洗:仓库根绝对路径→相对路径、家目录→~/;除此零改写)。若源文件后续有修订,以仓内真源为准。
Typefully Metrics CLI
Private CLI for querying Typefully accounts-v2 and growth metrics APIs.
Setup
Add these keys to your workspace .env (do not commit real values):
TYPEFULLY_AUTHORIZATION=<jwt_token>
TYPEFULLY_ACCOUNT=<account_id>
TYPEFULLY_SESSION=<session_uuid>
TYPEFULLY_COOKIE=<cookie_header_optional>
# Optional
TYPEFULLY_BASE_URL=https://typefully.com
TYPEFULLY_TIMEOUT=30
TYPEFULLY_USER_AGENT=Mozilla/5.0
TYPEFULLY_REFERER=https://typefully.com/growTYPEFULLY_COOKIE is optional. Keep it if the endpoint requires it for your account.
Commands
Run from repo root:
python tools/typefully_metrics.py accountspython tools/typefully_metrics.py --env-file /absolute/path/to/.env accountspython tools/typefully_metrics.py metric impressions --start-date 2026-02-20 --end-date 2026-03-05python tools/typefully_metrics.py snapshot --start-date 2026-02-20 --end-date 2026-03-05 --output /tmp/typefully_snapshot.jsonIf --start-date/--end-date are omitted, defaults to the last 14 days.
Metric Names
published_tweetsimpressionsprofile_clicksfollowersengagementsengagement_rateengagement_heatmap
Notes
- Credentials are read from
.envby walking upward from the current working directory. - You can override env path with
--env-fileorTYPEFULLY_ENV_FILE. - Errors include HTTP status and response body for quick debugging.
snapshotfetches all metrics and prints or saves one JSON payload.
Analysis Constraint
When using these metrics for engagement analysis, explicitly treat thread replies as a separate category. published_tweets-count may include replies inside threads, so do not interpret it as "top-level tweet count" unless you apply a thread-reply exclusion step in downstream analysis.