Repository navigation
Description
Epic: Lore Package Development (#74) · Plan of record: lore-package-development.md
The package
packages/powershell (aliases: pwsh) installs PowerShell 7, then, as a step after the install, the PowerShell modules a machine needs, each at the version its manifest pins. The use case, the owner's of 2026-10-20: a lore package for PowerShell "and include a post install step for installing specific modules". The manifest is where every version is pinned, as the owner designed packages-manifest.yaml: "a one-stop spot for pinning packages. it is the same idea as go.mod."
Why this package exists
Found 2026-10-20, in NobleFactor/devlore-cli#670's analysis (lane 34 of NobleFactor/devlore-cli#949): a developer's machine and CI each get PowerShell and its modules their own way, and nothing holds the two together.
- A developer's machine. personal's profile installs PSScriptAnalyzer on demand, the newest version at that moment, in interactive sessions only (
Install-Module PSScriptAnalyzer -Scope CurrentUser, David-Noble-at-work/personal#207). pwsh itself was a tarball unpacked by hand. - CI. Each repository's workflow runs
Install-Module PSScriptAnalyzer -RequiredVersion 1.25.0on every run, from a fresh home, against the runner image's own pwsh. - They agree today on 1.25.0 by coincidence. A newer release, on a machine set up later, lints locally with a different analyzer than CI's.
One package, pinned in one manifest, installs the same PowerShell and the same modules wherever it runs: a developer's machine, a new one, and CI.
The module step
Install-PSResource, notInstall-Module. PSResourceGet, the successor to PowerShellGet, ships with PowerShell 7.4 and later, with PSGallery registered:Install-PSResource -Name <module> -Version <pinned> -Repository PSGallery -TrustRepository -Scope CurrentUser.Install-Moduleis PowerShellGet v2, the older route; it is what failed in fix(install): install.ps1 knows whether a new terminal would run what it installed, and says only what is so devlore-cli#1108's CI,Set-PSRepository: No repository with the name 'PSGallery' was found(the runner's, it appears, since a rerun passed).- winget does not install modules. It installs applications, PowerShell itself among them (
Microsoft.PowerShell), but has no PSGallery source: on danoble-wd11-3,winget search PSScriptAnalyzerandwinget search posh-gitfind nothing. - Idempotent. A module already installed at the pinned version is left alone; at another version, the pinned one is installed beside it, and which one loads is stated.
- The first modules: PSScriptAnalyzer at the version CI pins, 1.25.0 today; posh-git, which the same profile installs on demand.
Platform install story
To research and verify at build, each claim with its source, as the authoring process requires:
- Windows: winget,
Microsoft.PowerShell(the id, not the monikerpwsh, as The team layer's Windows packages-manifest.yaml names pwsh, a winget moniker, where the driver needs the id Microsoft.PowerShell devlore-cli#818 found). - Darwin: Homebrew's
powershellcask, or MacPorts; which is the ruling is the owner's. - Linux: Microsoft's package repository for Debian and Ubuntu, or the release tarball, as DANOBLE-UD24-1's pwsh 7.4.6 is today (
/opt/local/share/powershell). - Windows PowerShell 5.1 ships with Windows and is not this package's. Its modules come through
Install-Modulealone, unless PSResourceGet is installed into it from the gallery. Whether the package serves 5.1's modules too is an open question.
Open questions, the owner's
- Where the module pins live: in the package's manifest, or in the
packages-manifest.yamlthat names the package, as a layer's own pins (one PowerShell package, each layer its own modules). - Scope:
CurrentUser, as the profile and CI install today, orAllUsers. - Whether a profile's on-demand installs go once this package installs the same modules at pinned versions.
- Whether CI deploys this package to get its analyzer, so that CI and a developer's machine run one definition (CI must be a strict superset of the local checks devlore-cli#670, item 2).
Activity
David-Noble-at-work commentedon Nov 9, 2026
star github triage sweep added this issue to Triage: devlore, for the rule it breaks:
no-evidence: no Evidence of completion section