Skip to content

Commit 0f651a2

Browse files
committed
Update README.md
1 parent f96e452 commit 0f651a2

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

README.md

+47-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,47 @@
1-
# pglet-bash
2-
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+
![Sample app in a browser](https://pglet.io/img/docs/quickstart-hello-world.png "Sample app in a browser")
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

Comments
 (0)