認證監控 (Auth Monitoring)
OpenClaw 透過openclaw models status 暴露 OAuth 的有效性狀態。建議使用此指令進行自動化與告警;腳本部分則是針對手機工作流研發的選用附加功能。
推薦做法:CLI 檢查(具備移植性)
0:正常 (OK)1:憑證已過期或缺失2:即將過期(24 小時內)
選用腳本(運維 / 手機工作流)
這些腳本位於scripts/ 目錄中,屬於選配功能。它們假設您可以透過 SSH 存取 Gateway 主機,並已針對 Systemd 與 Termux 進行優化。
scripts/claude-auth-status.sh:目前以openclaw models status --json作為權威資料來源。scripts/auth-monitor.sh:Cron/Systemd 定時器目標;用於發送告警(透過 ntfy 或手機)。scripts/systemd/openclaw-auth-monitor.{service,timer}:Systemd 使用者定時器。scripts/mobile-reauth.sh:引導式的 SSH 重新認證流程。scripts/termux-quick-auth.sh:點擊小工具即可查看狀態並開啟認證網址。scripts/termux-auth-widget.sh:完整的小工具引導流程。scripts/termux-sync-widget.sh:同步 Claude Code 憑證至 OpenClaw。