Public/Start-PSModuleBrowser.ps1

function Start-PSModuleBrowser {
    <#
    .SYNOPSIS
    Starts the PSModuleBrowser terminal UI.
    .DESCRIPTION
    Launches an interactive terminal UI for browsing the PowerShell Gallery.
    The UI provides a split-pane layout with search, results list, and details.
 
    Keyboard shortcuts:
    - Type to search, then press Enter to execute the search
    - Up/Down arrows to navigate results
    - 1 to view details
    - 2 to install selected module
    - 3 to view available versions
    - 4 to view dependencies
    - 5 to preview exported commands
    - 6 to toggle exact search
    - 7 to cycle sort order
    - Escape to quit
    .PARAMETER InitialQuery
    Optional initial search query to pre-populate on launch.
    .PARAMETER Repository
    The repository to browse. Default is PSGallery.
    .EXAMPLE
    Start-PSModuleBrowser
    .EXAMPLE
    Start-PSModuleBrowser -InitialQuery "azure"
    #>

    [CmdletBinding()]
    param(
        [string]$InitialQuery = '',
        [string]$Repository = 'PSGallery'
    )

    try {
        Get-ModuleProvider | Out-Null
    } catch {
        $ErrorActionPreference = 'Continue'
        Write-Error "Cannot start PSModuleBrowser: $_"
        return
    }

    Show-ModuleSearchUI -InitialQuery $InitialQuery -Repository $Repository
}