forked from AgriciDaniel/claude-seo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
122 lines (103 loc) · 4.08 KB
/
Copy pathinstall.ps1
File metadata and controls
122 lines (103 loc) · 4.08 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Codex SEO Installer for Windows
# PowerShell installation script
$ErrorActionPreference = "Stop"
Write-Host "════════════════════════════════════════" -ForegroundColor Cyan
Write-Host "║ Codex SEO - Installer ║" -ForegroundColor Cyan
Write-Host "║ Codex CLI SEO Skill ║" -ForegroundColor Cyan
Write-Host "════════════════════════════════════════" -ForegroundColor Cyan
Write-Host ""
# Check prerequisites
try {
$pythonVersion = python --version 2>&1
Write-Host "✓ $pythonVersion detected" -ForegroundColor Green
} catch {
Write-Host "✗ Python is required but not installed." -ForegroundColor Red
exit 1
}
try {
git --version | Out-Null
Write-Host "✓ Git detected" -ForegroundColor Green
} catch {
Write-Host "✗ Git is required but not installed." -ForegroundColor Red
exit 1
}
# Set paths
$CodexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { "$env:USERPROFILE\.codex" }
$SkillDir = Join-Path $CodexHome "skills\seo"
$AgentDir = Join-Path $CodexHome "agents"
$RepoUrl = "https://github.com/kylewhirl/codex-seo"
# Create directories
New-Item -ItemType Directory -Force -Path $SkillDir | Out-Null
New-Item -ItemType Directory -Force -Path $AgentDir | Out-Null
# Clone to temp directory
$TempDir = Join-Path $env:TEMP "codex-seo-install"
if (Test-Path $TempDir) {
Remove-Item -Recurse -Force $TempDir
}
Write-Host "↓ Downloading Codex SEO..." -ForegroundColor Yellow
git clone --depth 1 $RepoUrl $TempDir 2>$null
# Copy skill files
Write-Host "→ Installing skill files..." -ForegroundColor Yellow
Copy-Item -Recurse -Force "$TempDir\seo\*" $SkillDir
# Copy sub-skills
$SkillsPath = "$TempDir\skills"
if (Test-Path $SkillsPath) {
Get-ChildItem -Directory $SkillsPath | ForEach-Object {
$target = Join-Path $CodexHome "skills\$($_.Name)"
New-Item -ItemType Directory -Force -Path $target | Out-Null
Copy-Item -Recurse -Force "$($_.FullName)\*" $target
}
}
# Copy schema templates
$SchemaPath = "$TempDir\schema"
if (Test-Path $SchemaPath) {
$SkillSchema = "$SkillDir\schema"
New-Item -ItemType Directory -Force -Path $SkillSchema | Out-Null
Copy-Item -Recurse -Force "$SchemaPath\*" $SkillSchema
}
# Copy reference docs
$PdfPath = "$TempDir\pdf"
if (Test-Path $PdfPath) {
$SkillPdf = "$SkillDir\pdf"
New-Item -ItemType Directory -Force -Path $SkillPdf | Out-Null
Copy-Item -Recurse -Force "$PdfPath\*" $SkillPdf
}
# Copy agents
Write-Host "→ Installing subagents..." -ForegroundColor Yellow
Copy-Item -Force "$TempDir\agents\*.md" $AgentDir 2>$null
# Copy shared scripts
$ScriptsPath = "$TempDir\scripts"
if (Test-Path $ScriptsPath) {
$SkillScripts = "$SkillDir\scripts"
New-Item -ItemType Directory -Force -Path $SkillScripts | Out-Null
Copy-Item -Recurse -Force "$ScriptsPath\*" $SkillScripts
}
# Copy hooks
$HooksPath = "$TempDir\hooks"
if (Test-Path $HooksPath) {
$SkillHooks = "$SkillDir\hooks"
New-Item -ItemType Directory -Force -Path $SkillHooks | Out-Null
Copy-Item -Recurse -Force "$HooksPath\*" $SkillHooks
}
# Install Python dependencies
Write-Host "→ Installing Python dependencies..." -ForegroundColor Yellow
try {
pip install -q -r "$TempDir\requirements.txt" 2>$null
} catch {
Write-Host "⚠ Could not auto-install Python packages. Run: pip install -r requirements.txt" -ForegroundColor Yellow
}
# Optional: Install Playwright browsers
Write-Host "→ Installing Playwright browsers (optional)..." -ForegroundColor Yellow
try {
python -m playwright install chromium 2>$null
} catch {
Write-Host "⚠ Playwright browser install failed. Screenshots won't work." -ForegroundColor Yellow
}
# Cleanup
Remove-Item -Recurse -Force $TempDir
Write-Host ""
Write-Host "✓ Codex SEO installed successfully!" -ForegroundColor Green
Write-Host ""
Write-Host "Usage:" -ForegroundColor Cyan
Write-Host " 1. Start Codex CLI: codex"
Write-Host " 2. Run commands: `$seo-audit https://example.com"