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
feat(api): default port 7566 + name the install extra/command "web"
The API server also serves the Knowledge Workbench UI, so `web` reads truer
than `api` for what people install and run. Make `[web]` the canonical extra
and add an `openkb-web` console script; keep `[api]` (as a self-referential
alias) and `openkb-api` working for backwards compatibility. README and the
rest-api example now lead with the `web` names. `python -m openkb.api` (the
module path) is unchanged.
Also move the default API port off the crowded 8000 to 7566 ("KB" = ASCII
75,66) to cut collisions with other local dev servers. Updated: the argparse
default, the default CORS origins, the Vite dev-proxy target, the
connection-dialog placeholder, and the README/examples. A server already
running on 8000 keeps its port; the new default only applies to freshly
started servers.
Claude-Session: https://claude.ai/code/session_01XMxbhmAkxxVV8CFWCZDBaG
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,13 +123,13 @@ Subscription-based providers that authenticate via OAuth device flow (e.g. `chat
123
123
OpenKB ships a bundled web UI, served by the REST API at `/`. Install the API extra and start the server — no configuration needed:
124
124
125
125
```bash
126
-
pip install "openkb[api]"
127
-
openkb-api# serves the API + Workbench at http://127.0.0.1:8000/
126
+
pip install "openkb[web]"
127
+
openkb-web# serves the API + Workbench at http://127.0.0.1:7566/
128
128
```
129
129
130
-
Open `http://127.0.0.1:8000/` for the Workbench. Auth is off by default (local-first); set `OPENKB_API_TOKEN` to require a bearer token before exposing the server. See the [full Web UI guide](examples/rest-api/README.md#knowledge-workbench-web-ui).
130
+
Open `http://127.0.0.1:7566/` for the Workbench. Auth is off by default (local-first); set `OPENKB_API_TOKEN` to require a bearer token before exposing the server. See the [full Web UI guide](examples/rest-api/README.md#knowledge-workbench-web-ui).
131
131
132
-
> Working on the UI itself? Run the Vite dev server with `cd frontend && npm install && npm run dev` (it proxies `/api` to a running `openkb-api`), or `npm run build` to regenerate the bundled `openkb/web/`.
132
+
> Working on the UI itself? Run the Vite dev server with `cd frontend && npm install && npm run dev` (it proxies `/api` to a running `openkb-web`), or `npm run build` to regenerate the bundled `openkb/web/`.
133
133
134
134
# 🧩 How OpenKB Works
135
135
@@ -341,7 +341,7 @@ The skill is read-only. It won't run `openkb add`, `remove`, or `lint --fix` wit
341
341
342
342
# REST API
343
343
344
-
OpenKB ships a FastAPI service for HTTP clients. Install with `pip install -e ".[api]"`, then start with `python -m openkb.api`. The interactive API reference is at [`/docs`](http://127.0.0.1:8000/docs) (importable into Postman).
344
+
OpenKB ships a FastAPI service for HTTP clients. Install with `pip install -e ".[web]"`, then start with `python -m openkb.api`. The interactive API reference is at [`/docs`](http://127.0.0.1:7566/docs) (importable into Postman).
345
345
346
346
See the [full REST API reference](examples/rest-api/README.md#rest-api) for endpoints, auth, and SSE streaming.
Copy file name to clipboardExpand all lines: examples/rest-api/README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This guide covers the OpenKB REST API (FastAPI) and the bundled Knowledge Workbench web UI.
4
4
5
-
> The interactive API reference is served live at [`/docs`](http://127.0.0.1:8000/docs) (OpenAPI/Swagger) once the server is running — you can import `/openapi.json` directly into Postman.
5
+
> The interactive API reference is served live at [`/docs`](http://127.0.0.1:7566/docs) (OpenAPI/Swagger) once the server is running — you can import `/openapi.json` directly into Postman.
6
6
7
7
## Knowledge Workbench (Web UI)
8
8
@@ -11,20 +11,20 @@ OpenKB ships a bundled web single-page app — the **Knowledge Workbench** — s
11
11
12
12
```bash
13
13
# 1. Install with the API extra (the built UI ships inside the package)
14
-
pip install "openkb[api]"
14
+
pip install "openkb[web]"
15
15
16
16
# 2. Start the server — no config needed for local use
17
-
openkb-api --host 127.0.0.1 --port 8000# serves the API + Workbench at http://127.0.0.1:8000/
17
+
openkb-web --host 127.0.0.1 --port 7566# serves the API + Workbench at http://127.0.0.1:7566/
18
18
```
19
19
20
20
Optional environment variables:
21
21
22
22
-`OPENKB_KB_ROOT` — where REST-created knowledge bases are stored (default `~/.config/openkb/kbs`).
23
23
-`OPENKB_API_TOKEN` — set it to require bearer auth (see [Authentication](#authentication-and-common-behavior)); leave unset for open local use.
24
24
25
-
> **From a source checkout?** The built bundle (`openkb/web/`) is git-ignored, so an editable install (`pip install -e ".[api]"`) has no UI until you build it once: `cd frontend && npm install && npm run build` (outputs to `openkb/web/`). Or run the Vite dev server with `npm run dev` (it proxies `/api` to a running `openkb-api`). Without the bundle, `openkb-api` serves only the REST API under `/api/v1` and `/` returns a 404.
25
+
> **From a source checkout?** The built bundle (`openkb/web/`) is git-ignored, so an editable install (`pip install -e ".[web]"`) has no UI until you build it once: `cd frontend && npm install && npm run build` (outputs to `openkb/web/`). Or run the Vite dev server with `npm run dev` (it proxies `/api` to a running `openkb-web`). Without the bundle, `openkb-web` serves only the REST API under `/api/v1` and `/` returns a 404.
26
26
27
-
Open `http://127.0.0.1:8000/` in your browser. With no `OPENKB_API_TOKEN` set it connects to the local API immediately — no prompt. (If a token is configured, a **Connection** dialog asks for it once and caches it in the browser; you can also open it manually to point the UI at a remote API base.) The Workbench then provides:
27
+
Open `http://127.0.0.1:7566/` in your browser. With no `OPENKB_API_TOKEN` set it connects to the local API immediately — no prompt. (If a token is configured, a **Connection** dialog asks for it once and caches it in the browser; you can also open it manually to point the UI at a remote API base.) The Workbench then provides:
28
28
29
29
-**Overview** — index/concept/summary/report stat cards, clickable concept chips, recent documents, and last-compile/lint activity.
30
30
-**Documents** — drag-and-drop multi-file upload with per-file SSE progress, hash table, and delete with confirmation.
@@ -44,15 +44,15 @@ frontends, or other HTTP clients.
0 commit comments