Skip to content

Commit 8fbb48d

Browse files
NimaShafieclaude
andcommitted
docs: update README for v0.2.0-alpha.2 features
Document token authentication, --tls flag, API auth usage, pkg.sh helper, updated CI note, and cleaned up prerequisites section. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d58203a commit 8fbb48d

1 file changed

Lines changed: 50 additions & 10 deletions

File tree

README.md

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
Air-gapped C++ developer toolkit for network-restricted environments. All tools
66
work offline. All dependencies are vendored in-repo or in the `prebuilt/` submodule.
77

8-
**v0.2.0-alpha.1** — DevKit Manager is now a single pre-compiled Go binary.
9-
No Python, no pip, no runtime dependencies required to run the UI.
8+
**v0.2.0-alpha.2** — DevKit Manager is a single pre-compiled Go binary with
9+
built-in session token authentication and optional HTTPS. No Python, no pip,
10+
no runtime dependencies required to run the UI.
1011

1112
---
1213

@@ -28,7 +29,9 @@ bash launch.sh
2829
```
2930

3031
The script selects the correct pre-compiled binary for your platform, starts the
31-
server, and opens **`http://127.0.0.1:9090`** in your browser automatically.
32+
server, and opens the browser automatically. On first run a session token is
33+
generated and saved to `.devkit-token`; the browser is authenticated
34+
automatically via a one-time bootstrap redirect.
3235

