snoutdata 0.20.0 → 0.21.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 CHANGED
@@ -60,8 +60,9 @@ export SNOUTDATA_ACCESS_TOKEN=sdt_... # made once by a person: snoutdata token
60
60
  `--expires`. Made with `--project REF`, it reaches that one project and nothing else. It is what
61
61
  CI and an agent
62
62
  should use: a script's behaviour should not depend on who happens to be logged in on the machine
63
- it runs on. Failing that, `~/.snoutdata/auth.json` (written by `snoutdata login`, mode 0600),
64
- whose session renews itself as it is used.
63
+ it runs on. Failing that, the profile's session: `~/.snoutdata/auth.json` (written by
64
+ `snoutdata login`, mode 0600), or `~/.snoutdata/auth.NAME.json` for a named profile, whose session
65
+ renews itself as it is used.
65
66
 
66
67
  The token is exchanged for a short-lived session by the control plane, so row-level security is
67
68
  still the only thing deciding what it can see.
@@ -95,13 +96,15 @@ snoutdata link --ref R # point this folder at an existing project
95
96
  **Auth**
96
97
 
97
98
  ```bash
98
- snoutdata login # through a browser
99
+ snoutdata login # a sign-in page: Google, GitHub or your work email
100
+ snoutdata login --provider github # straight to one provider
99
101
  snoutdata login --sso # your company's identity provider; asks for a work email
100
102
  snoutdata login --sso --domain acme.com # or name the domain and skip the question
101
103
  snoutdata login --device # print a code to type into a browser anywhere
102
104
  snoutdata login --no-browser # print the URL instead of opening one
103
- snoutdata logout
104
- snoutdata whoami
105
+ snoutdata login --profile acme # a second account, kept beside the first
106
+ snoutdata logout [--all] # this profile, or every one
107
+ snoutdata whoami [--all] # --all: every profile signed in here
105
108
  snoutdata tokens create --name ci [--expires DAYS] [--project REF]
106
109
  snoutdata tokens list
107
110
  snoutdata tokens revoke <id|sdt_prefix>
@@ -189,7 +192,12 @@ Every command takes `--json`, `--quiet` and `--help`, and anything that waits ta
189
192
  **A project**, in order: `--ref`, then `SNOUTDATA_PROJECT`, then `.snoutdata/project.json` in
190
193
  this folder or a parent.
191
194
 
192
- **A token**, in order: `SNOUTDATA_ACCESS_TOKEN`, then `~/.snoutdata/auth.json`.
195
+ **A token**, in order: `SNOUTDATA_ACCESS_TOKEN`, then the profile's session
196
+ (`~/.snoutdata/auth.json`, or `auth.NAME.json` for a profile).
197
+
198
+ **A profile**, in order: `--profile`, then `SNOUTDATA_PROFILE`, then the profile recorded in
199
+ `.snoutdata/project.json` (`link --profile NAME` writes it), then the default. Any command takes
200
+ `--profile`, so one machine stays signed in to several accounts.
193
201
 
194
202
  **Sign-in, when there is no credential and a person is present**, in order: SnoutData
195
203
  Studio if it is running here and willing, then a browser, then a pairing code for a