@agegr/pi-web 0.5.10 → 0.5.11
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/app/{page-b9e5bf6d91635d5e.js → page-3e442ce10c344e57.js} +1 -1
- package/.next/trace +3 -3
- package/.next/trace-build +1 -1
- package/README.md +7 -21
- package/bin/pi-web.js +17 -3
- package/package.json +1 -1
- /package/.next/static/{EehMtVKtJmWxkN2_Js-MZ → nuW1g6qKr1DFpxi5JDM9k}/_buildManifest.js +0 -0
- /package/.next/static/{EehMtVKtJmWxkN2_Js-MZ → nuW1g6qKr1DFpxi5JDM9k}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -2,37 +2,23 @@
|
|
|
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
|
-
##
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx @agegr/pi-web@latest
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Open [http://localhost:30141](http://localhost:30141).
|
|
12
|
-
|
|
13
|
-
The package ships with prebuilt Next.js artifacts, so `npx` can launch it directly — no local build step needed.
|
|
14
|
-
|
|
15
|
-
> The `@latest` tag bypasses npx's local cache and ensures you always run the newest published version. Omit it (`npx @agegr/pi-web`) to reuse whatever version is already cached.
|
|
16
|
-
|
|
17
|
-
## Global install (optional)
|
|
18
|
-
|
|
19
|
-
If you want a permanent `pi-web` command on your PATH:
|
|
5
|
+
## Installation
|
|
20
6
|
|
|
21
7
|
```bash
|
|
22
8
|
npm install -g @agegr/pi-web
|
|
23
9
|
pi-web
|
|
24
10
|
```
|
|
25
11
|
|
|
26
|
-
|
|
12
|
+
Open [http://localhost:30141](http://localhost:30141).
|
|
27
13
|
|
|
28
|
-
|
|
14
|
+
Options:
|
|
29
15
|
|
|
30
16
|
```bash
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
pi-web --port 8080 # custom port
|
|
18
|
+
pi-web --hostname 127.0.0.1 # local-only access
|
|
19
|
+
pi-web -p 8080 -H 127.0.0.1 # combined
|
|
34
20
|
|
|
35
|
-
PORT=8080
|
|
21
|
+
PORT=8080 pi-web # env var also works
|
|
36
22
|
```
|
|
37
23
|
|
|
38
24
|
## Development Setup
|
package/bin/pi-web.js
CHANGED
|
@@ -12,9 +12,18 @@ const { parseArgs } = require("util");
|
|
|
12
12
|
|
|
13
13
|
const pkgDir = path.join(__dirname, "..");
|
|
14
14
|
const isWindows = process.platform === "win32";
|
|
15
|
-
const nextBin = path.join(pkgDir, "node_modules", ".bin", isWindows ? "next.cmd" : "next");
|
|
16
15
|
const nextDir = path.join(pkgDir, ".next");
|
|
17
16
|
|
|
17
|
+
// Resolve next's CLI entry directly to avoid relying on .bin symlinks (which
|
|
18
|
+
// may not exist when installed via npx).
|
|
19
|
+
let nextBin;
|
|
20
|
+
try {
|
|
21
|
+
nextBin = require.resolve("next/dist/bin/next", { paths: [pkgDir] });
|
|
22
|
+
} catch {
|
|
23
|
+
// Fallback to the .bin symlink for older setups / Windows
|
|
24
|
+
nextBin = path.join(pkgDir, "node_modules", ".bin", isWindows ? "next.cmd" : "next");
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
const { values: cliArgs } = parseArgs({
|
|
19
28
|
options: {
|
|
20
29
|
port: { type: "string", short: "p" },
|
|
@@ -34,11 +43,16 @@ if (!fs.existsSync(nextDir)) {
|
|
|
34
43
|
const nextArgs = ["start", "-p", port];
|
|
35
44
|
if (hostname) nextArgs.push("-H", hostname);
|
|
36
45
|
|
|
37
|
-
|
|
46
|
+
// If we resolved a .js file, run it with node directly; otherwise exec the binary.
|
|
47
|
+
const useNode = nextBin.endsWith(".js");
|
|
48
|
+
const spawnCmd = useNode ? process.execPath : nextBin;
|
|
49
|
+
const spawnArgs = useNode ? [nextBin, ...nextArgs] : nextArgs;
|
|
50
|
+
|
|
51
|
+
const child = spawn(spawnCmd, spawnArgs, {
|
|
38
52
|
cwd: pkgDir,
|
|
39
53
|
stdio: "inherit",
|
|
40
54
|
env: { ...process.env },
|
|
41
|
-
shell: isWindows,
|
|
55
|
+
shell: isWindows && !useNode,
|
|
42
56
|
});
|
|
43
57
|
|
|
44
58
|
child.on("exit", (code) => process.exit(code ?? 0));
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|