LocalModules simplifies the installation of PowerShell modules under development on your local machine that are not yet ready for publishing, streamlining the development and testing process.
The minimal file structure for a PowerShell module in development is as follows:
DevModulesFolder/
|_ _ DevModuleName/ # Folder containing the module files
|_ _ DevModuleName.psm1 # Module script file.
- Creates and manages a local repository behind the scene (
Developing
). - Generates a minimal module manifest if one is not already provided.
- Removes all traces of the previously installed version before installing the latest edited version.
- Lists only installed development modules.
- PowerShell 5.1 or later.
- Administrator privileges may be required for certain actions.
Install LocalModules from Powershell Gallery.
Install-Module -Name LocalModules
Before using LocalModules
, configure the path to the folder containing your development modules:
- Locate the configuration file:
$env:APPDATA\LocalModules\config.json
- Edit
config.json
and specify the folder containing your modules:{ "DevModulesPath": "C:\\Path\\To\\Your\\Development\\Modules" }
- Install a module from your development path:
Install-DevModule -Name "DevModuleName"
- List all modules installed from
Developing
repository:
Get-InstalledDevModule
This module is inspired by Marc-André Moreau's article on setting up a local PowerShell repository.
Feel free to contribute by submitting issues or pull requests to improve functionality and documentation.