PwshRichLite is a lightweight PowerShell module inspired by Python Rich. It renders simple rich console output using PowerShell-native $PSStyle.
PowerShell 7.4 or newer (pwsh).
Windows PowerShell 5.1 is not supported.
pwsh
Install-PSResource -Name PwshRichLite
Import-Module PwshRichLiteWrite-RichTree @{
Name = '[bold cyan]workspace[/]'
Children = @(
@{
Name = '[bold]PwshRichLite[/]'
Children = @(
@{
Name = '[blue]Public[/]'
Children = @(
@{ Name = 'Write-RichTable.ps1' }
@{ Name = 'Write-RichTree.ps1' }
@{ Name = 'Write-RichPanel.ps1' }
)
}
@{
Name = '[magenta]Private[/]'
Children = @(
@{ Name = 'ConvertFrom-RichMarkup.ps1' }
@{ Name = 'Get-DisplayWidth.ps1' }
)
}
)
}
@{
Name = '[yellow]tests[/]'
Children = @(
@{ Name = 'PwshRichLite.Tests.ps1' }
@{ Name = 'PwshRichLite.Integration.Tests.ps1' }
)
}
)
}@(
[pscustomobject]@{
Component = '[bold]Tree[/]'
Status = '[green]improved[/]'
Detail = 'Unicode guides with ASCII fallback'
}
[pscustomobject]@{
Component = '[bold]Table[/]'
Status = '[green]improved[/]'
Detail = 'Rich-style borders and title support'
}
[pscustomobject]@{
Component = '[bold]Markup[/]'
Status = '[cyan]stable[/]'
Detail = 'Column widths ignore ANSI sequences'
}
[pscustomobject]@{
Component = '[bold]Links[/]'
Status = '[green]new[/]'
Detail = '[link=https://github.com/]Open repository[/]'
}
) | Write-RichTable -Property Component, Status, Detail -Title 'Rendering capabilities'Write-RichText '[bold cyan]PwshRichLite[/] [dim]uses $PSStyle[/]'
Write-RichPanel '[green]Build passed[/]' -Title 'Status'
@(
[pscustomobject]@{ Name = 'api'; State = 'ready' }
[pscustomobject]@{ Name = 'web'; State = 'ready' }
) | Write-RichTable -Property Name, State -Title 'Services'
Write-RichRule 'Deploy'
Write-RichTree @{
Name = '[bold]root[/]'
Children = @(
@{ Name = 'src'; Children = @() }
@{ Name = 'tests'; Children = @() }
)
}Rich-like object API:
$text = New-RichText 'Hello' -Style 'bold'
Add-RichText $text ', ' -Style 'dim'
Add-RichText $text 'World' -Style 'cyan'
Write-RichText $text
$table = New-RichTable
Add-RichTableColumn $table 'Name'
Add-RichTableColumn $table 'State'
Add-RichTableRow $table 'api', 'ready'
Add-RichTableRow $table 'web', 'deploy'
Write-RichTable $table
$tree = New-RichTree '[bold]root[/]'
$src = Add-RichTreeNode $tree 'src' -PassThru
Add-RichTreeNode $src 'app.ps1'
Write-RichTree $tree
$panel = New-RichPanel $text -Title 'Greeting'
Write-RichPanel $panel
$rule = New-RichRule 'Build'
Write-RichRule $ruleTables use Rich-style Unicode borders by default. Use -Box Ascii when you
need plain ASCII output. Trees use Unicode guide lines by default; use -Ascii
for legacy terminals.
Screenshot-friendly demo:
pwsh ./examples/Show-RichDemo.ps1Use -NoColor to force plain text for one call:
Write-RichText '[red]plain[/]' -NoColorThe module respects $PSStyle.OutputRendering and NO_COLOR without changing global rendering preferences.
Install local Git hooks:
./scripts/Install-GitHooks.ps1The pre-commit hook scans staged changes with Gitleaks. It uses a local
gitleaks binary when available and falls back to Docker.
Check the runtime:
pwsh --versionRun tests:
pwsh ./scripts/Test-Module.ps1Build the publishable module folder:
pwsh ./scripts/Build-Module.ps1PwshRichLite v0.1.0 intentionally supports a small markup vocabulary:
bold, dim, italic, underline, black, red, green, yellow, blue, magenta, cyan, white.
These map directly to $PSStyle values.

