# Colors for terminal output
RED='\033[0;31m'
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
NC='\033[0m'# No Color
# Output mode: "full" (default), "json", or "simple"
OUTPUT_MODE="${1:-full}"
fetch_models_status_json() {
openclaw models status --json 2>/dev/null || true
}
STATUS_JSON="$(fetch_models_status_json)"
USE_JSON=0 if [ -n "$STATUS_JSON" ]; then
USE_JSON=1 fi
calc_status_from_expires() {
local expires_at="$1" if ! [[ "$expires_at" =~ ^-?[0-9]+$ ]]; then
expires_at=0 fi
local now_ms=$(( $(date +%s) * 1000 ))
local diff_ms=$((expires_at - now_ms))
local hours=$((diff_ms / 3600000))
local mins=$(((diff_ms % 3600000) / 60000))
if [ "$expires_at" -le 0 ]; then echo"MISSING"
return 1 elif [ "$diff_ms" -lt 0 ]; then echo"EXPIRED"
return 1 elif [ "$diff_ms" -lt 3600000 ]; then echo"EXPIRING:${mins}m"
return 2 else echo"OK:${hours}h${mins}m"
return 0 fi
}
check_claude_code_auth() { if [ "$USE_JSON" -eq 1 ]; then
local expires_at
expires_at=$(json_expires_for_claude_cli)
calc_status_from_expires "$expires_at"
return $? fi
if [ ! -f "$CLAUDE_CREDS" ]; then echo"MISSING"
return 1 fi
check_openclaw_auth() { if [ "$USE_JSON" -eq 1 ]; then
local api_keys
api_keys=$(json_anthropic_api_key_count) if ! [[ "$api_keys" =~ ^[0-9]+$ ]]; then
api_keys=0 fi
local expires_at
expires_at=$(json_expires_for_anthropic_any)
if [ "$expires_at" -le 0 ] && [ "$api_keys" -gt 0 ]; then echo"OK:static"
return 0 fi
calc_status_from_expires "$expires_at"
return $? fi
if [ ! -f "$OPENCLAW_AUTH" ]; then echo"MISSING"
return 1 fi
if [ "$expires" -le 0 ] && [ "$api_keys" -gt 0 ]; then echo -e " Status: ${GREEN}OK${NC} (API key)" elif [ "$expires" -le 0 ]; then echo -e " Status: ${RED}NOT FOUND${NC}" echo" Note: Run 'openclaw doctor --yes' to sync from Claude Code" else
now_ms=$(( $(date +%s) * 1000 ))
diff_ms=$((expires - now_ms))
hours=$((diff_ms / 3600000))
mins=$(((diff_ms % 3600000) / 60000))
if [ "$diff_ms" -lt 0 ]; then echo -e " Status: ${RED}EXPIRED${NC}" echo" Note: Run 'openclaw doctor --yes' to sync from Claude Code" elif [ "$diff_ms" -lt 3600000 ]; then echo -e " Status: ${YELLOW}EXPIRING SOON (${mins}m remaining)${NC}" else echo -e " Status: ${GREEN}OK${NC}" echo" Expires: $(date -d @$((expires/1000))) (${hours}h ${mins}m)" fi fi
echo"" echo"=== Service Status ===" if systemctl --user is-active openclaw >/dev/null 2>&1; then echo -e "OpenClaw service: ${GREEN}running${NC}" else echo -e "OpenClaw service: ${RED}NOT running${NC}" fi
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.21Bemerkung:
(vorverarbeitet am 2026-06-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.