Skip to content

nitter-cli v0.7.0

Choose a tag to compare

@github-actions github-actions released this 22 Sep 16:33
· 164 commits to main since this release
f9a79b5

v0.7.0 — 2026-09-23

FxTwitter fast lane, discovery-oriented commands, and the fixes found while testing them against a self-hosted Nitter instance.

Added

  • FxTwitter API v2 hybrid fetch engine: fetch_backend setting (mix default, nitter, fx; NITTER_FETCH_BACKEND env override). Timelines and searches try the credential-free Fx fast lane first and fall back to Nitter instances on network error, 429, or SafeSearch 404. Thirteen scalar config keys now.
  • Following list command (nitter following): fetch the account profiles followed by any handle (human table on a TTY, NDJSON kind: "profile" in pipe mode).
  • Comments and conversation tree command (nitter comments): fetch the thread context and user replies for a status (sorted by likes or recency) — the fastest route to an author's self-replies with hidden links, or to a serialized thread.
  • Curated creator circles (nitter circle): manage and stream private rosters in ~/.nitter-cli/circles.toml (list, show, add, run), distinct from resident watch polling.
  • nitter circle suggest: read-only candidate discovery that merges a handle's following list (static) with the authors of the retweets in its timeline (behavioral), ranking candidates by co-occurrence then follower count; human output is a stats header, a ranked table (@handle\tfollowers\tbio\tsource) and a --min-followers-filtered top matches summary, with --json for {handle, followers_count, bio, source} arrays. --limit caps each lane and must be ≥ 1 (0 is a usage error, since the two lanes give 0 opposite, useless meanings); a missing seed exits 1, a single lane failure degrades with a stderr warning, and suggest never writes the circle file.
  • nitter circle run --media-type: keep only tweets carrying at least one media entry of the given type (image|video|gif) when traversing a circle — flag parity with the user command; an invalid value is a usage error (exit 2) before any network.
  • nitter circle show --min-followers: filter circle members by follower count (--min-followers N keeps only members with ≥ N followers, printing @<handle>\t<followers> per row, or JSON {handle, followers_count} objects with --json); a failed member profile is skipped with a stderr warning while others continue, all failing exits 1, and a negative N is a usage error (exit 2) before any network.
  • nitter user --with-replies: include the user's reply tweets in the timeline.
  • Trends command (nitter trends): fetch real-time trending topics with ranks, names, contexts, and tweet counts (formatted table on a TTY, kind: "trend" NDJSON in pipe mode).
  • Quote tweets command (nitter quotes): fetch quote tweets and derivative creations for a status (supports --media-only and --no-reposts, emitting kind: "tweet" NDJSON in pipe mode).
  • Profile card command (nitter profile): fetch a creator's profile card with bio, counts, and media URLs (kind: "profile" NDJSON in pipe mode).
  • User search (nitter search --type user): search creators, artists, and profiles by keywords or bio.
  • Fast-lane dispatch for nitter get: get connects through FxTwitter first in mix and fx modes, falling back to Nitter instances.
  • SDK model expansions: added Profile, Conversation and Trend models and the KindTrend protocol constant to sdk.
  • Documentation and agent infrastructure: bilingual CONTRIBUTING guides, a pull request template, agent collaboration rules under docs/maintainers/agents/, and repository-local workflow skills under .agents/skills/ (PR, CI, review, docs, commit-message, release-notes).

Changed

  • circle run deterministic results and filter provenance: Fx fast-lane results are sorted by tweet ID descending before --limit truncates (same input, same output — upstream page-composition fluctuations no longer change the result set); NDJSON envelopes carry meta.filter ("media_only" or the media-type value) when a media filter is in effect; snapshot semantics and the doubled media-endpoint pagination under --media-only are documented in the help text and CLI reference.
  • --instance explicitly forces Nitter; List subscriptions remain strictly isolated to Nitter.

Deprecated

