@runcanary/cli 0.1.9 → 0.1.11

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 +57 -17
  2. package/dist/canary.js +135 -83
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -18,41 +18,57 @@ canary whoami # show the signed-in account and your runs this month
18
18
  canary logout # revoke this device's token
19
19
  canary workspace list # list / switch your workspaces
20
20
  canary setup # verify this repo's .canary/ setup in a clean cloud sandbox
21
+ canary verify # test the current local source using your setup
22
+ canary verify --base HEAD # compare only current edits against the local HEAD
21
23
  canary skills # list what a coding agent can do with Canary (hosted index)
22
24
  canary skill <name> # print the hosted instructions for one operation
25
+ canary gate on|off # the push check: hold an agent's push or PR until this exact code has a verified run
26
+ canary hooks status # where the push check is registered (login adds it to Claude Code and Codex)
27
+ canary hooks uninstall # take it out of your agents' settings; run this before `npm uninstall`
23
28
  ```
24
29
 
30
+ After the CLI is gone, `npx -y @runcanary/cli hooks uninstall` removes the same entries. The check
31
+ never touches anything but an agent's push or pull-request call, and lets that through whenever
32
+ Canary cannot answer.
33
+
25
34
  Add `--json` to any command for machine-readable output.
26
35
 
27
36
  Browser login shows an animated Canary while waiting for authorization, then a
28
37
  contextual welcome after credentials are saved. It shows your account, active
29
- CLI workspace, locally detected GitHub repository, actual agent-skill status,
38
+ CLI workspace, locally detected Git repository, actual agent-skill status,
30
39
  and an instruction to continue in your coding agent. Press `w` to choose a
31
40
  workspace with the arrow keys and Enter, `c` to copy the instruction, and Enter
32
- to finish login. The instruction is simply "Onboard this repository to Canary."
33
- The CLI saves the selected workspace and sends it with setup requests.
41
+ to finish login. The instruction is "Verify my changes with Canary." when your
42
+ setup is ready, or "Onboard this repository to Canary." when setup is needed.
43
+ The CLI saves the selected workspace and sends it with setup and verify requests.
34
44
 
35
- First login starts with the workspace active on the platform. A later interactive
36
- login preserves the saved CLI workspace only after checking membership for the
37
- same account and API server. Workspace selection changes the CLI preference;
38
- repository detection does not claim a cloud connection or start onboarding.
45
+ Login selects and shows the only workspace, or offers a workspace picker when
46
+ there are several. A previous valid selection is highlighted after checking
47
+ membership for the same account and API server. Headless login preserves a valid
48
+ saved selection; otherwise pass `--workspace <id-or-name>` or follow the returned
49
+ `canary workspace use <id>` instruction. Repository names never switch workspaces.
39
50
 
40
51
  Use `canary login --no-animation` or set `CANARY_NO_ANIMATION=1` for plain output. Redirected output,
41
52
  CI, `TERM=dumb`, JSON, and token login also stay plain. `NO_COLOR` disables color.
53
+ An interactive browser login still asks for a missing workspace with a numbered
54
+ prompt when animation is off or the terminal is small. Enter your choice to save
55
+ it and finish login; no separate workspace command is needed.
42
56
 
43
- The welcome, and the plain receipt when output is redirected, say where the local
44
- repository stands for your account: set up on Canary, connected but not set up, not
45
- connected (with the link to connect it, the server's when it sends one), or connected in a
46
- workspace you are not a member of. Login never waits on that: the redirected receipt and the
47
- welcome each give the lookup three seconds, and a repository can be connected later.
57
+ The welcome, and the plain output when it is redirected, say where the local
58
+ repository stands for your account and selected workspace: your setup is ready,
59
+ not set up yet, or detected locally when that could not be checked. The lookup
60
+ has a three-second budget and never checks GitHub App installations. A checkout
61
+ whose `origin` is on GitHub is shown as `owner/name`; any other checkout is
62
+ shown by its directory name.
48
63
 
49
64
  Browser login waits up to fifteen minutes for the authorization to come back — enough
50
- for a first sign-up that creates a workspace and installs the GitHub App on the way.
65
+ for a first sign-up that creates a workspace and offers GitHub identity linking.
51
66
  Plain output prints a line every minute while it waits. With `--json` the authorization
52
67
  link is printed on stderr as its own JSON line whether or not a browser was opened, and
53
- stdout stays one JSON document, printed the moment the token is saved; it names the
54
- repository and the connect link when the current directory has a GitHub origin, and
55
- never waits on the repository's state (the readable receipt and the welcome show it).
68
+ stdout stays one JSON document with authentication, workspace selection, and local
69
+ repository status. Login links your GitHub account to Canary; the link is required because
70
+ a pull request finds its author's setup through it. It does not install the GitHub App or
71
+ grant repository access. Setup and verify work without an origin remote or pushed commits.
56
72
 
57
73
  ## Onboard a repository
58
74
 
@@ -68,7 +84,31 @@ and say:
68
84
 
69
85
  The agent discovers how your app installs and boots, writes the setup under
70
86
  `.canary/`, and runs `canary setup` — which boots it from zero in a clean cloud
71
- sandbox and registers the repo on success.
87
+ sandbox from an uploaded local source snapshot. Green setup saves your setup and
88
+ explicit environment for this repository and workspace. Every setup belongs to one
89
+ user: teammates each run `canary setup` for their own, and yours never changes theirs.
90
+
91
+ The snapshot includes eligible unchanged source and the final contents of staged,
92
+ unstaged, deleted, binary, and untracked non-ignored files. `.git` and ignored paths
93
+ are excluded from both baseline and current trees. Source capture leaves the local
94
+ checkout and Git state unchanged; setup retains its explicit `.canary/` recipe and
95
+ environment write-back. Environment values still use `.canary/env.json` and the
96
+ existing explicit input flow, rather than scanning ignored files.
97
+
98
+ Ordinary `canary verify` reuses your approved setup and uploads fresh source.
99
+ Use `--base <local-ref>` on setup or verify to choose the comparison baseline. The
100
+ default uses a locally available comparison branch; without one, it reviews the
101
+ whole eligible project. No fetch is required. After fixing reported failures, use
102
+ `canary verify --failed <run-id>` once the previous run has finished.
103
+
104
+ The repository page shows your approved setup, environment key names, versions,
105
+ and CLI runs in the selected workspace. Other members cannot read your setup or
106
+ runs. Missing environment values can be supplied on that page.
107
+
108
+ A pull request you open runs on your setup automatically once the GitHub App is
109
+ installed for that repository; an admin installs it from Integrations. Teammates
110
+ get a comment on their PR asking them to run `canary setup` until they have their
111
+ own. A run keeps the setup it started with throughout execution.
72
112
 
73
113
  In an interactive terminal, setup shows the animated Canary, repository, saved
74
114
  CLI workspace, elapsed time, and the actual queued or running job state. When