-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhealth-check.sh
More file actions
executable file
·60 lines (52 loc) · 1.5 KB
/
Copy pathhealth-check.sh
File metadata and controls
executable file
·60 lines (52 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
echo "=== OpenClaw Workspace Health Check ==="
echo "Date: $(date)"
echo
# 1. Workspace integrity
echo "1. Workspace Integrity:"
if [ -d ~/.openclaw/workspace ]; then
echo " ✓ Workspace directory exists"
else
echo " ✗ Workspace directory missing"
fi
# 2. Core files check
echo "2. Core Files:"
for file in AGENTS.md SOUL.md USER.md IDENTITY.md TOOLS.md; do
if [ -f ~/.openclaw/workspace/$file ]; then
echo " ✓ $file exists"
else
echo " ✗ $file missing"
fi
done
# 3. Git repository health
echo "3. Git Repository:"
cd ~/.openclaw/workspace
if git rev-parse --git-dir > /dev/null 2>&1; then
echo " ✓ Git repository initialized"
# Check for uncommitted changes
if git diff --quiet; then
echo " ✓ No uncommitted changes"
else
echo " ⚠ Uncommitted changes present"
fi
# Check remote connectivity
if git fetch --dry-run > /dev/null 2>&1; then
echo " ✓ Remote repository accessible"
else
echo " ✗ Cannot reach remote repository"
fi
else
echo " ✗ Git repository not initialized"
fi
# 4. Disk space
echo "4. Disk Space:"
WORKSPACE_SIZE=$(du -sh ~/.openclaw/workspace | cut -f1)
echo " Workspace size: $WORKSPACE_SIZE"
# 5. Recent activity
echo "5. Recent Activity:"
if [ -f ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md ]; then
echo " ✓ Today's memory file exists"
else
echo " ⚠ Today's memory file not created"
fi
echo "=== Health Check Complete ==="