# Environment Scan Templates

Copy-paste health checks for common self-hosting platforms. Run these before telling the user what to configure.

## Generic Hermes Check

```bash
hermes status --all 2>/dev/null || echo "hermes CLI not in PATH"
hermes doctor 2>/dev/null || true
hermes tools list 2>/dev/null || true
hermes skills list 2>/dev/null || true
hermes memory status 2>/dev/null || true
```

## ZimaOS / CasaOS

```bash
# CasaOS apps
ls /DATA/.casaos/apps/ 2>/dev/null | sort

# Check for .secrets
ls -la /DATA/AppData/.secrets/ 2>/dev/null || echo "No .secrets at /DATA/AppData/.secrets"
find /DATA -maxdepth 3 -type d -name '.secrets' 2>/dev/null

# Media mounts
ls -d /mnt/user/HDD_*/ 2>/dev/null || echo "No /mnt/user/HDD_ mounts"
ls -d /mnt/ssd/.media/*/ 2>/dev/null || echo "No /mnt/ssd/.media mounts"

# Docker (if CasaOS uses it)
docker ps --format '{{.Names}} {{.Image}}' 2>/dev/null || echo "Docker not available"
```

## System-Level Checks

```bash
# Who am I, where am I
whoami && pwd && echo "HERMES_HOME=$HERMES_HOME"

# OS
uname -a

# Hermes process
ps aux | grep -i hermes | grep -v grep

# Gateway service
systemctl --user status hermes-gateway 2>/dev/null || systemctl status hermes-gateway 2>/dev/null || echo "No systemd service found"

# Network listeners
ss -tlnp 2>/dev/null | grep -E 'hermes|python|gateway'

# Config location
ls -la ~/.hermes/config.yaml 2>/dev/null || ls -la /DATA/AppData/hermes/config.yaml 2>/dev/null
```

## Predecessor Bot Check

```bash
# Common bot names
for name in openclaw claude codex openclaw-gateway hermes-gateway; do
  pgrep -f "$name" && echo "FOUND: $name running" || true
done

# Backup files
find /DATA /tmp /var -maxdepth 3 -name '*backup*.json' -o -name '*claw*.json' 2>/dev/null | head -10

# CasaOS predecessor app
ls /DATA/.casaos/apps/ | grep -iE 'claw|claude|codex'
```

## What to Look For

| Output Pattern | Meaning | Action |
|---------------|---------|--------|
| `hermes: command not found` | CLI not in PATH | Check `/DATA/AppData/hermes/venv/bin/hermes`, offer symlink |
| `base_url: https://ollama.com/v1` with non-Ollama model | Misconfiguration | Flag gently, suggest correct endpoint |
| `openclaw-gateway` running as root | Parallel bot active | Ask user: stop, migrate, or keep? |
| `No .secrets` but predecessor references them | Missing credential files | Ask user to transfer |
| `/mnt/user/HDD_1TB/` not found | Media drives unmounted | Note for later, ask if expected |
| `Gateway running with 1 platform(s)` | Only Telegram connected | Note, offer other platforms if user wants |
