PowerShell Module Guide

This document covers the Jumpshell PowerShell module architecture after the source move to src/pwsh.

Import Paths

Import-Module .\Jumpshell.psd1 -Force

Installed module path

Import-Module Jumpshell -Force

Root Compatibility Shims

  • Jumpshell.psd1 points root module loading at src/pwsh/Jumpshell.psm1.
  • Jumpshell.psm1 imports src/pwsh/Jumpshell.psd1.
  • Install.ps1 at root is now extension-focused and calls extensions/Install.ps1.

Source Module Layout

  • Source manifest: src/pwsh/Jumpshell.psd1
  • Source loader: src/pwsh/Jumpshell.psm1
  • Feature scripts: src/pwsh/*.ps1
  • Installer internals: src/pwsh/Install/*
  • MCP integration: src/pwsh/Mcp.ps1, src/pwsh/mcp/*
  • VS Code tooling: src/pwsh/vscode/*

Module Load Flow

On import, src/pwsh/Jumpshell.psm1:

  1. Sets source/repo globals:
    • JumpshellSourcePath
    • JumpshellRepoRoot
    • JumpshellPath
  2. Dot-sources .ps1 scripts in deterministic order.

  3. Scans loaded scripts to build Jumpshell_FunctionFileMap.

  4. Exports public functions and aliases.

  5. Runs profile setup and attempts MCP autostart.

Install and Update Flows

Module dependency installer

Use source installer for module concerns:

pwsh ./src/pwsh/Install.ps1 -Skills -Modules -Applications -Mcps

Flags:

  • -Skills
  • -Modules
  • -Applications
  • -Mcps
  • -NoPull

Extension installer

Root Install.ps1 is for extension install workflow:

pwsh ./Install.ps1 -Build

Skills and Python Backends

Module skill installation links top-level skills/* into:

  • ~/.agents/skills

The VS Code/Cursor extension can also install/update bundled ai-backends Python source when skills are installed.

MCP Integration in Module

src/pwsh/Mcp.ps1 provides:

  • Get-JumpshellMcp
  • Install-JumpshellMcp
  • Start-JumpshellMcpServer
  • Stop-JumpshellMcpServer

Canonical scripts resolve under src/pwsh/mcp.

Useful Verification Commands

# Confirm source-root import path
Import-Module .\Jumpshell.psd1 -Force
(Get-Module Jumpshell).Path

# Confirm MCP script resolution
Get-JumpshellMcp | Format-List ModuleRoot,ServerScript

# List exported functions
Get-Command -Module Jumpshell | Sort-Object Name