mlwcli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

mlwcli

mlwcli

A unified CLI for managing feeds (Miniflux), links (Linkding), and pages (Wallabag).
一款用于管理订阅源(Miniflux)、链接(Linkding)和网页(Wallabag)的统一CLI工具。

Command Reference

命令参考

bash
undefined
bash
undefined

Authentication (interactive TUI)

身份验证(交互式TUI)

mlwcli auth login # Login to linkding, miniflux, or wallabag mlwcli auth logout # Logout from a service
mlwcli auth login # 登录Linkding、Miniflux或Wallabag mlwcli auth logout # 退出某一服务

Linkding (Links)

Linkding(链接管理)

mlwcli link add <url> # Add link mlwcli link list # List links
mlwcli link add <url> # 添加链接 mlwcli link list # 列出链接

Miniflux (Feeds)

Miniflux(订阅源管理)

mlwcli feed add <url> # Add feed mlwcli feed list # List feeds mlwcli entry list # List feed entries mlwcli entry save <id> # Save entry to third-party service
mlwcli feed add <url> # 添加订阅源 mlwcli feed list # 列出订阅源 mlwcli entry list # 列出订阅源条目 mlwcli entry save <id> # 将条目保存至第三方服务

Wallabag (Pages)

Wallabag(网页管理)

mlwcli page add <url> # Add page mlwcli page list # List pages

Use `--help` on any command for options.
mlwcli page add <url> # 添加网页 mlwcli page list # 列出网页

在任意命令后添加`--help`查看可选参数。

Critical Guidelines

重要指南

  1. Authentication requires user action:
    • auth login
      and
      auth logout
      use an interactive TUI that requires a TTY — do not run them yourself
    • If a command fails due to missing credentials, tell the user to run
      mlwcli auth login
      in their terminal
    • Config stored at
      ~/.config/mlwcli/auth.toml
  2. Pagination: All
    list
    commands return
    {total, items}
    .
    • link list
      ,
      entry list
      :
      --limit
      /
      --offset
      (default: limit=10, offset=0)
    • page list
      :
      --page
      /
      --per-page
      (default: page=1, per-page=10)
    • feed list
      : no pagination parameters (returns all)
    • Always check
      total
      vs items returned
      before assuming you have all results.
  3. Output Filtering:
    • --jq=expression
      — inline jq filter (automatically enables JSON output)
    • --json=field1,field2
      — select specific fields (comma-separated, no spaces)
    • Without these flags, output is human-readable table format
  4. Search and Filtering:
    • link list
      :
      --search
      ,
      --limit
      ,
      --offset
    • entry list
      :
      --search
      ,
      --status
      (read/unread/removed, default: unread),
      --starred
      ,
      --feed-id
      ,
      --limit
      ,
      --offset
    • page list
      :
      --archive
      ,
      --starred
      ,
      --tags
      ,
      --domain
      ,
      --page
      ,
      --per-page
  5. Quote Handling:
    • Values with double quotes: wrap in single quotes:
      --notes 'Title: "Example"'
    • Tags are space-separated within a quoted string:
      --tags "tag1 tag2"
  1. 身份验证需要用户操作
    • auth login
      auth logout
      使用需要TTY的交互式TUI——请勿自行运行这些命令
    • 如果命令因缺少凭据而失败,请告知用户在其终端中运行
      mlwcli auth login
    • 配置文件存储在
      ~/.config/mlwcli/auth.toml
  2. 分页功能:所有
    list
    命令返回
    {total, items}
    格式的数据。
    • link list
      entry list
      :支持
      --limit
      /
      --offset
      参数(默认值:limit=10,offset=0)
    • page list
      :支持
      --page
      /
      --per-page
      参数(默认值:page=1,per-page=10)
    • feed list
      :无分页参数(返回所有结果)
    • 在假设已获取所有结果前,请务必检查
      total
      与返回条目的数量是否一致
  3. 输出过滤
    • --jq=expression
      —— 内联jq过滤器(自动启用JSON输出)
    • --json=field1,field2
      —— 选择特定字段(逗号分隔,无空格)
    • 若未使用这些标志,输出为人类可读的表格格式
  4. 搜索与过滤
    • link list
      :支持
      --search
      --limit
      --offset
      参数
    • entry list
      :支持
      --search
      --status
      (可选值:read/unread/removed,默认值:unread)、
      --starred
      --feed-id
      --limit
      --offset
      参数
    • page list
      :支持
      --archive
      --starred
      --tags
      --domain
      --page
      --per-page
      参数
  5. 引号处理
    • 包含双引号的值:使用单引号包裹,例如
      --notes 'Title: "Example"'
    • 标签需在引号字符串内用空格分隔,例如
      --tags "tag1 tag2"

