cloudtifact 0.1.3 → 0.2.3

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 +22 -2
  2. package/dist/index.js +1570 -388
  3. package/package.json +16 -18
package/README.md CHANGED
@@ -37,6 +37,10 @@ Installed with npm: `npm i -g cloudtifact@latest` to update, `npm rm -g cloudtif
37
37
  Installed with the script: `upgrade` downloads the latest CLI and replaces `~/.cloudtifact/cloudtifact.mjs`.
38
38
  It prints the old and new version, or says the CLI is already up to date.
39
39
 
40
+ Once a day the CLI checks in the background for a newer version, and after a command tells you on one line when there
41
+ is one. It stays quiet with `--json` or `--toon`, when output goes to a file or another program, and in CI. To turn
42
+ it off, set `CLOUDTIFACT_NO_UPDATE_NOTIFIER=1`.
43
+
40
44
  To remove a script install:
41
45
 
42
46
  ```sh
@@ -49,6 +53,19 @@ If the installer added a PATH line to your shell's startup file (`~/.zshrc`, `~/
49
53
  `~/.profile` or `~/.config/fish/config.fish`), delete it too. It sits under a `# cloudtifact` comment and
50
54
  mentions `.cloudtifact/bin`.
51
55
 
56
+ ## More than one account
57
+
58
+ ```sh
59
+ cloudtifact login # again, approving as your other account: adds it
60
+ cloudtifact accounts # * marks the active one
61
+ cloudtifact switch # toggle between two (or: switch <handle>)
62
+ cloudtifact push --account work # one command as another account
63
+ cloudtifact switch work --here # this repo always uses @work, on this machine
64
+ cloudtifact logout --account work # sign out of one (or --all)
65
+ ```
66
+
67
+ A folder set with `--here` never falls back to another account: if that account isn't signed in, the command stops.
68
+
52
69
  ## For agents
53
70
 
54
71
  Add `--toon` (fewest tokens) or `--json` to commands that print data, or set `CLOUDTIFACT_FORMAT=toon`.
@@ -58,10 +75,13 @@ Add `--toon` (fewest tokens) or `--json` to commands that print data, or set `CL
58
75
 
59
76
  | Variable | Use |
60
77
  | --- | --- |
61
- | `CLOUDTIFACT_API_URL` | Point at another Cloudtifact server (self-hosted or staging) |
78
+ | `CLOUDTIFACT_API_URL` | Point at another Cloudtifact server (self-hosted). The saved token is only sent to the server it came from, so run `cloudtifact login` with it set to sign in there |
62
79
  | `CLOUDTIFACT_FORMAT` | Default output: `text`, `toon` or `json` |
80
+ | `CLOUDTIFACT_ACCOUNT` | Use this signed-in account (a handle), like `--account` |
81
+ | `CLOUDTIFACT_TOKEN` | Use this token instead of any saved sign-in, for CI |
82
+ | `CLOUDTIFACT_NO_UPDATE_NOTIFIER` | `1`: never say when a newer CLI is out |
63
83
 
64
- The token from `login` is stored in `~/.config/cloudtifact/config.json` (or `$XDG_CONFIG_HOME`).
84
+ The tokens from `login` are stored in `~/.config/cloudtifact/config.json` (or `$XDG_CONFIG_HOME`).
65
85
 
66
86
  ## Docs
67
87