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.
- package/README.md +9 -11
- package/dist/index.js +60 -66
- 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
|
|
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`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`GET /v1/whoami`, then written to
|
|
39
|
-
`{ apiUrl, token, team }`.
|
|
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
|
|