Central PowerShell module hub with a local web portal for discovering, importing, and invoking commands across your private modules.
- One place to register and manage internal PowerShell modules
- Local browser portal for command discovery and execution
- CLI-first workflow with exported functions and a short alias
- JSON-based settings and module registry with local override support
- PowerShell 7.2 or newer
- Windows, macOS, or Linux
# From the repository root
Import-Module .\Nexus.psd1 -Force
# Start the portal (browser opens by default)
Start-Nexus
# Alias for Start-Nexus
opsTip
Use Start-Nexus -Scan to discover modules from configured scan roots during startup.
If you want Nexus to start automatically whenever you open PowerShell, use the built-in helper command:
# From the repository root
Import-Module .\Nexus.psd1 -Force
# All hosts (Windows Terminal, VS Code terminal, etc.)
Enable-NexusAutoStart
# Or VS Code terminal only
Enable-NexusAutoStart -Scope CurrentHostThis writes an idempotent profile block that starts Nexus in a background PowerShell process only when Nexus is not already running.
Use CurrentUserAllHosts so it runs in Windows Terminal, VS Code terminal, and other hosts.
if (!(Test-Path $PROFILE.CurrentUserAllHosts)) {
New-Item -ItemType File -Path $PROFILE.CurrentUserAllHosts -Force | Out-Null
}
notepad $PROFILE.CurrentUserAllHostsAdd this to the opened profile file:
# Auto-start Nexus once if not already running
$nexusRoot = "<path-to-your-nexus-repo>"
$modulePath = Join-Path $nexusRoot "Nexus.psd1"
if (Test-Path $modulePath) {
$alreadyRunning = $false
try {
$null = Invoke-RestMethod -Uri "http://localhost:8090/api/health" -TimeoutSec 1
$alreadyRunning = $true
} catch {
$alreadyRunning = $false
}
if (-not $alreadyRunning) {
$cmd = "Import-Module '$modulePath' -Force; Start-Nexus -NoBrowser"
Start-Process pwsh -WindowStyle Hidden -ArgumentList "-NoLogo", "-NoProfile", "-Command", $cmd | Out-Null
}
}Use CurrentUserCurrentHost instead:
if (!(Test-Path $PROFILE.CurrentUserCurrentHost)) {
New-Item -ItemType File -Path $PROFILE.CurrentUserCurrentHost -Force | Out-Null
}
notepad $PROFILE.CurrentUserCurrentHostPaste the same auto-start block into that profile.
Start-Nexusis a blocking listener, so starting it in a separate process keeps your current terminal usable.- Remove
-NoBrowserif you want the portal tab to open automatically on startup. - If you changed
defaultPortin settings, update the health URL accordingly.
Nexus runs module commands in isolated execution contexts so modules can keep their own authentication state and avoid DLL conflicts.
- Most modules run in a persistent runspace for faster repeated execution.
- Modules that depend on conflicting ecosystems such as Microsoft Graph, Exchange Online, or Teams are automatically moved to process isolation.
- Async commands return immediately with a job id, and the portal polls job status until the result is ready.
- Only one async command can run at a time for a given module runspace to avoid pipeline collisions.
You can inspect async job progress through the portal API:
GET /api/jobs/{id}
| Command | Description |
|---|---|
Start-Nexus |
Start the local Nexus HTTP listener and portal |
Stop-Nexus |
Stop the running Nexus listener |
Enable-NexusAutoStart |
Add/update a profile block to auto-start Nexus when PowerShell launches |
Get-OpsModule |
List modules in the registry |
Import-OpsModule |
Import a registered module |
Get-OpsCommand |
List and search commands across registered modules |
Invoke-OpsCommand |
Invoke a registered command with parameters |
Register-OpsModule |
Register a module path and metadata |
Unregister-OpsModule |
Remove a module from the registry |
Update-OpsRegistry |
Scan and synchronize registry entries |
Nexus reads configuration from:
Config/settings.json(portal behavior, ports, scan settings)Config/modules.json(module registry)
Local overrides are supported and take precedence when present:
Config/settings.local.jsonConfig/modules.local.json
Common defaults include:
defaultPort:8090portRange:8090-8099openBrowserOnStart:truescanOnStartup:false
# Run analyzer + tests + build
.\build.ps1 -Task CI
# Individual tasks
.\build.ps1 -Task Analyze
.\build.ps1 -Task Test
.\build.ps1 -Task Build
.\build.ps1 -Task CleanPublic/ Exported user commands
Private/ Internal implementation
Assets/ Portal UI (HTML/CSS/JS)
Config/ Settings and module registry
Tests/ Pester test suite
Robin Pieterse (Turrito Networks)