@agegr/pi-web 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -6
- package/bin/pi-web.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,20 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
A web interface for the [pi coding agent](https://github.com/badlogic/pi-mono). Browse sessions, chat with the agent, fork conversations, and navigate message branches — all in the browser.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install
|
|
9
|
-
|
|
8
|
+
npm install -g @agegr/pi-web
|
|
9
|
+
pi-web
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Open [http://localhost:3030](http://localhost:3030).
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Set a custom port with the `PORT` environment variable:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
PORT=8080 pi-web
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Development Setup
|
|
15
21
|
|
|
16
22
|
```bash
|
|
17
|
-
npm
|
|
18
|
-
npm
|
|
23
|
+
npm install
|
|
24
|
+
npm run dev
|
|
19
25
|
```
|
|
20
26
|
|
|
21
27
|
Recommended: download a pre-configured working folder (with skills already set up) from https://github.com/agegr/working-chat/
|
package/bin/pi-web.js
CHANGED
|
@@ -6,7 +6,8 @@ const path = require("path");
|
|
|
6
6
|
const fs = require("fs");
|
|
7
7
|
|
|
8
8
|
const pkgDir = path.join(__dirname, "..");
|
|
9
|
-
const
|
|
9
|
+
const isWindows = process.platform === "win32";
|
|
10
|
+
const nextBin = path.join(pkgDir, "node_modules", ".bin", isWindows ? "next.cmd" : "next");
|
|
10
11
|
const nextDir = path.join(pkgDir, ".next");
|
|
11
12
|
const port = process.env.PORT || "3030";
|
|
12
13
|
|
|
@@ -19,6 +20,7 @@ const child = spawn(nextBin, ["start", "-p", port], {
|
|
|
19
20
|
cwd: pkgDir,
|
|
20
21
|
stdio: "inherit",
|
|
21
22
|
env: { ...process.env },
|
|
23
|
+
shell: isWindows,
|
|
22
24
|
});
|
|
23
25
|
|
|
24
26
|
child.on("exit", (code) => process.exit(code ?? 0));
|