A CLI tool to diagnose, validate, and auto-fix OpenClaw AI assistant installations
Project description
OpenClaw Doctor ๐ฉบ
A CLI tool to diagnose, validate, and auto-fix OpenClaw AI assistant installations.
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ OpenClaw Doctor ๐ฉบ โ
โ Diagnosing your OpenClaw installation โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
[โ] Node.js v20.10.0 installed
[โ] OpenClaw v1.2.3 installed
[โ] Docker 24.0.7 running
[โ] System requirements met (8GB RAM, 50GB free)
[โ] Folder structure OK
[โ] Configuration valid
[!] API key missing for Anthropic
[โ] Network connectivity OK
[โ] No errors in logs
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Summary: 8 passed, 1 warning, 0 failed
โจ Features
- ๐ 9 Comprehensive Health Checks - Everything from Node.js to network connectivity
- ๐ง Auto-Fix Capabilities - Automatically resolve common issues
- ๐ก Smart Suggestions - Plain language explanations and solutions
- ๐ Log Parsing - Finds errors in logs and explains them simply
- ๐จ Beautiful Output - Rich terminal UI with colors and icons
- ๐ JSON Output - CI/CD friendly format
๐ฆ Installation
pip install openclaw-doctor
Or install from source:
git clone https://github.com/AyobamiAdeworler/openclaw-doctor.git
cd openclaw-doctor
pip install -e .
๐ Quick Start
# Run all health checks
openclaw-doctor
# Run with auto-fix
openclaw-doctor --fix
# Show detailed output
openclaw-doctor --verbose
๐ Commands
Run All Checks
openclaw-doctor
Run with Auto-Fix
Automatically fix issues where possible:
openclaw-doctor --fix
Run Specific Check
openclaw-doctor check nodejs
openclaw-doctor check docker
openclaw-doctor check config
openclaw-doctor check logs
List All Available Checks
openclaw-doctor list-checks
Other Options
# Verbose output with details
openclaw-doctor --verbose
# JSON output for CI/CD
openclaw-doctor --json
# Show version
openclaw-doctor --version
# Get help
openclaw-doctor --help
๐ Health Checks
| Check | What it Verifies | Auto-Fix |
|---|---|---|
| Node.js | Node.js >= 18.x installed | โ Install guide |
| OpenClaw | OpenClaw CLI installation | โ Runs install script |
| Docker | Docker & Docker Compose (optional) | ๐ก Suggestions |
| System | RAM (2GB+), Disk (20GB+), CPU cores | ๐ก Suggestions |
| Folders | ~/.openclaw/, skills/, channels/, workspaces/ | โ Creates directories |
| Config | config.yaml syntax and required fields | โ Creates default |
| API Keys | Environment vars, .env files, config files | โ Setup wizard |
| Network | Connectivity to AI provider APIs | ๐ก Suggestions |
| Logs | Parses logs for errors with explanations | ๐ก Detailed analysis |
๐ Log Error Detection
The Logs check parses OpenClaw logs and explains errors in plain language:
| Error Type | What You'll See |
|---|---|
| Rate Limits | "You've made too many API calls. Wait 60 seconds or upgrade your plan." |
| Auth Failures | "Your API key is invalid or expired. Get a new key from your provider." |
| Connection Issues | "Could not connect to the server. Check your internet connection." |
| Config Errors | "Your config file has invalid YAML syntax. Use a validator to find errors." |
| Permission Denied | "OpenClaw doesn't have permission to access this file." |
| Out of Memory | "The system ran out of memory. Close other applications." |
| Model Errors | "The specified AI model doesn't exist or isn't available." |
Run openclaw-doctor check logs --fix for detailed error analysis!
๐ง Configuration Locations
OpenClaw Doctor checks these locations:
| Type | Paths Checked |
|---|---|
| Home Directory | ~/.openclaw/, ~/.config/openclaw/ |
| Config Files | config.yaml, config.yml, config.json |
| Environment Files | .env in OpenClaw dirs or current directory |
| Log Files | ~/.openclaw/logs/ |
| Windows | %APPDATA%\Local\openclaw\ |
๐ค CI/CD Integration
Use JSON output for automated pipelines:
openclaw-doctor --json
Example output:
{
"version": "0.1.0",
"checks": [
{
"name": "Node.js",
"status": "pass",
"message": "Node.js v20.10.0 installed"
}
],
"summary": {
"passed": 8,
"warnings": 1,
"failed": 0
}
}
Exit codes:
0- All checks passed1- One or more checks failed
๐ ๏ธ Development
# Clone the repo
git clone https://github.com/AyobamiAdeworler/openclaw-doctor.git
cd openclaw-doctor
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=openclaw_doctor
๐ License
MIT License - see LICENSE for details.
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ Acknowledgments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openclaw_doctor-0.1.0.tar.gz.
File metadata
- Download URL: openclaw_doctor-0.1.0.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d49a496356a6c4821bc828fd952360586b559cba35a16854af0f26afe7f3a57
|
|
| MD5 |
024bbd5ce1b85b373960c84146942739
|
|
| BLAKE2b-256 |
679f2bc71ed7bc2e6a23edd83afa876f4e03f320939c06630c5b9fdcae3197ed
|
File details
Details for the file openclaw_doctor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openclaw_doctor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d69bb6582270d83d783793759798ce3b9e5bdd05548d4b68ff3049be0ef3883
|
|
| MD5 |
dd9095dcd3e705d7f9ea48997f85a862
|
|
| BLAKE2b-256 |
4b82768e0495618d764c6e2055a83364820b8add2c9778c55bf77abd938ec51b
|