Skip to content

Files

Latest commit

0907ca5 · Feb 1, 2022

History

History
44 lines (27 loc) · 1.48 KB

README.md

File metadata and controls

44 lines (27 loc) · 1.48 KB

Pglet for PowerShell - quickly build interactive web apps in PowerShell

Pglet is a rich User Interface (UI) framework to quickly build interactive web apps in PowerShell without prior knowledge of web technologies like HTTP, HTML, CSS or JavaSscript. You build UI with controls which use 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
$page = Connect-PgletPage
$page.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:

Import-Module pglet
$page = Connect-PgletPage -Web
$page.Add((Text -Value "Hello, world!"))

This time page will be created on Pglet hosted service.

Read PowerShell tutorial for further information and more examples.