Functions/Sesio.ps1

# Import individual function files
. $PSScriptRoot\Ses\Sesio-Run.ps1
. $PSScriptRoot\Ses\Sesio-Arc.ps1
. $PSScriptRoot\Ses\Sesio-Config.ps1

# Main function to handle command-line arguments
function Sesio {
    param (
        [Parameter(Position=0, Mandatory=$true)]
        [string]$Command,
        
        [Parameter(ValueFromRemainingArguments=$true)]
        $RemainingArgs
    )

    switch ($Command.ToLower()) {
        "run" { Sesio-Run @RemainingArgs }
        "config" { Sesio-Config @RemainingArgs }
        "arc" { Sesio-Arc @RemainingArgs }
        "help" { Help }
        default { Write-Host "Unknown command: $Command" }
    }
}

function Help {
    Write-Host "$([char]0x1b)[32mSesio Help$([char]0x1b)[0m"
    Write-Host ""
    Write-Host "$([char]0x1b)[32mUsage:$([char]0x1b)[0m Sesio <command> [options]"
    Write-Host "$([char]0x1b)[32mCommands:$([char]0x1b)[0m"
    Write-Host "$([char]0x1b)[32m--------------------------------$([char]0x1b)[0m"
    Write-Host "$([char]0x1b)[31mrun$([char]0x1b)[0m - Run a Sesio project"
    Write-Host "$([char]0x1b)[31mconfig$([char]0x1b)[0m - Configure Sesio"
    Write-Host "$([char]0x1b)[31marc$([char]0x1b)[0m - Arc a Sesio project"
    Write-Host "$([char]0x1b)[31mhelp$([char]0x1b)[0m - Show help for a command"
    Write-Host "$([char]0x1b)[32m--------------------------------$([char]0x1b)[0m"   
}

# Export the main function
Export-ModuleMember -Function Sesio