← Back to AI Insights
Gemini Executive Synthesis

Authentication persistence and session management for `opencli` when interacting with web services like WeRead.

Technical Positioning
Providing seamless, authenticated CLI access to web services for both human users and AI agents. The goal is a "universal CLI Hub" where tools are discovered and executed seamlessly.
SaaS Insight & Market Implications
This bug indicates a critical failure in session management for `opencli`'s WeRead adapter. Despite a user being logged in, the CLI reports authentication expiry or "Not logged in" for specific commands. This undermines the core value proposition of `opencli` as a "universal CLI Hub" designed for seamless interaction with web services. The inability to maintain authenticated sessions forces manual re-login, disrupting workflow for both human users and AI agents. Market implication: reliable, persistent authentication is non-negotiable for any tool aiming to abstract web interactions into a CLI. Inconsistent session handling creates friction, reduces agent autonomy, and erodes trust in the platform's ability to provide a unified, dependable interface to external services.
Proprietary Technical Taxonomy
WeRead private API auth expired cached shelf data detail commands re-login opencli version Node.js Version Operating System

Raw Developer Origin & Technical Request

Source Icon GitHub Issue Mar 30, 2026
Repo: jackwener/opencli
[Bug]: WeRead 登录后仍显示WeRead private API auth expired

### Description

opencli weread shelf

⚠ WeRead private API auth expired; showing cached shelf data from localStorage. Results may be stale, and detail commands may still require re-login.

weread/shelf
┌──────────────┬────────┬──────────┬───────────────────┐
│ Title │ Author │ Progress │ BookId │
├──────────────┼────────┼──────────┼───────────────────┤
│ 方伟看10年 │ 公众号 │ - │ MP_WXS_3634777637 │
├──────────────┼────────┼──────────┼───────────────────┤
│ 卓哥投研笔记 │ 公众号 │ - │ MP_WXS_3943649596 │
├──────────────┼────────┼──────────┼───────────────────┤
│ 36氪 │ 公众号 │ - │ MP_WXS_3264997043 │
├──────────────┼────────┼──────────┼───────────────────┤
│ 见实 │ 公众号 │ - │ MP_WXS_3575594744 │
└──────────────┴────────┴──────────┴───────────────────┘
4 items · 2.8s · weread/shelf

opencli weread book MP_WXS_3634777637
🔒 Not logged in to WeRead
→ Please log in to weread.qq.com in Chrome first

查看具体文章说没有登录

### Steps to Reproduce

1. Run `opencli ...`
2. ...
3. See error

### Expected Behavior

不报错

### OpenCLI Version

1.5.6

### Node.js Version

22.x

### Operating System

macOS

### Logs / Screenshots

```shell

```

Developer Debate & Comments