Removed

  • vx and syndication media strategies: removed from the media/download resolve chain (both verified dead on two environments — vx always 403 challenge_required, syndication empty/not_found). --strategy auto is now fx → nitter → xdown; explicit vx/syndication are usage errors (exit 2).

Fixed

  • watch silently fetched nothing under the fx backend: the user/tag/list source fetches passed limit 0 (= all) and the Fx fast lane treats count <= 0 as ZERO tweets with a nil error — every cycle recorded an empty baseline (seen=0) and emitted nothing. Source fetches now send a positive all-tweets sentinel (nitter semantics unchanged; the Fx client's eager allocation is clamped so an unbounded count no longer reserves gigabytes).
  • Nitter user-less refs 404ed (get, and media/download with --strategy nitter): a bare numeric status ID resolves to a user-less reference, and the instance was asked for its /status/<id> route — the deployed Nitter answers 404 there, so those runs failed with not_found (the auto chain reported all media strategies failed). User-less refs now use /i/status/<id>, the same route StatusRef.String renders and the one Nitter actually serves.
  • Nitter-strategy downloads got a polluted file extension: the nitter media link wraps the real twimg URL inside its own path (/video/<token>/<percent-encoded URL>); url.Parse decodes that path, so the inner URL's query (?tag=29) landed in it and the extension came out as .mp4?tag=29 — files landed as <id>-1.mp4_tag=29. The path is now cut at the first ?/# and only a plausible extension (1–8 alphanumerics) is accepted, otherwise the Content-Type decides.
  • fxtwitter 404 with empty results: quotes and user search now yield an empty slice instead of a failure when the endpoint answers 404 with no results.

Security

v0.7.0 — 2026-09-23

FxTwitter 快车道、面向发现的命令族,以及在自建 Nitter 实例实测中修复的问题。

新增

  • FxTwitter API v2 混合抓取引擎:fetch_backend 策略(mix 默认 / nitter / fx,支持环境变量 NITTER_FETCH_BACKEND)。时间线与搜索默认优先走 Fx 免登快车道,遇网络异常、429 或 SafeSearch 404 平滑回退自建 Nitter 实例。标量配置键扩充为 13 个。
  • 博主关注列表命令(nitter following):拉取任意博主的关注账号画像(TTY 为人类表格,管道模式输出 kind: "profile" NDJSON 信封)。
  • 推文评论区与对话链命令(nitter comments):拉取某条推文的上下文 thread 与评论区(支持按 likes 或 recency 排序)——提取博主自评隐藏链接、追更连环长推的最快路径。
  • 私人精选圈子(nitter circle):在 ~/.nitter-cli/circles.toml 维护并流式拉取私人花名册(list、show、add、run),与常驻调度型的 watch 各司其职。
  • nitter circle suggest:只读的圈子候选发现,聚合某博主的关注列表(静态)与时间线中被转推的原作者(行为),按同现次数、再按粉丝数排序;人类输出为统计行、排序主表(@handle\t粉丝数\tbio\t来源)与 --min-followers 筛选后的 top matches 小结,--json 输出 {handle, followers_count, bio, source} 数组。--limit 限制每路取数且必须 ≥ 1(0 为用法错误,因两路对 0 的语义相反且无用);种子不存在退出 1,单路失败 stderr 警告降级,suggest 从不写圈子文件。
  • nitter circle run --media-type:遍历圈子时按媒体类型过滤(image|video|gif,只保留携带至少一个该类型 media 的推文)——与 user 命令的 flag 对齐;非法值为用法错误(退出 2),先于任何网络。
  • nitter circle show --min-followers:按粉丝数筛选圈子成员(--min-followers N 只显示粉丝数 ≥ N 的成员,每行输出 @<handle>\t<粉丝数>,与 --json 组合时输出 {handle, followers_count} 对象数组);单个成员 profile 拉取失败不硬失败——stderr warning 并跳过,全部失败退出 1,N 为负数是用法错误(退出 2),先于任何网络。
  • nitter user --with-replies:支持在时间线中包含用户自身发布的回复推文。
  • 实时热搜趋势命令(nitter trends):获取实时热门话题榜单(含排名、话题名、上下文分类与发推数;TTY 格式化表格,管道模式输出 kind: "trend" NDJSON 信封)。
  • 推文引用挖掘命令(nitter quotes):挖掘单条推文的二次创作与带图引用(支持 --media-only、--no-reposts 过滤,管道模式输出 kind: "tweet" NDJSON 信封)。
  • 博主名片卡命令(nitter profile):获取博主完整个人主页资料卡(含 Handle、名称、Bio、关注/粉丝/推文/媒体计数及头像横幅直链;管道输出 kind: "profile" NDJSON 信封)。
  • 推主与创作者搜索(nitter search --type user):支持通过 --type user 按关键词或 bio 搜索推主、画师及创作者账号画像。
  • 单推抓取(nitter get)接入 Fx 快道:在 mix 与 fx 模式下优先走 FxTwitter 极速通道,遇故障平滑回退 Nitter 实例。
  • SDK 模型扩充:sdk 包新增 Profile、Conversation、Trend 标准模型与 KindTrend 协议常量。
  • 文档与 agent 基建:双语 CONTRIBUTING 贡献指南、Pull Request 模板、docs/maintainers/agents/ 下的协作细则,以及 .agents/skills/ 下的仓库本地流程 skill(PR、CI、review、docs、commit-message、release-notes)。

变更

  • circle run 确定性结果与过滤溯源:Fx 快车道结果按推文 ID 降序排序后再按 --limit 截断(同输入同输出——上游翻页组成波动不再改变结果集);媒体过滤生效时 NDJSON 信封携带 meta.filter("media_only" 或媒体类型值);快照语义与 --media-only 下媒体端点翻页加深的补偿行为已写入帮助文本与 CLI 参考。
  • 指定 --instance 时自动强制走 Nitter 实例,List 订阅严格物理隔离锁定自建 Nitter。

弃用

移除

  • vx 与 syndication 媒体策略:从 media/download 解析链中移除(双环境实测均不可用——vx 恒 403 challenge_required,syndication empty/not_found)。--strategy auto 链路改为 fx → nitter → xdown;显式指定 vx/syndication 为用法错误(退出 2)。

修复

  • watch 在 fx 后端下静默拉到 0 条:user/tag/list 源取数传 limit 0(意为 all),而 Fx 快车道把 count <= 0 当成 0 条且不报错——每个 cycle 都静默记成空基线(seen=0)、不发推。源取数改为发送正数的 all 哨兵值(nitter 后端语义不变;Fx 客户端的提前分配已钳制,无界 count 不再预留 GB 级内存)。
  • Nitter 无 user 段的引用 404(get,以及 media/download 的 --strategy nitter):裸数字状态 ID 解析为无 user 段的引用,而实例被请求的是 /status/<id> 路由——部署的 Nitter 对该路由返回 404,导致这些运行以 not_found 失败(auto 链报 all media strategies failed)。无 user 段引用现改用 /i/status/<id>,与 StatusRef.String 渲染的路由一致,也是 Nitter 实际提供的路由。
  • Nitter 策略下载的文件名扩展名被污染:nitter 媒体链接把真实 twimg URL 包裹在自身路径里(/video/<token>/<percent-encoded URL>);url.Parse 会解码该路径,内层 URL 的查询(?tag=29)因此落入其中,扩展名被算成 .mp4?tag=29——文件落盘为 <id>-1.mp4_tag=29。现改为在首个 ?/# 处截断路径,且只接受形如 1–8 个字母数字的合理扩展名,否则由 Content-Type 决定。
  • fxtwitter 404 且结果为空:quotes 与用户搜索在这类响应下改为返回空切片,而不是报错。

安全

Full Changelog: v0.6.1...v0.7.0