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(cli): enable auth by default and auto-authorize --open via OTP
Every built-in plugin's standalone CLI now gates the dev server behind
devframe's interactive OTP handshake by default (code-server, git,
inspect, messages, terminals, data-inspector previously opted out;
og/a11y already defaulted on). Each plugin keeps an `auth` option to
opt back out for single-user/CI use.
To keep that gate from adding friction, `--open` now asks the resolved
auth handler to rewrite the launched URL — the interactive handler
embeds the current OTP (via buildOtpAuthUrl), so the opened tab
authenticates automatically instead of prompting for a code.
Adds DevframeAuthHandler.buildOpenUrl (optional) as the seam, wires it
through maybeOpenBrowser in the dev adapter, and updates docs/skill
guidance + tsnapi snapshots accordingly.
Co-authored-by: opencode <noreply@opencode.ai>
|`portRange`|`[number, number]`| Port scan range, passed through to `get-port-please`. |
209
208
|`random`|`boolean`| Prefer a random open port. |
210
209
|`host`|`string`| Default bind host. |
211
-
|`open`|`boolean \| string`|`true` opens the origin, a string opens a specific path, `false` disables. Matches the `--open` / `--no-open` flags. |
210
+
|`open`|`boolean \| string`|`true` opens the origin, a string opens a specific path, `false` disables. Matches the `--open` / `--no-open` flags. When `auth` is on, the opened URL embeds the current OTP so the tab authenticates automatically. |
212
211
|`auth`|`boolean`| Disable the WS trust flow when the tool is localhost-only and single-user. Default `true`. |
213
212
|`configure`|`(cli: CAC) => void`| Contribute capability flags/commands. Runs before `createCac`'s `configureCli` option so the final tool author always has the last word. |
To skip typing, a host can print a link that embeds the code and open the browser straight into an authenticated session. Build it from the current code with `buildOtpAuthUrl(origin)` (devframe stays headless, so the host prints its own banner):
82
+
To skip typing, a host can print a link that embeds the code and open the browser straight into an authenticated session. The standalone CLI (`createCac` / `createDevServer`) does this automatically for `--open`: when the server is auth-gated, the browser it launches already carries the current code, so the tab lands authenticated with no prompt at all. Build the link yourself from the current code with `buildOtpAuthUrl(origin)` (devframe stays headless, so the host prints its own banner):
83
83
84
84
```
85
85
Devtools ready — authenticate this browser: http://localhost:3000/?devframe_otp=123456
0 commit comments