@maxceem/agw 0.4.0 → 0.5.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 +17 -2
  2. package/dist/agw.mjs +751 -149
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -10,13 +10,20 @@ npm install -g @maxceem/agw
10
10
 
11
11
  ## Quick start
12
12
 
13
- Sign in with a management key. Create one in the console at
14
- [appaigateway.com](https://appaigateway.com/): user menu, then **Management keys**.
13
+ Sign in through your browser:
15
14
 
16
15
  ```sh
17
16
  agw account login
18
17
  ```
19
18
 
19
+ The CLI prints a pairing code and opens the console. Check that the page shows
20
+ the same code, then approve. The CLI receives a management key of its own,
21
+ listed on the console's **Management keys** page with a **CLI** tag and this
22
+ machine's name. Over SSH, on a machine without a display, or with `--no-open`,
23
+ the CLI opens nothing: open the printed URL on any device and approve there. For your own deployment, run
24
+ `agw deployment connect --url https://ai.example.com` instead. `agw account
25
+ logout` revokes the key and removes it from this machine.
26
+
20
27
  No account yet? Skip login. A free anonymous account is created for you
21
28
  automatically as soon as you add your first provider or app below. You can
22
29
  claim it later with `agw account claim`.
@@ -108,6 +115,14 @@ Every error names a `code` and a `nextAction`. Follow the `nextAction`.
108
115
  | `4` | Local state or authentication problem |
109
116
  | `5` | `operation wait` timed out; the operation is still pending |
110
117
 
118
+ **Signing in.** `agw account login --no-open --json` returns a pending login
119
+ with a `url`, a `userCode` and an `id`. Give the person the URL and the code;
120
+ they check the page shows the same code and approve, then
121
+ `agw operation wait <id>` stores the key. In CI, set `AGW_MANAGEMENT_KEY` to a
122
+ management key: when set, it is the credential for every command and overrides
123
+ any saved login. To save an existing key instead, pipe it once with
124
+ `agw account login --key-stdin`.
125
+
111
126
  **Secrets.** Never put a key in a command argument. Either pipe it with
112
127
  `--key-stdin`, or hand the browser to a human:
113
128