You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bash bindings for Pglet - easily build interactive web apps in Bash
1
+
# Pglet client for Bash
2
+
3
+
[Pglet](https://pglet.io) (*"piglet"*) is a rich user interface (UI) framework for scripts written in PowerShell or any other language.
4
+
Pglet renders web UI, so you can easily [build web apps](https://pglet.io/docs/quickstart) with Bash.
5
+
Knowledge of HTML/CSS/JavaScript is not required as you build UI with [controls](https://pglet.io/docs/reference/controls). Pglet controls are built with [Fluent UI React](https://developer.microsoft.com/en-us/fluentui#/controls/web) to ensure your programs look cool and professional.
6
+
7
+
## Requirements
8
+
9
+
* Bash, Zsh on Linux or macOS. Windows is not supported.
10
+
11
+
## Installation
12
+
13
+
Download `pglet.sh` helper script from our website:
14
+
15
+
curl -O https://pglet.io/pglet.sh
16
+
17
+
## Hello, world!
18
+
19
+
Create `hello.sh` with the following content:
20
+
21
+
```bash
22
+
. pglet.sh
23
+
24
+
pglet_page
25
+
pglet_send "add text value='Hello, world!'"
26
+
```
27
+
28
+
Run `sh hello.psh` and in a new browser window you'll get:
29
+
30
+

31
+
32
+
Here is a local page served by an instance of Pglet server started in the background on your computer.
33
+
34
+
## Make it web
35
+
36
+
Add `PGLET_WEB=true` before `pglet_page` call:
37
+
38
+
```posh
39
+
. pglet.sh
40
+
41
+
PGLET_WEB=true pglet_page
42
+
pglet_send "add text value='Hello, world!'"
43
+
```
44
+
45
+
This time page will be created on [Pglet hosted service](https://pglet.io/docs/pglet-service).
46
+
47
+
Read [Bash tutorial](https://pglet.io/docs/tutorials/bash) for further information and more examples.
0 commit comments