Skip to main content

A CLI tool to diagnose, validate, and auto-fix OpenClaw AI assistant installations

Project description

OpenClaw Doctor ๐Ÿฉบ

PyPI version Python 3.10+ License: MIT

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 passed
  • 1 - 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ™ Acknowledgments

  • OpenClaw - The AI assistant this tool supports
  • Typer - CLI framework
  • Rich - Beautiful terminal output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openclaw_doctor-0.1.0.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openclaw_doctor-0.1.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

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

Hashes for openclaw_doctor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9d49a496356a6c4821bc828fd952360586b559cba35a16854af0f26afe7f3a57
MD5 024bbd5ce1b85b373960c84146942739
BLAKE2b-256 679f2bc71ed7bc2e6a23edd83afa876f4e03f320939c06630c5b9fdcae3197ed

See more details on using hashes here.

File details

Details for the file openclaw_doctor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openclaw_doctor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d69bb6582270d83d783793759798ce3b9e5bdd05548d4b68ff3049be0ef3883
MD5 dd9095dcd3e705d7f9ea48997f85a862
BLAKE2b-256 4b82768e0495618d764c6e2055a83364820b8add2c9778c55bf77abd938ec51b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page