mp2rss-cli

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 1 Imported by: 0

README

mp2rss-cli

Mp2RSS 的命令行客户端,订阅微信公众号、查看文章、管理订阅。

Release Downloads npm npm downloads CI Go Report Card

安装

# 一键安装脚本(macOS / Linux)
curl -fsSL https://raw.githubusercontent.com/areyoubugcoder/mp2rss-cli/main/scripts/install.sh | sh

# npm(Node ≥ 18)
pnpm add -g @mp2rss/cli

# 源码(Go ≥ 1.21)
git clone https://github.com/areyoubugcoder/mp2rss-cli.git && cd mp2rss-cli && make build

也可在 Releases 直接下载对应平台二进制。完整安装与卸载说明见 文档站 · 安装

用法

mp2rss auth login
mp2rss mp subscribe https://mp.weixin.qq.com/s/xxxxxxxxxx
mp2rss mp list
mp2rss mp list -o json | jq '.items[].mpName'

命令一览

命令 说明
mp2rss auth login 登录(默认浏览器 + loopback;支持 -k / --no-browser
mp2rss auth logout 清空本地 Feed 密钥
mp2rss auth status 查看登录状态
mp2rss mp list 列出订阅(-q 模糊搜索)
mp2rss mp search <keyword> mp list -q 的语法糖
mp2rss mp subscribe <article-url> 订阅公众号
mp2rss mp remove <mpId> 取消订阅(-y 跳过确认)
mp2rss mp articles <mpId> 历史文章
mp2rss update 自更新(--check / --force

完整命令参考见 文档站 · 命令参考

配置

本地配置 ~/.mp2rss/config.json(目录 0700、文件 0600):

{
  "feed_key": "9f3a2c...(64 位 hex)",
  "api_url": "https://mp2rss.bugcode.dev",
  "last_login_at": 1747194198,
  "last_verify_at": 1747194198
}

环境变量 MP2RSS_FEED_KEY / MP2RSS_API_URL,优先级高于配置文件、低于命令行 flag。

文档

License

MIT

Documentation

Overview

mp2rss-cli is the command-line client for mp2rss.bugcode.dev.

Directories

Path Synopsis
cmd
Package cmd wires the cobra command tree for mp2rss CLI.
Package cmd wires the cobra command tree for mp2rss CLI.
auth
Package auth implements `mp2rss auth ...` subcommands.
Package auth implements `mp2rss auth ...` subcommands.
mp
Package mp implements `mp2rss mp ...` subcommands.
Package mp implements `mp2rss mp ...` subcommands.
update
Package update implements `mp2rss update` self-updating the installed binary.
Package update implements `mp2rss update` self-updating the installed binary.
internal
authflow
Package authflow implements the OAuth Loopback flow used by `mp2rss auth login`.
Package authflow implements the OAuth Loopback flow used by `mp2rss auth login`.
browser
Package browser opens URLs in the user's default browser, best-effort.
Package browser opens URLs in the user's default browser, best-effort.
client
Package client is a thin HTTP wrapper around the mp2rss Open API.
Package client is a thin HTTP wrapper around the mp2rss Open API.
cliopts
Package cliopts exposes the shared command dependency surface.
Package cliopts exposes the shared command dependency surface.
config
Package config persists CLI configuration to ~/.mp2rss/config.json.
Package config persists CLI configuration to ~/.mp2rss/config.json.
errs
Package errs defines exit-code-aware typed errors for the CLI.
Package errs defines exit-code-aware typed errors for the CLI.
output
Package output renders command results as table or JSON.
Package output renders command results as table or JSON.
prompt
Package prompt provides interactive terminal input helpers.
Package prompt provides interactive terminal input helpers.
version
Package version holds the CLI version, injected at build time via ldflags.
Package version holds the CLI version, injected at build time via ldflags.
test
mock-api command
Package main implements a minimal in-memory mock of the mp2rss Open API.
Package main implements a minimal in-memory mock of the mp2rss Open API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL