Auth Monitoring
Auth monitoring
Section titled “Auth monitoring”OpenClaw 透過 openclaw models status 公開 OAuth 過期狀態。請將其用於
自動化和警示;腳本則是針對手機工作流程的額外選項。
Preferred: CLI check (portable)
Section titled “Preferred: CLI check (portable)”openclaw models status --checkExit codes:
0: OK1: expired or missing credentials2: expiring soon (within 24h)
這適用於 cron/systemd,不需要額外的腳本。
Optional scripts (ops / phone workflows)
Section titled “Optional scripts (ops / phone workflows)”這些位於 scripts/ 下,屬於選用功能。它們假設具有對
gateway 主機的 SSH 存取權限,並針對 systemd + Termux 進行了調整。
scripts/claude-auth-status.sh現在使用openclaw models status --json作為 事實來源(如果 CLI 無法使用則回退到直接讀取檔案), 因此請將openclaw保留在PATH上以用於計時器。scripts/auth-monitor.sh: cron/systemd 計時器目標;發送警示(ntfy 或手機)。scripts/systemd/openclaw-auth-monitor.{service,timer}: systemd 使用者計時器。scripts/claude-auth-status.sh: Claude Code + OpenClaw auth checker (full//simple).scripts/mobile-reauth.sh: guided re‑auth flow over SSH.scripts/termux-quick-auth.sh: one‑tap widget status + open auth URL.scripts/termux-auth-widget.sh: full guided widget flow.scripts/termux-sync-widget.sh: sync Claude Code creds → OpenClaw.
如果您不需要手機自動化或 systemd 計時器,請跳過這些腳本。