3336
> Keep the terminal open while you use the DevKit Manager — it is the server.
3437
> Press **Ctrl+C** to stop.
@@ -61,6 +64,7 @@ bash launch.sh # launch UI and open browser
6164
bash launch.sh --port 9090 # custom port (one session only)
6265
bash launch.sh --host 0.0.0.0 # bind to all interfaces (LAN / remote access)
6366
bash launch.sh --no-browser # start server, don't open browser
67+
bash launch.sh --tls # enable HTTPS with a self-signed certificate
6468
bash launch.sh --cli # skip UI, run install-cli.sh directly
6569
bash launch.sh --rebuild # rebuild binary from source, then launch
6670
```
@@ -96,11 +100,13 @@ The manager is a self-contained Go binary with an embedded web UI. Features:
96100

97101
| Feature | Description |
98102
|---------|-------------|
103+
| **Token authentication** | Every request requires a session token (header, cookie, or query param). Token is auto-generated on first run and saved to `.devkit-token`. |
104+
| **HTTPS / TLS** | Pass `--tls` to serve over HTTPS with an auto-generated self-signed certificate (`devkit-tls.crt` / `devkit-tls.key`). |
99105
| **Tool dashboard** | Install/uninstall status per tool; one-click install and rebuild |
100106
| **Profile installs** | Batch install via built-in or custom profiles |
101107
| **Custom profiles** | Create, save, and delete named profiles (`profiles.json`) |
102108
| **Team config** | Export (`GET /api/export`) and import (`POST /api/import`) full config snapshots |
103-
| **Package upload** | Push `.zip` bundle archives to the server (`POST /packages/upload`) |
109+
| **Package upload** | Push `.zip` bundle archives to the server (`POST /packages/upload`); 256 MB total / 64 MB per-file limit enforced |
104110
| **Install prefix** | View, override, or reset the install path without editing files |
105111
| **Dashboard layout** | Reorder tool categories; changes persisted in `layout.json` |
106112
| **Tool meta overrides** | Override display name, description, or icon per tool |
@@ -110,9 +116,29 @@ The manager is a self-contained Go binary with an embedded web UI. Features:
110116
| **Network status** | `GET /api/network` — latency probe to detect accidental internet access |
111117
| **Update checker** | `GET /api/updates` — compares pinned manifest versions against latest releases |
112118

119+
### Authentication
120+
121+
All API requests (except `GET /health` and static assets) require the session
122+
token. Pass it via any of:
123+
124+
```bash
125+
# Header (recommended for scripts/CI)
126+
curl -H "X-DevKit-Token: <token>" http://127.0.0.1:9090/api/tools
127+
128+
# Cookie (set automatically by the browser after the bootstrap redirect)
129+
130+
# Query param (used internally by the bootstrap redirect)
131+
curl "http://127.0.0.1:9090/api/tools?devkit_token=<token>"
132+
```
133+
134+
The token is printed to the terminal on startup and saved to `.devkit-token`
135+
in the repo root (readable by the current user only).
136+
113137
### API Endpoints (selected)
114138

115139
```
140+
GET /health — server liveness check (no token required)
141+
GET /auth/bootstrap — exchange URL token for session cookie, redirect to UI
116142
GET /api/tools — full tool list with install status
117143
GET /api/tool/{id} — single tool detail
118144
GET /api/health/tools — binary health check for all installed tools
@@ -131,7 +157,6 @@ DELETE /api/prefix — reset to auto-detected prefix
131157
GET /api/layout — current dashboard layout
132158
POST /api/layout — save layout
133159
DELETE /api/layout — reset to defaults
134-
GET /health — server liveness check
135160
```
136161

137162
---
@@ -158,10 +183,14 @@ Validate → Configure → Install → Server Operations → Smoke Tests → Atl
158183
| **Validate** | Checks all `devkit.json` and `manifest.json` files for syntax and required fields |
159184
| **Configure** | Patches `devkit.config.json` with pipeline parameters (team, profile, port) |
160185
| **Install** | Runs `install-cli.sh --yes --profile <PROFILE>` on Linux and/or Windows agents |
161-
| **Server Operations** | Starts the server; pushes team identity; handles package upload, config import/export |
186+
| **Server Operations** | Starts the server; reads token from `.devkit-token`; pushes team identity; handles package upload, config import/export |
162187
| **Smoke Tests** | Runs `tests/run-tests.sh` to verify all installed tools respond |
163188
| **Atlassian** | Posts build result to a Jira issue and overwrites a Confluence status page |
164189

190+
> **CI note:** All DevKit Manager API calls from pipelines must include the
191+
> `X-DevKit-Token` header. The token is available at `.devkit-token` after
192+
> the server has started.
193+
165194
### Key Pipeline Parameters
166195

167196
| Parameter | Default | Description |
@@ -277,9 +306,8 @@ or via the API (`GET /api/prefix`, `POST /api/prefix`).
277306
| RHEL 8 | Bash 4.x | Bash 4.x |
278307

279308
The DevKit Manager binary (`prebuilt/bin/`) has no runtime dependencies.
280-
Python is no longer required to run the UI. It is still needed to install
281-
`tools/dev-tools/devkit-ui/` (the legacy FastAPI UI, if used), and is bundled
282-
as an optional tool in `tools/languages/python/`.
309+
Python is not required to run the UI. It is bundled as an optional installable
310+
tool in `tools/languages/python/`.
283311

284312
To **rebuild** the server binary from source: Go 1.21+ is required.
285313

@@ -304,12 +332,21 @@ bash launch.sh --rebuild
304332
```bash
305333
bash -n <script.sh> && echo "OK" # syntax-check before running
306334
bash launch.sh --no-browser # dev mode, logs in terminal
335+
bash launch.sh --tls --no-browser # HTTPS mode
336+
337+
# Health check (no token required)
307338
curl -s http://127.0.0.1:9090/health
308-
curl -s http://127.0.0.1:9090/api/tools
339+
340+
# API calls — pass token via header
341+
TOKEN=$(cat .devkit-token)
342+
curl -s -H "X-DevKit-Token: $TOKEN" http://127.0.0.1:9090/api/tools
343+
309344
bash tests/run-tests.sh --verbose
310345
bash install-cli.sh --yes --profile cpp-dev
311346
bash scripts/generate-sbom.sh
312347
bash scripts/status.sh # print install status of all tools
348+
bash scripts/pkg.sh list # list all bundled tools and versions
349+
bash scripts/pkg.sh set-version cmake 3.31.0
313350
```
314351

315352
---
@@ -402,6 +439,8 @@ airgap-cpp-devkit/
402439
| +-- go.mod / go.sum
403440
| +-- internal/
404441
| | +-- api/ <- HTTP handlers, routes, SSE, bundling
442+
| | | +-- auth.go <- session token middleware and bootstrap handler
443+
| | | +-- version.go <- AppVersion constant
405444
| | +-- config/ <- devkit.config.json loader
406445
| | +-- tools/ <- tool discovery and status
407446
| +-- web/ <- embedded web UI (templates, assets)
@@ -422,6 +461,7 @@ airgap-cpp-devkit/
422461
| +-- generate-sbom.sh <- regenerates all SBOM timestamps
423462
| +-- fetch-vscode-extensions.py <- mirrors .vsix files for offline use
424463
| +-- status.sh <- prints install status of all tools
464+
| +-- pkg.sh <- package management helper (list, add, remove, set-version)
425465
|
426466
+-- tests/
427467
| +-- run-tests.sh <- post-install smoke tests

0 commit comments

Comments
 (0)