CLI entry points and library. Default output: JSON unless --human. Canonical reference for the scripts topic.
| Script | Purpose | Key flags | Output |
|---|---|---|---|
scripts/validate.py |
Validate stacks against standards | --human, --summary, --no-docker, [stack], --root |
JSON / human |
scripts/audit.py |
Full infrastructure audit | --human, --ports, --images, --validate, --summary, --root |
JSON / human |
scripts/healthcheck.py |
Container health status | --human, --quiet, --push-metrics, --send-log |
JSON / human |
scripts/backup.py |
Backup configs and optional data | --data, --verify, --replicate, --replicate-logs, --check-truenas, --list, --human, --push-metrics, --send-log, --docker-root, --backup-root, --no-cleanup |
JSON / human |
scripts/setup.py |
Prerequisites, systemd/cron/boot ordering install | --install, --fix, --json, --verbose |
stdout / JSON |
scripts/host.py |
Host system report | --human, --hardware, --docker, --services, --network |
JSON / human |
scripts/observability-health.py |
Observability stack health | --human, --alert, --push-metrics, --send-log |
JSON / human |
openclaw/scripts/validate_config.py |
Validate OpenClaw openclaw.json | --human, --config, --root, --no-env-check |
JSON / human |
Run from repo root (e.g. ./scripts/validate.py). OpenClaw validator: from repo root python openclaw/scripts/validate_config.py or from openclaw/: python scripts/validate_config.py.
# Option 1: System package (Ubuntu/Debian)
sudo apt install python3-yaml
# Option 2: pip
pip install -r scripts/requirements.txtscripts/
├── validate.py, audit.py, healthcheck.py, backup.py, setup.py, host.py
├── observability-health.py
├── requirements.txt
├── lib/ # Core library (models, discovery, compose, validator, ports, images, observability, report, alerting, resilient_logging)
└── templates/ # Systemd service, cron (see [CRON.md](CRON.md))
- validate:
./scripts/validate.py [stack]— e.g.graylog. Standards: STANDARDS.md. - audit:
./scripts/audit.py— validation + ports + images. Use--portsor--imagesfor single slice. - healthcheck:
./scripts/healthcheck.py --push-metrics— container health, optional Pushgateway/Graylog. - backup:
./scripts/backup.py(config only);./scripts/backup.py --data(config + data). Exclusions derived from.gitignorewhen present;.envalways excluded. See LIFECYCLE.md. - setup:
./scripts/setup.py --install— install cron, systemd template, boot ordering (infra target + app overrides), fix permissions. - host:
./scripts/host.py --human— hardware, Docker, systemd services.
| Topic | Doc |
|---|---|
| Validation rules | STANDARDS.md |
| Cron schedule | CRON.md |
| Lifecycle, backups, Watchtower | LIFECYCLE.md |
| Observability (logging, metrics, alerting) | OBSERVABILITY.md |
| Stack list and ports | STACKS.md |
| Code | Meaning |
|---|---|
| 0 | Success (no errors) |
| 1 | Failure (errors or exception) |
Warnings do not change exit code.