@quantis-ai/gary 0.2.1 → 0.3.0

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 +16 -11
  2. package/bin/gary.js +1 -1
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -7,7 +7,7 @@ computer.
7
7
 
8
8
  ```bash
9
9
  npm install -g @quantis-ai/gary # or: curl -fsSL https://chat.getquantis.com/cli/install.sh | bash
10
- gary install # signs in, starts the service and Gary's computer
10
+ gary setup # signs in, starts the service and Gary's computer
11
11
  gary dir add ~/projects # share a directory (--read-only to only read)
12
12
  gary status
13
13
  ```
@@ -20,13 +20,17 @@ irm https://chat.getquantis.com/cli/install.ps1 | iex
20
20
 
21
21
  | Command | What it does |
22
22
  |---|---|
23
- | `gary install` | Copies gary to `~/.local/bin`, signs in if needed, and runs it in the background: a systemd user unit on Linux (lingering on, so it keeps running after logout), a launchd agent on macOS, a Scheduled Task at logon on Windows. Starts Gary's computer when Docker is installed; warns and carries on when it isn't |
23
+ | `gary setup` | Copies gary to `~/.local/bin`, signs in if needed, and runs it in the background: a systemd user unit on Linux (lingering on, so it keeps running after logout), a launchd agent on macOS, a Scheduled Task at logon on Windows. Starts Gary's computer when Docker is installed; warns and carries on when it isn't |
24
24
  | `gary login` | Signs this computer in: prints a link to open where you're signed in to Gary, and waits for you to approve it |
