- Add .chezmoiroot to preserve stow structure - Add .chezmoiignore to exclude Linux-only packages on Windows - Add PowerShell scripts for path conversion and skills symlinks - Update README with Windows installation instructions - Tested: vim, agents, codex, claude, opencode configs work on Windows
51 lines
2.2 KiB
PowerShell
51 lines
2.2 KiB
PowerShell
# Создаёт симлинки skills на Windows
|
|
# Требует: Developer Mode или права администратора
|
|
|
|
$skillsSource = "$env:USERPROFILE\.agents\skills"
|
|
|
|
# Проверяем, скопированы ли агенты
|
|
if (-not (Test-Path $skillsSource)) {
|
|
Write-Warning "Source directory not found: $skillsSource"
|
|
Write-Warning "Make sure 'agents' package is applied first"
|
|
exit 1
|
|
}
|
|
|
|
# Проверяем возможность создавать симлинки
|
|
try {
|
|
$testLink = "$env:TEMP\test_symlink_$(Get-Random)"
|
|
New-Item -ItemType SymbolicLink -Path $testLink -Target $skillsSource -ErrorAction Stop | Out-Null
|
|
Remove-Item $testLink -Force
|
|
Write-Host "OK: Symlink permissions check passed"
|
|
} catch {
|
|
Write-Error "Cannot create symlinks. Please enable Developer Mode or run as Administrator."
|
|
Write-Error "See: https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development"
|
|
exit 1
|
|
}
|
|
|
|
# Claude
|
|
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude" | Out-Null
|
|
if (Test-Path "$env:USERPROFILE\.claude\skills") {
|
|
Remove-Item "$env:USERPROFILE\.claude\skills" -Force
|
|
}
|
|
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.claude\skills" -Target $skillsSource
|
|
Write-Host "Created: ~/.claude/skills -> ~/.agents/skills"
|
|
|
|
# Codex
|
|
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.codex\skills" | Out-Null
|
|
if (Test-Path "$env:USERPROFILE\.codex\skills\conventional-commits") {
|
|
Remove-Item "$env:USERPROFILE\.codex\skills\conventional-commits" -Force
|
|
}
|
|
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.codex\skills\conventional-commits" -Target "$skillsSource\conventional-commits"
|
|
Write-Host "Created: ~/.codex/skills/conventional-commits -> ~/.agents/skills/conventional-commits"
|
|
|
|
# Opencode
|
|
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.config\opencode" | Out-Null
|
|
if (Test-Path "$env:USERPROFILE\.config\opencode\skills") {
|
|
Remove-Item "$env:USERPROFILE\.config\opencode\skills" -Force
|
|
}
|
|
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.config\opencode\skills" -Target $skillsSource
|
|
Write-Host "Created: ~/.config/opencode/skills -> ~/.agents/skills"
|
|
|
|
Write-Host ""
|
|
Write-Host "Skills symlinks created successfully!"
|