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:
+6
-4
@@ -65,7 +65,9 @@ whitespace to `read`, so empty fields merge and later columns shift. Use `cut`
|
||||
|
||||
**Windows PowerShell 5.1.** No `?:` or `??`; `"$id:latest"` parses as a
|
||||
drive-qualified variable, so write `"${id}:latest"`. The `.ps1` files are ASCII
|
||||
only, because 5.1 reads a file without a BOM in the ANSI codepage.
|
||||
only, because 5.1 reads a file without a BOM in the ANSI codepage. In the
|
||||
`lib/*.ps1` modules `$PSScriptRoot` is `lib\`: reach anything beside
|
||||
`claude-mode.ps1` through `$script:Here`.
|
||||
|
||||
**Files are LF everywhere**, `.ps1` and `.cmd` included (`.gitattributes`,
|
||||
`.editorconfig`).
|
||||
@@ -112,8 +114,8 @@ unit test that pins it.
|
||||
3. Commit.
|
||||
4. Install on your own machine: `bash linux/install.sh`, `bash omarchy/install.sh`,
|
||||
`omarchy restart shell`, and look at the bar.
|
||||
5. Push. The Windows package is built on a Windows machine with
|
||||
`scripts/build-package.ps1`, which refuses to package a script that does not
|
||||
parse.
|
||||
5. Push. Both installers fetch the repository's own archive (`install.ps1` piped
|
||||
through `iex`, `linux/install.sh` through `curl | bash`), so a push to `master`
|
||||
is the release.
|
||||
|
||||
Semver: a minor version adds behaviour, a patch fixes it.
|
||||
|
||||
Reference in New Issue
Block a user