Skip to content

pglet/pglet-powershell

Repository files navigation

Pglet client for PowerShell

Pglet ("piglet") is a rich user interface (UI) framework for scripts written in PowerShell or any other language. Pglet renders web UI, so you can easily build web apps with PowerShell. Knowledge of HTML/CSS/JavaScript is not required as you build UI with controls. Pglet controls are built with Fluent UI React to ensure your programs look cool and professional.

Requirements

  • Windows PowerShell 5.1
  • PowerShell Core 7 on Windows, Linux or macOS

Installation

Install pglet module from PowerShell Gallery:

Install-Module pglet

Hello, world!

Create a new hello.ps1 with the following content:

Import-Module pglet
Connect-PgletPage
Invoke-Pglet "add text value='Hello, world!'"

Run hello.ps1 in your PowerShell session and in a new browser window you'll get:

Sample app in a browser

Here is a local page served by an instance of Pglet server started in the background on your computer.

Make it web

Add -Web parameter to Connect-PgletPage call:

Connect-PgletPage -Web
Invoke-Pglet "add text value='Hello, world!'"

This time page will be created on Pglet hosted service.

Read PowerShell tutorial for further information and more examples.

About

Pglet for PowerShell - quickly build interactive web apps in PowerShell

Resources

License

Stars

Watchers

Forks

Packages

No packages published