47 lines
1.5 KiB
PowerShell
47 lines
1.5 KiB
PowerShell
# dsh-skills — shared DeepSeek Harness skills installer (Windows / PowerShell)
|
|
# Copies/updates the skills catalog into the DSH user skills directory.
|
|
<#
|
|
.SYNOPSIS
|
|
Installs or updates the shared dsh-skills catalog into $DSH_HOME\skills.
|
|
|
|
.DESCRIPTION
|
|
Syncs this repository's skills/ directory into the DSH skills root so
|
|
dsh-skill-filesystem discovers them. Defaults the DSH skills dir from
|
|
$env:DSH_HOME, else ~/.dsh. Accepts an explicit target dir.
|
|
|
|
.EXAMPLE
|
|
.\install.ps1
|
|
.\install.ps1 -Target C:\Users\me\.dsh\skills -Source clone
|
|
#>
|
|
[CmdletBinding()]
|
|
param(
|
|
[string]$Target,
|
|
[string]$SourceRoot = (Split-Path -Parent $PSScriptRoot)
|
|
)
|
|
|
|
function Get-DshSkillsDir {
|
|
param([string]$t)
|
|
if ($t) { return $t }
|
|
$home = $env:DSH_HOME
|
|
if (-not $home) { $home = Join-Path $env:USERPROFILE ".dsh" }
|
|
return (Join-Path $home "skills")
|
|
}
|
|
|
|
$target = Get-DshSkillsDir -t $Target
|
|
Write-Host "Skills target: $target"
|
|
New-Item -ItemType Directory -Force -Path $target -ErrorAction SilentlyContinue | Out-Null
|
|
|
|
$src = Join-Path $SourceRoot "skills"
|
|
if (-not (Test-Path $src)) {
|
|
Write-Error "skills/ directory not found at $src. Run from a repo clone."
|
|
exit 1
|
|
}
|
|
|
|
# Copy each skill bundle; preserve nested resources/scripts.
|
|
Get-ChildItem -Path $src -Directory | ForEach-Object {
|
|
$dest = Join-Path $target $_.Name
|
|
Write-Host "Syncing skill: $($_.Name)"
|
|
Copy-Item -Path $_.FullName -Destination $dest -Recurse -Force
|
|
}
|
|
|
|
Write-Host "Done. Skills installed to $target. Restart the agent to refresh the catalog." |