figura-cli 0.2.1 → 0.3.1

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.
Files changed (3) hide show
  1. package/README.md +9 -11
  2. package/dist/index.js +60 -66
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -21,23 +21,21 @@ The binary is `figura`.
21
21
  ## Authentication
22
22
 
23
23
  ```bash
24
- # browser login (default) — opens a page to authorize this device,
25
- # no token to copy-paste
24
+ # browser login (default) — opens a short authorize page, no token to paste
26
25
  figura login
27
26
 
27
+ # print the URL instead of opening a browser (still no paste)
28
+ figura login --no-browser
29
+
28
30
  # or pass a token directly (CI / headless)
29
31
  figura login --token fig_xxxxxxxxxxxx
30
-
31
- # or paste a token at a prompt instead of opening a browser
32
- figura login --no-browser
33
32
  ```
34
33
 
35
- `figura login` opens your browser to a Figura authorize page; approving it
36
- mints a `fig_` token and hands it back to a one-shot `127.0.0.1` server the CLI
37
- started (matched by a `state` nonce). The token is validated against
38
- `GET /v1/whoami`, then written to `~/.figura/config.json` (mode `0600`) with
39
- `{ apiUrl, token, team }`. Set `FIGURA_WEB_URL` to point browser login at a
40
- non-default web origin (default `https://figura.so`).
34
+ `figura login` uses an OAuth-2.0 device flow: the CLI gets a device code from
35
+ the engine, opens a clean authorize URL (no localhost port), and polls until you
36
+ approve in the browser nothing to copy-paste, and it works over SSH. The
37
+ minted `fig_` token is validated against `GET /v1/whoami`, then written to
38
+ `~/.figura/config.json` (mode `0600`) with `{ apiUrl, token, team }`.
41
39
 
42
40
  Resolution precedence:
43
41