mp2rss-auth
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesemp2rss-auth Skill
mp2rss-auth Skill
Mp2rss CLI 的登录态管理 —— 登录、登出、查看 Feed Key 与登录状态。
Login-state management for the Mp2rss CLI — log in, log out, and view the Feed Key and login status.
Prerequisites
Prerequisites
mp2rssbash
undefinedThe binary is installed:
mp2rssbash
undefined一键安装(macOS / Linux)
One-click installation (macOS / Linux)
npm(Node ≥ 18)
npm (Node ≥ 18)
pnpm add -g @mp2rss/cli
也可在 <https://github.com/areyoubugcoder/mp2rss-cli/releases/latest> 直接下载对应平台二进制。pnpm add -g @mp2rss/cli
You can also download the binary for your platform directly from <https://github.com/areyoubugcoder/mp2rss-cli/releases/latest>.Commands
Commands
Log in
Log in
mp2rss auth login [-k <feed-key>] [--no-browser]| Mode | Command | Description |
|---|---|---|
| 浏览器(默认) | | 打开浏览器走 loopback 授权,登录后自动写入 |
| Feed Key 直传 | | 直接传入 Feed Key,先调用上游 |
| 远程模式 | | 不打开浏览器,仅打印授权 URL,复制到本地浏览器打开后手动粘贴 Feed Key |
bash
mp2rss auth login
mp2rss auth login -k <your-feed-key>
mp2rss auth login --no-browserFeed Key 可在 https://mp2rss.bugcode.dev/ 登录后查看或重置。
⚠️ 不支持 ,只输出纯文本反馈。
auth login-o jsonmp2rss auth login [-k <feed-key>] [--no-browser]| Mode | Command | Description |
|---|---|---|
| Browser (default) | | Opens the browser for loopback authorization and automatically writes the credentials to |
| Direct Feed Key entry | | Passes the Feed Key directly, first calls the upstream |
| Remote mode | | Does not open a browser and only prints the authorization URL; copy it, open it in a local browser, and then manually paste the Feed Key |
bash
mp2rss auth login
mp2rss auth login -k <your-feed-key>
mp2rss auth login --no-browserYou can view or reset your Feed Key after logging in at https://mp2rss.bugcode.dev/.
⚠️ does not support and only outputs plain-text feedback.
auth login-o jsonCheck status
Check status
mp2rss auth status [-o json]显示是否已认证、Feed Key 来源、API URL、最近登录时间。
bash
mp2rss auth status
mp2rss auth status -o jsonJSON shape(已登录):
json
{
"loggedIn": true,
"source": "config",
"apiUrl": "https://mp2rss.bugcode.dev",
"feedKeyMasked": "abcdef***",
"name": "张三",
"email": "user@example.com",
"lastLoginAt": 1705000000000,
"lastVerifyAt": 1705000001000
}nameemail-k--no-browseromitemptyJSON shape(未登录):
json
{
"loggedIn": false,
"source": "none",
"apiUrl": "https://mp2rss.bugcode.dev"
}source"env""config""none"mp2rss auth status [-o json]Displays whether you are authenticated, the Feed Key source, the API URL, and the most recent login time.
bash
mp2rss auth status
mp2rss auth status -o jsonJSON shape (logged in):
json
{
"loggedIn": true,
"source": "config",
"apiUrl": "https://mp2rss.bugcode.dev",
"feedKeyMasked": "abcdef***",
"name": "John Doe",
"email": "user@example.com",
"lastLoginAt": 1705000000000,
"lastVerifyAt": 1705000001000
}nameemail-k--no-browseromitemptyJSON shape (not logged in):
json
{
"loggedIn": false,
"source": "none",
"apiUrl": "https://mp2rss.bugcode.dev"
}Possible values: (environment variable) / (configuration file) / (not configured).
source"env""config""none"Log out
Log out
mp2rss auth logout清空 里的 Feed Key(保留 API URL 配置)。
~/.mp2rss/config.jsonmp2rss auth logoutClears the Feed Key in while retaining the API URL configuration.
~/.mp2rss/config.jsonAgent Usage Notes
Agent Usage Notes
- 调用 任何子命令前如不确定登录状态,应先
mp2rss mp解析mp2rss auth status -o json字段loggedIn - 时间字段均为 unix 毫秒数(number),不是格式化字符串
- 字段命名统一 camelCase(/
loggedIn/apiUrl/feedKeyMasked/name/email/lastLoginAt)lastVerifyAt - 本地配置:,目录
~/.mp2rss/config.json/ 文件07000600 - Feed Key 优先级(高 → 低):命令行 >
--api-key环境变量 > 配置文件MP2RSS_FEED_KEY - API URL 优先级(高 → 低):>
--api-url> 配置文件 > 默认MP2RSS_API_URLhttps://mp2rss.bugcode.dev - 错误 JSON 形态:,
{"error":{"message":"...","code":<int>}}为 HTTP 状态码或 CLI exit code;被限流(429)时额外带code,不要立刻重试"kind":"rate_limited" - Exit codes:成功;
0通用错误(网络);1参数错误;2鉴权失败;3资源不存在;4上游不可用5
- Before invoking any subcommand, if you are unsure about the login state, first run
mp2rss mpand parse themp2rss auth status -o jsonfieldloggedIn - All time fields are Unix timestamps in milliseconds (number), not formatted strings
- Field names consistently use camelCase (/
loggedIn/apiUrl/feedKeyMasked/name/email/lastLoginAt)lastVerifyAt - Local configuration: , with directory permissions
~/.mp2rss/config.jsonand file permissions07000600 - Feed Key precedence (high → low): command-line >
--api-keyenvironment variable > configuration fileMP2RSS_FEED_KEY - API URL precedence (high → low): >
--api-url> configuration file > defaultMP2RSS_API_URLhttps://mp2rss.bugcode.dev - Error JSON shape: , where
{"error":{"message":"...","code":<int>}}is the HTTP status code or CLI exit code; when rate-limited (429), it additionally includescode—do not retry immediately"kind":"rate_limited" - Exit codes: success;
0generic error (network);1invalid arguments;2authentication failure;3resource not found;4upstream unavailable5