hyper-pm-web 0.1.0

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 ADDED
@@ -0,0 +1,49 @@
1
+ # hyper-pm-web
2
+
3
+ Small **local** web UI around the `hyper-pm` CLI.
4
+
5
+ ## Publishing to npm
6
+
7
+ Publish **`hyper-pm` first**, then this package. Prefer **`pnpm publish`** from this app directory (or `pnpm publish --filter hyper-pm-web`) so pnpm rewrites the `workspace:^` range on `hyper-pm` to a concrete semver in the published manifest. Plain `npm publish` can leave `workspace:` specifiers intact and produce an uninstallable tarball. The server spawns the same bundled CLI as the terminal (`hyper-pm/dist/main.cjs`), so behavior matches the CLI. The browser UI uses a **sidebar** (Overview, Epics, Stories, Tickets, Tools) to list work items, open them for edit, create new ones, delete, and **comment on tickets**; **Advanced CLI** still accepts raw argv.
8
+
9
+ ## Security
10
+
11
+ - Defaults to **127.0.0.1** (see `HYPER_PM_WEB_HOST`). Do not expose this service to untrusted networks without a proper reverse proxy and auth story.
12
+ - **`--repo`**, **`--temp-dir`**, and **`--format`** are always chosen by the server; the browser cannot override them via `argv`.
13
+ - Optional **`HYPER_PM_WEB_TOKEN`**: when set, `POST /api/run` requires `Authorization: Bearer <token>`.
14
+
15
+ ## Setup
16
+
17
+ 1. Build the CLI package so `dist/main.cjs` exists:
18
+
19
+ ```bash
20
+ pnpm --filter hyper-pm build
21
+ ```
22
+
23
+ 2. Optional environment variables (see root `packages/env/env.example`):
24
+ - **`HYPER_PM_WEB_REPO`** — git repository root for `--repo`. If unset, defaults to **the current working directory** (`process.cwd()`), resolved to an absolute path.
25
+ - **`HYPER_PM_WEB_TEMP_DIR`** — parent directory for disposable git worktrees. If unset, the server **creates** a unique directory under the OS temp directory (same family as `os.tmpdir()`) and **deletes it** when the process receives `SIGINT` or `SIGTERM`.
26
+ - Optional: `HYPER_PM_WEB_HOST`, `HYPER_PM_WEB_PORT`, `HYPER_PM_WEB_TOKEN`
27
+
28
+ 3. Run the web server from the repo you want to manage (so the default `--repo` is correct), or set `HYPER_PM_WEB_REPO`:
29
+
30
+ ```bash
31
+ cd /path/to/your/git/repo
32
+ pnpm --filter hyper-pm-web dev
33
+ ```
34
+
35
+ Or production-style:
36
+
37
+ ```bash
38
+ pnpm --filter hyper-pm-web build
39
+ pnpm --filter hyper-pm-web start
40
+ ```
41
+
42
+ Open the printed URL (default `http://127.0.0.1:3847`).
43
+
44
+ ## API
45
+
46
+ - `GET /api/health` — `{ ok, repoPath, tempDirParent }`
47
+ - `POST /api/run` — JSON body: same shape as `@workspace/hyper-pm-cli-runner` input **except** `repo` and `tempDir` are ignored/forbidden in `argv`; server merges configured paths.
48
+
49
+ GitHub sync and other CLI features use the same env vars as the CLI (`GITHUB_TOKEN`, `GITHUB_REPO`, etc.).