浏览器验证

工程开发 社区

技能解读

当前原文的自动摘译,尚未人工审校。

设置

auth login 打开浏览器进行 OAuth 授权。令牌存储在~/.config/newsblur/。对于自托管实例,传递 --server 或设置 NEWSBLUR_SERVER:

只读模式

CLI 具有只读模式,可阻止所有写入操作(保存、共享、训练、订阅、标记为已读)。将 CLI 交给 AI 代理时非常有用。检查当前只读状态:禁用只读会使您退出并需要浏览器重新身份验证。 AI 代理无法默默地关闭此功能。如果您在只读模式下操作,所有写入命令都将失败并出现错误。读取命令工作正常。

输出格式

每个命令都支持以下标志: --json — 结构化 JSON 输出,通过管道传输到 jq --raw — 未格式化的纯文本 默认 — 人类可读的格式化输出

故事

列出所有提要中未读的故事: 按文件夹过滤或限制结果: 在存档中进行全文搜索: 查看已保存/加星标的故事,可以选择按标签过滤: 浏览很少发布的提要中的故事(在繁忙的河流中很容易错过):

每日简报

获取 AI 策划的简报,其中包含热门新闻、不常见的网站精华和长篇文章:

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
工程开发
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
94 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@samuelclay · MIT
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
Python >=3.11
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
网络行为
允许外网请求
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# NewsBlur CLI

The NewsBlur CLI (`newsblur-cli`) gives you full access to your NewsBlur account from the terminal. Install it and authenticate before running any commands.

## Setup

```bash
uv pip install newsblur-cli
newsblur auth login
```

`auth login` opens a browser for OAuth authorization. The token is stored at `~/.config/newsblur/`.

For self-hosted instances, pass `--server` or set `NEWSBLUR_SERVER`:

```bash
newsblur --server https://my-newsblur.example.com auth login
```

## Readonly Mode

The CLI has a readonly mode that blocks all write operations (saving, sharing, training, subscribing, marking as read). Useful when handing the CLI to an AI agent.

```bash
newsblur auth readonly --on
```

Check current readonly status:

```bash
newsblur auth readonly
```

Disabling readonly logs you out and requires browser re-authentication. An AI agent cannot silently toggle this off.

```bash
newsblur auth readonly --off
# "You have been logged out and must re-authenticate."
newsblur auth login
```

If you are operating in readonly mode, all write commands will fail with an error. Read commands work normally.

## Output Formats

Every command supports these flags:

- `--json` — structured JSON output, pipe to `jq`
- `--raw` — unformatted plain text
- Default — human-readable formatted output

## Commands

### Stories

List unread stories across all feeds:

```bash
newsblur stories list
```

Filter by folder or limit results:

```bash
newsblur stories list --folder Tech --limit 5
```

Full-text search across your archive:

```bash
newsblur stories search "machine learning"
```

View saved/starred stories, optionally filtered by tag:

```bash
newsblur stories saved
newsblur stories saved --tag research
```

Browse stories from rarely-publishing feeds (easy to miss in a busy river):

```bash
newsblur stories infrequent
```

Fetch the original full article text from the source:

```bash
newsblur stories original <story_hash>
```

View stories you've already read:

```bash
newsblur stories read
```

### Daily Briefing

Get an AI-curated briefing with top stories, infrequent site gems, and long reads:

```bash
newsblur briefing
newsblur briefing --limit 1
newsblur briefing --json
```

### Feeds and Folders

List all subscriptions:

```bash
newsblur feeds list
```

View the folder tree with unread counts:

```bash
newsblur feeds folders
```

Get detailed info about a specific feed:

```bash
newsblur feeds info <feed_id>
```

Subscribe to a new feed:

```bash
newsblur feeds add https://example.com/feed.xml
newsblur feeds add https://blog.com -f Tech
```

Unsubscribe from a feed:

```bash
newsblur feeds remove <feed_id>
```

Move a feed between folders or rename it:

```bash
newsblur feeds organize move_feed --feed-id 42 --from News --to Tech
```

### Story Actions

Save a story with tags:

```bash
newsblur save <story_hash> --tag ai --tag research
```

Remove a story from saved:

```bash
newsblur unsave <story_hash>
```

Mark stories as read by feed, folder, or specific story hashes:

```bash
newsblur read --feed 42
newsblur read --folder Tech
newsblur read 123:abc 456:def
```

Share a story to your Blurblog:

```bash
newsblur share <story_hash> --comment "Worth reading"
```

### Intelligence Training

View your trained classifiers for a feed:

```bash
newsblur train show --feed 42
```

Train a like on an author, tag, title, or feed:

```bash
newsblur train like --feed 42 --author "Ben Thompson"
newsblur train like --feed 42 --tag analysis
newsblur train like --feed 42 --title "quarterly earnings"
```

Train a dislike:

```bash
newsblur train dislike --feed 42 --tag sponsored
newsblur train dislike --feed 42 --author "Guest Post"
```

### Feed Discovery

Search for new feeds by topic:

```bash
newsblur discover search "machine learning"
```

Find feeds similar to one you already follow:

```bash
newsblur discover similar --feed 42
```

Browse trending feeds:

```bash
newsblur discover trending
```

### Notifications

Manage per-feed notification settings:

```bash
newsblur notifications --feed 42
```

### Account

View your account info and subscription status:

```bash
newsblur account
```

## Scripting Examples

Pipe story titles to the terminal:

```bash
newsblur stories list --json | jq -r '.items[] | "\(.title) - \(.feed_title)"'
```

Extract briefing summaries:

```bash
newsblur briefing --json | jq '.items[0].section_summaries'
```

Save all unread stories from a folder with a tag:

```bash
for hash in $(newsblur stories list --folder Research --json | jq -r '.items[].story_hash'); do
  newsblur save "$hash" --tag to-review
done
```

Export your feed list:

```bash
newsblur feeds list --json | jq -r '.items[] | "\(.feed_title),\(.feed_address)"'
```

## Requirements

- Python 3.11+
- Premium Archive ($99/year) or Premium Pro ($29/month) subscription
- OAuth authentication via browser

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。