From a blank slate to a production-ready PowerShell module -> with CI/CD, versioning, release notes and publishing sorted, up and running in minutes
PowerShell modules are the standard way to package and share reusable PowerShell code, but building and iterating modules with a consistent structure, versioning, tests, and a publishing pipeline involves a lot of moving parts.
ModuleForge is a scaffolding and build tool that takes the grunt work out of PowerShell module development. Stop copy-pasting boilerplate, wrestling with versioning, or hand-rolling CI pipelines. ModuleForge handles the infrastructure so you can focus on writing great code.
π¦ Install from PowerShell Gallery
π Read the Full Documentation
Install-PSResource -Name ModuleForgeOther ecosystems made this effortless years ago: one command scaffolds a React app, and well-run Terraform projects tag and version everything automatically. PowerShell development deserves the same DevOps niceties. ModuleForge brings them in a single, opinionated toolchain for structure, versioning, changelogs, testing, and publishing, that gets out of your way once you're up and running.
Read the full rationale in Why ModuleForge Exists.
Spin up a standardised, ready-to-build module structure in seconds. No more blank-page paralysis or inconsistent project layouts across your team.
Add production-grade pipelines with full feature parity across both platforms:
- Pester tests are hard-fail -> broken code doesn't ship
- Code coverage is soft-fail -> tracked without blocking releases
- PSScriptAnalyzer runs in advisory mode -> keeping your code clean without the noise
- Auto-generated PR comments surface lint and test results directly in your review workflow
Auto-Applied tagging tracks build versions so you don't have to, including pre-release support for staging and beta builds.
Commit prefixes (feat:, fix:, chore:, etc.) drive automatic changelog creation and GitHub Packages release notes -> no manual changelog maintenance required.
Publish to GitHub Packages or Azure DevOps Artifacts feeds for personal projects or testing, and one-click publish to PSGallery when you're ready. Options for whatever fits your workflow and requirements
Built for modern PowerShell, including enumerators, classes, and advanced language constructs. Classes, enumerators, complex dependencies -> if PowerShell supports it, ModuleForge handles it.
graph TD
A[π Start a New PowerShell Module] --> B[π» Code Your Functions]
B --> C[π Test Locally]
C --> D[πΎ Commit & Open a PR]
D --> E
subgraph "CI βοΈ"
E[π§ͺ Pester Tests & PSScriptAnalyzer]
end
E -->|Fail| B
E -->|Pass| F[π Review & Merge]
F --> G
subgraph "CD π"
G[π·οΈ Build & Release Version]
G --> H[π€ Deploy & Publish]
end
H --> B
ModuleForge was built around a clear set of principles:
| Goal | What It Means |
|---|---|
| Minimal config | PowerShell CI/CD that just works |
| Standardised setup | Fast, consistent module scaffolding every time |
| Cross-platform | Fully OS agnostic; Windows, macOS, Linux |
| Semantic versioning | Easy pre-release support and version incrementing |
| Orchestrator agnostic | Works with GitHub Actions, Azure DevOps, or your own tooling |
| Modern stack | PowerShell 7+, Pester, and PSResourceGet |
| Scalable | Handles simple scripts and complex multi-dependency modules alike |
ModuleForge can map the call relationships between your module's source files and render them in the terminal or as a Mermaid flowchart. Run it from your project root:
Get-MFDependencyTreeUseful for:
- Writing Pester tests -> see exactly which private functions a public function calls so you can dot-source the right dependencies in
BeforeAll - Load order -> identify which classes or private helpers must resolve before a function, informing what goes in
ScriptsToProcessorNestedModules - Spotting circular dependencies -> cycles are immediately visible in the flowchart before they cause a build failure
- Living architecture docs -> embed the output directly in a README or docs page and it stays current with the code
For quick local inspection without leaving the terminal (truncated):
.\source\functions\build\Invoke-MFBuildPreRelease.ps1
>--DEPENDS-ON--> .\source\functions\build\Build-MFProject.ps1
>--DEPENDS-ON--> .\source\functions\build\Get-MFFolderItemDetails.ps1
>--DEPENDS-ON--> .\source\functions\build\Get-MFFolderItems.ps1
>--DEPENDS-ON--> .\source\private\common\Get-MFProjectRoot.ps1
Add -OutputType MermaidMarkdown to embed directly in docs -> GitHub renders it inline (truncated):
flowchart TD
'.\source\functions\build\Invoke-MFBuildPreRelease.ps1' --> '.\source\functions\build\Build-MFProject.ps1'
'.\source\functions\build\Invoke-MFBuildPreRelease.ps1' --> '.\source\private\common\Get-MFProjectRoot.ps1'
'.\source\functions\build\Build-MFProject.ps1' --> '.\source\functions\build\Get-MFFolderItemDetails.ps1'
'.\source\functions\build\Build-MFProject.ps1' --> '.\source\functions\build\Get-MFFolderItems.ps1'
'.\source\functions\build\Get-MFFolderItemDetails.ps1' --> '.\source\functions\build\Get-MFFolderItems.ps1'
'.\source\functions\docs\Write-MFModuleDocs.ps1' --> '.\source\private\docs\ConvertTo-MFNavTitle.ps1'
'.\source\functions\docs\Write-MFModuleDocs.ps1' --> '.\source\private\docs\Get-MFH1FromFile.ps1'
'.\source\functions\scaffold\New-MFProject.ps1' --> '.\source\private\scaffold\Add-MFFilesAndFolders.ps1'
Install ModuleForge, scaffold a project, and wire up CI/CD in three commands:
Install-PSResource -Name ModuleForge
New-MFProject -ModuleName 'MyModule' -Description 'What my module does'
Add-MFGithubScaffold # or Add-MFAzureDevOpsScaffoldCommit the scaffold to your default branch and you have a module that builds, tests, and releases itself. Full tutorials, function reference, and examples are available in the ModuleForge documentation.
Issues and PRs welcome. Please see CONTRIBUTING.md for guidelines.


