Split the Windows script into modules; drop the Arkylx Index pieces

claude-mode.ps1 was 2,407 lines. It is now 153: the help block, parameters,
paths, the managed-key list, a loader, and the dispatch. The rest moved,
verbatim, into eleven files under lib/ - providers, output, files, core,
vault, switch, guards, health, catalogue, commands, menu - dot-sourced into
the script's scope in their original order, with the same check as the bash
split that every original line landed in exactly one file. Inside a module
$PSScriptRoot is lib\, so the one path beside the main script
(providers.json) now goes through $script:Here.

install.ps1 ships lib\, clearing old modules first. The Windows suite
parses every module and install.ps1 (36 checks, all green on Windows
PowerShell 5.1); install.ps1 is parsed but never run, since it edits the
real profile and User PATH.

linux/bootstrap.sh and scripts/build-package.ps1 existed only to build and
serve packages for the Arkylx Index. Both installers fetch the repository's
own archive, so a push to master is the release; the two scripts, the dist/
ignore and their mentions in the docs are gone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
smoido
2026-09-15 02:06:45 +03:00
co-authored by Claude Opus 5
parent 441166d003
commit 4091746d4e
21 changed files with 2421 additions and 2527 deletions
+6
View File
@@ -85,6 +85,12 @@ try {
# --- 2. scripts -------------------------------------------------------------
Copy-Item -LiteralPath (Join-Path $src 'claude-mode.ps1') -Destination $root -Force
# The script's modules, dot-sourced from lib\ beside it. Cleared first, so a
# module removed from the source does not linger and get loaded.
$libDest = Join-Path $root 'lib'
New-Item -ItemType Directory -Path $libDest -Force | Out-Null
Remove-Item -Path (Join-Path $libDest '*.ps1') -Force -ErrorAction SilentlyContinue
Copy-Item -Path (Join-Path $src 'lib\*.ps1') -Destination $libDest -Force
# claude-mode reads VERSION from its own directory to stamp health.json.
if (Test-Path -LiteralPath (Join-Path $src 'VERSION')) {
Copy-Item -LiteralPath (Join-Path $src 'VERSION') -Destination $root -Force