automation/auth-monitoring.md
OpenClaw 透過openclaw models status 提供 OAuth 到期健康狀態。請將其用於
自動化與警示;腳本僅為手機工作流程的選用加值。 Use that for
automation and alerting; scripts are optional extras for phone workflows. Use that for
automation and alerting; scripts are optional extras for phone workflows.
Preferred: CLI check (portable)
0:正常1:憑證已到期或缺失2:即將到期(24 小時內)
Optional scripts (ops / phone workflows)
These live underscripts/ and are optional. 這些檔案位於 scripts/ 目錄下,且為 可選。它們假設可透過 SSH 存取該
gateway host and are tuned for systemd + Termux.
scripts/claude-auth-status.sh現在使用openclaw models status --json作為 事實來源(若 CLI 無法使用,則回退為直接讀取檔案), 因此請在PATH上為計時器保留openclaw。scripts/auth-monitor.sh:cron/systemd 計時器目標;傳送警示(ntfy 或手機)。scripts/systemd/openclaw-auth-monitor.{service,timer}:systemd 使用者計時器。scripts/claude-auth-status.sh:Claude Code + OpenClaw 身分驗證檢查器(完整/json/簡易)。scripts/mobile-reauth.sh:透過 SSH 的引導式重新身分驗證流程。scripts/termux-quick-auth.sh:一鍵小工具狀態 + 開啟身分驗證 URL。scripts/termux-auth-widget.sh:完整的引導式小工具流程。scripts/termux-sync-widget.sh:同步 Claude Code 憑證 → OpenClaw。