Examples

示例

Authentication

身份验证

Authentication requires an interactive TTY — ask the user to run these commands themselves:
bash
mlwcli auth login   # interactive TUI: select service, enter endpoint + credentials
mlwcli auth logout  # interactive TUI: only shows signed-in services
身份验证需要交互式TTY——请让用户自行运行以下命令:
bash
mlwcli auth login   # 交互式TUI:选择服务,输入端点地址和凭据
mlwcli auth logout  # 交互式TUI:仅显示已登录的服务

Check pagination before processing

处理前检查分页情况

bash
mlwcli entry list --status=unread --jq='{total: .total, returned: (.items | length)}'
If
total > returned
, increase
--limit
or paginate:
bash
mlwcli entry list --status=unread --limit=100
bash
mlwcli entry list --status=unread --jq='{total: .total, returned: (.items | length)}'
如果
total > returned
,请增大
--limit
的值或进行分页查询:
bash
mlwcli entry list --status=unread --limit=100

or iterate with --offset=0, --offset=10, etc.

或者通过--offset=0、--offset=10等参数进行迭代查询

undefined
undefined

List unread entries

列出未读条目

bash
mlwcli entry list --status=unread --jq='.items[] | { id, url, title, published_at, status, feed_id: .feed.id, feed_title: .feed.title }'
bash
mlwcli entry list --status=unread --jq='.items[] | { id, url, title, published_at, status, feed_id: .feed.id, feed_title: .feed.title }'

List entries by feed

按订阅源列出条目

bash
undefined
bash
undefined

Find feed ID

查找订阅源ID

mlwcli feed list --jq='.items[] | { id, title, site_url }'
mlwcli feed list --jq='.items[] | { id, title, category_id: .category.id, category_title: .category.title }'

Fetch entries from that feed

获取该订阅源的条目

mlwcli entry list --feed-id=42 --limit=20 --jq='.items[] | { id, url, title, published_at }'
undefined
mlwcli entry list --feed-id=42 --limit=20 --jq='.items[] | { id, url, title, published_at }'
undefined

Find starred/read entries by date

按日期查找已标星/已读条目

bash
mlwcli entry list --starred --status=read --limit=100 --json=id,url,title,changed_at,starred | jq '.items[] | select(.changed_at >= "2025-12-26")'
Note:
changed_at
reflects when the entry was last modified (starred/read status changed), not publication date.
bash
mlwcli entry list --starred --status=read --limit=100 --json=id,url,title,changed_at,starred | jq '.items[] | select(.changed_at >= "2025-12-26")'
注意:
changed_at
字段反映的是条目最后一次修改的时间(如标星/已读状态变更),而非发布日期。

Save an entry to a third-party service

将条目保存至第三方服务

bash
mlwcli entry save 42
Saves to Miniflux's configured third-party integration (e.g. Wallabag, Pocket).
bash
mlwcli entry save 42
该操作会将条目保存至Miniflux已配置的第三方集成服务(例如Wallabag、Pocket)。

Add a feed (with optional category)

添加订阅源(可选分类)

bash
mlwcli feed add <url>
mlwcli feed add <url> --category-id=<id>   # defaults to 1 (All) if omitted
To find category IDs:
bash
mlwcli feed list --jq='.items[] | { id, title, category_id: .category.id, category_title: .category.title }'
bash
mlwcli feed add <url>
mlwcli feed add <url> --category-id=<id>   # 若省略,默认值为1(全部)
查找分类ID的方法:
bash
mlwcli feed list --jq='.items[] | { id, title, category_id: .category.id, category_title: .category.title }'

Add a link

添加链接

bash
mlwcli link add <url>
mlwcli link add <url> --notes='Title: "Some Title"' --tags="tag1 tag2"
bash
mlwcli link add <url>
mlwcli link add <url> --notes='Title: "Some Title"' --tags="tag1 tag2"

Add a page

添加网页

bash
mlwcli page add <url>
mlwcli page add <url> --tags="tag1 tag2" --archive
bash
mlwcli page add <url>
mlwcli page add <url> --tags="tag1 tag2" --archive

List pages

列出网页

bash
mlwcli page list --starred --per-page=20 --jq='.items[] | { id, url, title, domain_name }'
mlwcli page list --domain=example.com
mlwcli page list --tags="tech news"
bash
mlwcli page list --starred --per-page=20 --jq='.items[] | { id, url, title, domain_name }'
mlwcli page list --domain=example.com
mlwcli page list --tags="tech news"