Files
bot/docs/automation/auth-monitoring.md
zeekay 4bdc9ee3e4 chore: rebrand openclaw → hanzo-bot for bridge merge
Comprehensive rename of all openclaw references to hanzo-bot equivalents:
- Package: openclaw → @hanzo/bot
- Binary: openclaw → hanzo-bot
- Types: OpenClaw* → Bot*
- Env vars: OPENCLAW_* → BOT_*
- Android: ai.openclaw.android → ai.hanzo.bot.android
- iOS/macOS: ai.openclaw.* → ai.hanzo.*
- Swift modules: OpenClaw* → Bot*
- Plugins: openclaw.plugin.json → bot.plugin.json
- Paths: .openclaw/ → .hanzo/bot/
- URLs: github.com/openclaw → github.com/hanzoai
2026-02-26 22:36:01 -08:00

1.6 KiB
Raw Permalink Blame History

summary, read_when, title
summary read_when title
Monitor OAuth expiry for model providers
Setting up auth expiry monitoring or alerts
Automating Claude Code / Codex OAuth refresh checks
Auth Monitoring

Auth monitoring

Hanzo Bot exposes OAuth expiry health via hanzo-bot models status. Use that for automation and alerting; scripts are optional extras for phone workflows.

Preferred: CLI check (portable)

hanzo-bot models status --check

Exit codes:

  • 0: OK
  • 1: expired or missing credentials
  • 2: expiring soon (within 24h)

This works in cron/systemd and requires no extra scripts.

Optional scripts (ops / phone workflows)

These live under scripts/ and are optional. They assume SSH access to the gateway host and are tuned for systemd + Termux.

  • scripts/claude-auth-status.sh now uses hanzo-bot models status --json as the source of truth (falling back to direct file reads if the CLI is unavailable), so keep bot on PATH for timers.
  • scripts/auth-monitor.sh: cron/systemd timer target; sends alerts (ntfy or phone).
  • scripts/systemd/bot-auth-monitor.{service,timer}: systemd user timer.
  • scripts/claude-auth-status.sh: Claude Code + Hanzo Bot auth checker (full/json/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 → Hanzo Bot.

If you don’t need phone automation or systemd timers, skip these scripts.