Astro-Han • Mar 30, 2026
收到 bug 反馈,我先尝试复现。
Astro-Han • Mar 30, 2026
继续排查后,结论更新一下: 目前看,这个问题主要集中在 `MP_WXS_*` 这类公众号条目,不像是单纯的登录失效。 现在 `weread shelf` 还能显示,是因为私有 API 失效后会回退到网页本地缓存;但 `weread book` 打开详情时走的是另一套更严格的兜底逻辑。 我这边进一步验证后发现,普通书籍在同样的状态下是可以正常打开详情的,所以范围已经基本缩小到这类公众号条目的兼容问题。也就是说,当前版本里,公众号类型书籍很可能还不能像普通书那样稳定访问详情,这更像是 opencli 的适配缺口,不是你本地没有登录。 这个方向看起来是可以继续修的。如果你方便的话,也欢迎帮忙再确认一下:书架里如果挑一个普通数字 `bookId` 的书,运行 `opencli weread book ` 是否能成功;如果普通书可以、`MP_WXS_*` 不行,就能进一步坐实这个判断。
haoyan-yam • Mar 30, 2026
> 继续排查后,结论更新一下: > > 目前看,这个问题主要集中在 `MP_WXS_*` 这类公众号条目,不像是单纯的登录失效。 > > 现在 `weread shelf` 还能显示,是因为私有 API 失效后会回退到网页本地缓存;但 `weread book` 打开详情时走的是另一套更严格的兜底逻辑。 > > 我这边进一步验证后发现,普通书籍在同样的状态下是可以正常打开详情的,所以范围已经基本缩小到这类公众号条目的兼容问题。也就是说,当前版本里,公众号类型书籍很可能还不能像普通书那样稳定访问详情,这更像是 opencli 的适配缺口,不是你本地没有登录。 > > 这个方向看起来是可以继续修的。如果你方便的话,也欢迎帮忙再确认一下:书架里如果挑一个普通数字 `bookId` 的书,运行 `opencli weread book ` 是否能成功;如果普通书可以、`MP_WXS_*` 不行,就能进一步坐实这个判断。 普通的 book 还是一样显示没有登录,不是公众号的问题:
Astro-Han • Mar 30, 2026
@haoyan-yam 这张截图很关键,说明问题不只是 `MP_WXS_*` 公众号条目,普通书 `22920382` 也一样失败。 当前问题更像是:`weread shelf` 还能通过网页缓存列出书架,但 `weread book` 在私有 API 失效后的详情回退链路,而不只是某一种书籍类型。 如果你方便,麻烦帮我补这几条完整输出: 1. `opencli weread book 22920382 -f json -v` 2. `opencli weread book MP_WXS_3634777637 -f json -v` 3. `opencli weread shelf --limit 10 -f json` 有了这几条,我就能判断问题到底是卡在: - 私有 API 认证 - 书架缓存到 reader URL 的映射 - 还是 reader 页面本身的详情提取
haoyan-yam • Mar 31, 2026
> [@haoyan-yam](https://github.com/haoyan-yam) 这张截图很关键,说明问题不只是 `MP_WXS_*` 公众号条目,普通书 `22920382` 也一样失败。 > > 当前问题更像是:`weread shelf` 还能通过网页缓存列出书架,但 `weread book` 在私有 API 失效后的详情回退链路,而不只是某一种书籍类型。 > > 如果你方便,麻烦帮我补这几条完整输出: > > 1. `opencli weread book 22920382 -f json -v` > 2. `opencli weread book MP_WXS_3634777637 -f json -v` > 3. `opencli weread shelf --limit 10 -f json` > > 有了这几条,我就能判断问题到底是卡在: > > * 私有 API 认证 > * 书架缓存到 reader URL 的映射 > * 还是 reader 页面本身的详情提取

Adjacent Repository Pain Points

Other highly discussed features and pain points extracted from jackwener/opencli.

Extracted Positioning
Browser extension conflict preventing `chrome.debugger.attach()` in OpenCLI
Reliable browser automation and web interaction via CLI
Top Replies
haoyueb2 • Mar 22, 2026
macos也有一样的错
Astro-Han • Mar 22, 2026
**根因分析** 当用户安装了"新标签页覆盖"类扩展(如 iTab、Momentum 等)时,Chrome 会把新窗口的 `about:blank` 替换为 `chrome-extension://` 页面。 问题出在 `extension/src/background.ts` 的 `resolveTabI...
jackwener • Mar 22, 2026
记得更新浏览器插件和版本
Extracted Positioning
Inconsistent authentication handling for `opencli`'s Zhihu adapter, specifically for the `question` command.
Ensuring consistent and reliable authenticated access to web services via a unified CLI, enabling AI agents to discover, learn, and execute tools seamlessly.
Top Replies
Astro-Han • Mar 30, 2026
Checked the current repo state and the suggested root cause here looks outdated. `zhihu question` does **not** rely only on `src/clis/zhihu/question.ts` for domain navigation anymore. Since commit ...
Gogoworks • Mar 30, 2026
Thanks for the thorough review @Astro-Han. You're right — my root cause analysis was incorrect. After further testing, the real issue is that the **Browser Bridge extension intermittently disconnec...
Gogoworks • Mar 30, 2026
Update: After the daemon restarted, I can confirm the issue is specific to `zhihu question`, NOT a general bridge connectivity problem. - `opencli bilibili hot` ✅ works - `opencli zhihu search "te...
Extracted Positioning
Native support for VK (VKontakte) as a built-in OpenCLI command
Universal CLI Hub capable of bypassing anti-bot protections for major web services
Top Replies
flobo3 • Mar 23, 2026
Just to add some context and numbers to back this up: - According to recent stats, VK is the absolute leader in content publications in Russia: https://www.statista.com/statistics/284447/social-med...
Astro-Han • Mar 24, 2026
+1 on this. VK's reliance on dynamic CSRF tokens and internal AJAX endpoints (`al_wall.php`) is a strong fit for opencli's browser session approach — exactly the kind of site where traditional scra...
flobo3 • Mar 24, 2026
Hey @jackwener and @Astro-Han! Thanks for the tips on using `opencli record`. It turned out VK uses a JSON Hijacking protection (prepends `
Extracted Positioning
Monorepo support for OpenCLI plugin installation and discovery
Enterprise-grade tool integration for internal automation teams and AI agents
Extracted Positioning
Feature request for a Baidu Tieba adapter for `opencli`.
Expanding `opencli`'s reach to major Chinese community platforms, enhancing its claim as a "universal CLI Hub" for AI agents to discover and execute tools across diverse web services.

Engagement Signals

4
Replies
open
Issue Status

Cross-Market Term Frequency

Quantifies the cross-market adoption of foundational terms like WeRead private API auth expired and cached shelf data by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.