25
- | `gary status` | Signed in or not, connected or not (and why not, in QUANTIS's own words when it refuses the account), Gary's computer (running, stopped, image not downloaded, or no Docker; its image and version; whether a newer gary or image is out), and the directories shared |
25
+ | `gary status` | Signed in or not, connected or not (and why not, in QUANTIS's own words when it refuses the account), Gary's computer (running, stopped, image not downloaded, or no Docker; the image it runs and its version, and whether it is behind; whether a newer gary is out), and the directories shared |
26
26
  | `gary dir add [path]` | Shares a directory, this one by default. `--read-only`: Gary can read it, not change it or run commands in it. `--name`: what Gary calls it |
27
27
  | `gary dir list` / `gary dir remove <path\|name>` | The directories shared; stop sharing one |
28
28
  | `gary tasks` | What your Garys did on this computer (newest last), and the commands running now; `gary tasks stop <id>` stops one |
29
- | `gary update` | Installs the newest gary (when installed by the script; with npm it says the two commands to run), downloads the newest image of Gary's computer, and starts the computer again on it. Its files are kept. Running it again changes nothing |
29
+ | `gary computer list` | Gary's computer on this machine, as `docker ps` shows a container: its status (up and for how long, behind, stopped, not added, removed, no Docker), the command Gary is running in it now or `idle`, when Gary last used it, and its image |
30
+ | `gary computer add` | Makes Gary's computer here and starts it: downloads the image gary pins when it isn't here. Needs Docker |
31
+ | `gary computer update` | Downloads the image of Gary's computer that gary pins and starts the computer again on it. Its files are kept. Running it again changes nothing |
32
+ | `gary computer remove` | Stops Gary's computer here and removes it; `gary setup` won't make it again until `gary computer add`. Its files stay in the Docker volume `gary-home` unless `--delete-home`. Refused while Gary runs a command in it, unless `--force` |
33
+ | `gary update` | Installs the newest gary (when installed by the script; with npm it says the two commands to run). It leaves Gary's computer alone, and says when the computer is behind the new gary's image |
30
34
  | `gary logout` / `gary uninstall` | Sign this computer out; stop the service and Gary's computer and remove them. The computer's files stay in the Docker volume `gary-home` unless `--delete-home` |
31
35
 
32
36
  ## How it works
@@ -48,10 +52,10 @@ answers inside the shared directories. Approvals, audit and limits are the bridg
48
52
 
49
53
  ## Gary's computer
50
54
 
51
- A Docker container, `gary-computer`, from QUANTIS's image `ahartpence/gary` at this gary's version. It gives a Gary a
52
- computer and browser of its own on the person's machine, apart from the person's files.
55
+ A Docker container, `gary-computer`, from QUANTIS's image `ahartpence/gary`, pinned by digest in `docker.go`
56
+ (`ComputerImageTag`, `ComputerImageDigest`), not by this gary's version. It gives a Gary a computer and browser of its own on the person's machine, apart from the person's files.
53
57
 
54
- - Needs Docker: Docker Desktop on macOS and Windows, Docker Engine on Linux. Without it `gary install` prints a
58
+ - Needs Docker: Docker Desktop on macOS and Windows, Docker Engine on Linux. Without it `gary setup` prints a
55
59
  warning that says what to download, and finishes; everything else works.
56
60
  - Its home is the Docker volume `gary-home` (`/home` in the container), kept when the container is made again.
57
61
  - It sees nothing of the person's but the directories shared with `gary dir add`, each at `/shared/<name>`, read-only
@@ -60,7 +64,7 @@ computer and browser of its own on the person's machine, apart from the person's
60
64
  `docker exec` as an ordinary user, never root.
61
65
  - To Gary it is the folder `computer`: the same list, search, read, write, exec and git as a shared directory, held
62
66
  inside Gary's own home there. A command there is ended whole at its time limit.
63
- - `GARY_IMAGE` runs another image (a local build); `gary update` gets the newest.
67
+ - `GARY_IMAGE` runs another image (a local build); `gary computer update` moves the computer onto it.
64
68
 
65
69
  ## Files
66
70
 
@@ -78,8 +82,8 @@ On Windows the first two are in `%APPDATA%\gary`, the third is `%LOCALAPPDATA%\g
78
82
 
79
83
  `@quantis-ai/gary` is the `gary` command (a few lines of Node that run the binary); `@quantis-ai/gary-<os>-<arch>`
80
84
  (`darwin`, `linux` and `win32`, each `arm64` and `x64`) holds each platform's binary, and npm installs only the one whose `os` and `cpu` match, as esbuild's packages do.
81
- `gary install` copies the binary the service runs to `~/.local/share/gary/` (not on PATH, so it doesn't shadow npm's
82
- `gary`); after `npm update -g @quantis-ai/gary`, run `gary install` again, and `gary status` says when the service
85
+ `gary setup` copies the binary the service runs to `~/.local/share/gary/` (not on PATH, so it doesn't shadow npm's
86
+ `gary`); after `npm update -g @quantis-ai/gary`, run `gary setup` again, and `gary status` says when the service
83
87
  still runs an older version.
84
88
 
85
89
  ```bash
@@ -98,7 +102,8 @@ runs `make test`, builds `dist/` and the npm packages, checks this computer's bi
98
102
  the six platform packages and `@quantis-ai/gary` last, so the main package never names one that isn't there. npm asks
99
103
  for 2FA on each. A package already on npm at that version is skipped, so after a refused 2FA, run the same command
100
104
  again and it carries on. `ALLOW_UNMERGED=1` releases a commit that isn't on `origin/main` yet. It doesn't publish the
101
- image of Gary's computer (`ahartpence/gary`, from the gary repo); without a tag for the version the CLI uses `:latest`.
105
+ image of Gary's computer (`ahartpence/gary`, from the gary repo). To move to a new image, publish it, change the pin in
106
+ `docker.go`, then release; `make test` checks Docker Hub has the pinned digest for linux/amd64 and linux/arm64.
102
107
 
103
108
  ## Building
104
109
 
package/bin/gary.js CHANGED
@@ -34,7 +34,7 @@ try {
34
34
  process.exit(1);
35
35
  }
36
36
 
37
- // GARY_NPM tells `gary install` it came from npm, so it says how to update.
37
+ // GARY_NPM tells `gary setup` it came from npm, so it says how to update.
38
38
  const r = spawnSync(bin, process.argv.slice(2), { stdio: "inherit", env: { ...process.env, GARY_NPM: "1" } });
39
39
  if (r.error) {
40
40
  console.error(`gary: ${r.error.message}`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quantis-ai/gary",
3
3
  "description": "Connects this computer to your Gary, so your Garys can work in the directories you share here.",
4
- "version": "0.2.1",
4
+ "version": "0.3.0",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://docs.getquantis.com",
7
7
  "author": "QUANTIS",
@@ -16,11 +16,11 @@
16
16
  "node": ">=18"
17
17
  },
18
18
  "optionalDependencies": {
19
- "@quantis-ai/gary-darwin-arm64": "0.2.1",
20
- "@quantis-ai/gary-darwin-x64": "0.2.1",
21
- "@quantis-ai/gary-linux-arm64": "0.2.1",
22
- "@quantis-ai/gary-linux-x64": "0.2.1",
23
- "@quantis-ai/gary-win32-arm64": "0.2.1",
24
- "@quantis-ai/gary-win32-x64": "0.2.1"
19
+ "@quantis-ai/gary-darwin-arm64": "0.3.0",
20
+ "@quantis-ai/gary-darwin-x64": "0.3.0",
21
+ "@quantis-ai/gary-linux-arm64": "0.3.0",
22
+ "@quantis-ai/gary-linux-x64": "0.3.0",
23
+ "@quantis-ai/gary-win32-arm64": "0.3.0",
24
+ "@quantis-ai/gary-win32-x64": "0.3.0"
25
25
  }
26
26
  }