paw-mail-usage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Paw Mail CLI

Paw Mail CLI

The CLI is distributed as pre-built binaries via the paw-mail-cli repository. It must be installed before use.
该CLI通过paw-mail-cli仓库以预构建二进制文件的形式分发,使用前必须先安装。

Installation

安装

bash
undefined
bash
undefined

Nix (recommended)

Nix(推荐)

nix profile install 'github:pawpair/paw-mail-cli?dir=nix#paw-mail'
nix profile install 'github:pawpair/paw-mail-cli?dir=nix#paw-mail'

Homebrew (macOS / Linux)

Homebrew(macOS / Linux)

brew tap pawpair/paw-mail-cli && brew install paw-mail
brew tap pawpair/paw-mail-cli && brew install paw-mail

Arch Linux (AUR)

Arch Linux(AUR)

yay -S paw-mail-bin
yay -S paw-mail-bin

Debian / Ubuntu — download .deb from latest release

Debian / Ubuntu — 从最新版本下载.deb包

sudo dpkg -i paw-mail_*_amd64.deb
undefined
sudo dpkg -i paw-mail_*_amd64.deb
undefined

Binaries

二进制文件

BinaryDescription
paw-mail
Unified CLI + TUI (recommended)
paw-mail-tui
Terminal user interface only
All examples below use
paw-mail
. The TUI can be launched with
paw-mail-tui
or
paw-mail tui
.
二进制文件描述
paw-mail
统一CLI + TUI(推荐)
paw-mail-tui
仅终端用户界面
以下所有示例均使用
paw-mail
。可通过
paw-mail-tui
paw-mail tui
启动TUI。

Global Flags

全局标志

These flags go before the subcommand:
FlagEnv VarDescription
--server <url>
MAIL_SERVER
gRPC backend address
--format <table|json>
Output format (default: table)
--auth-backend <auto|keyring|file>
MAIL_AUTH_BACKEND
Token storage backend
-v, --verbose
Enable debug logging
这些标志需要放在子命令之前
标志环境变量描述
--server <url>
MAIL_SERVER
gRPC后端地址
--format <table|json>
输出格式(默认:table)
--auth-backend <auto|keyring|file>
MAIL_AUTH_BACKEND
令牌存储后端
-v, --verbose
启用调试日志

Subcommands

子命令

Config

配置

bash
paw-mail config refresh  # Fetch remote config and cache locally
paw-mail config show     # Show current config values
Config is cached locally at
~/.local/pawpair/config.json
(or
~/.pawpair/config.json
). First run bootstraps automatically from the remote config service.
bash
paw-mail config refresh  # 获取远程配置并本地缓存
paw-mail config show     # 显示当前配置值
配置会本地缓存于
~/.local/pawpair/config.json
(或
~/.pawpair/config.json
)。首次运行时会自动从远程配置服务引导配置。

Auth

认证

bash
paw-mail auth login      # OAuth device flow login
paw-mail auth status     # Show auth state + backend
paw-mail auth logout     # Clear stored tokens
bash
paw-mail auth login      # OAuth设备流登录
paw-mail auth status     # 显示认证状态 + 后端
paw-mail auth logout     # 清除存储的令牌

Accounts

账户

bash
paw-mail accounts list
paw-mail accounts get --provider <google|microsoft>
paw-mail accounts add --email <e> --provider <google|microsoft>  # Opens browser for OAuth
paw-mail accounts delete --provider <google|microsoft>
paw-mail accounts activate --id <uuid>
paw-mail accounts deactivate --id <uuid>
paw-mail accounts oauth-clients            # List user OAuth clients
paw-mail accounts oauth-clients --system   # List system OAuth clients
bash
paw-mail accounts list
paw-mail accounts get --provider <google|microsoft>
paw-mail accounts add --email <e> --provider <google|microsoft>  # 打开浏览器进行OAuth认证
paw-mail accounts delete --provider <google|microsoft>
paw-mail accounts activate --id <uuid>
paw-mail accounts deactivate --id <uuid>
paw-mail accounts oauth-clients            # 列出用户OAuth客户端
paw-mail accounts oauth-clients --system   # 列出系统OAuth客户端

Emails

邮件

bash
paw-mail emails folders --provider <p> --email <e>
paw-mail emails list --provider <p> --email <e> --folder INBOX [--limit 50]
paw-mail emails fetch --provider <p> --email <e> --folder INBOX --uid <n>
paw-mail emails body --provider <p> --email <e> --folder INBOX --uid <n>
paw-mail emails search --provider <p> --email <e> --folder INBOX --query <q>
paw-mail emails read --provider <p> --email <e> --folder INBOX --uid <n>
paw-mail emails unread --provider <p> --email <e> --folder INBOX --uid <n>
paw-mail emails flag --provider <p> --email <e> --folder INBOX --uid <n> [--unflag]
paw-mail emails move --provider <p> --email <e> --folder INBOX --uid <n> --destination Trash
paw-mail emails delete --provider <p> --email <e> --folder INBOX --uid <n>
bash
paw-mail emails folders --provider <p> --email <e>
paw-mail emails list --provider <p> --email <e> --folder INBOX [--limit 50]
paw-mail emails fetch --provider <p> --email <e> --folder INBOX --uid <n>
paw-mail emails body --provider <p> --email <e> --folder INBOX --uid <n>
paw-mail emails search --provider <p> --email <e> --folder INBOX --query <q>
paw-mail emails read --provider <p> --email <e> --folder INBOX --uid <n>
paw-mail emails unread --provider <p> --email <e> --folder INBOX --uid <n>
paw-mail emails flag --provider <p> --email <e> --folder INBOX --uid <n> [--unflag]
paw-mail emails move --provider <p> --email <e> --folder INBOX --uid <n> --destination Trash
paw-mail emails delete --provider <p> --email <e> --folder INBOX --uid <n>

Sync

同步

bash
paw-mail sync status --account-id <id>
paw-mail sync trigger --account-id <id>
paw-mail sync history --account-id <id>
bash
paw-mail sync status --account-id <id>
paw-mail sync trigger --account-id <id>
paw-mail sync history --account-id <id>

Threads

线程

bash
paw-mail threads list --account-id <id>
paw-mail threads get --thread-id <id> --account-id <id>
bash
paw-mail threads list --account-id <id>
paw-mail threads get --thread-id <id> --account-id <id>

Auth Backends

认证后端

bash
undefined
bash
undefined

Auto-detect (default) — tries keyring, falls back to file

自动检测(默认)—— 先尝试密钥环,失败则回退到文件

paw-mail auth status
paw-mail auth status

Force file-based storage

强制使用基于文件的存储

paw-mail --auth-backend file auth status
paw-mail --auth-backend file auth status

Force keyring (errors if unavailable)

强制使用密钥环(不可用时报错)

paw-mail --auth-backend keyring auth status
paw-mail --auth-backend keyring auth status

Verbose to see backend selection

启用详细日志查看后端选择过程

paw-mail -v auth status
undefined
paw-mail -v auth status
undefined

Common Issues

常见问题

  • command not found: paw-mail
    — The CLI is not installed. See Installation above.
  • Keyring write failed: locked collection
    — GNOME Keyring is locked. Use
    --auth-backend file
    or unlock your keyring.
  • Could not open browser
    — Headless/SSH session. Copy the printed URL manually.
  • command not found: paw-mail
    —— CLI未安装,请参考上方的安装步骤。
  • Keyring write failed: locked collection
    —— GNOME密钥环已锁定。使用
    --auth-backend file
    或解锁你的密钥环。
  • Could not open browser
    —— 无界面/SSH会话。请手动复制打印的URL。