create-canary 0.4.0 → 0.4.2

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 -7
  2. package/dist/cli.js +6 -44
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,9 +7,10 @@
7
7
  [![npm](https://img.shields.io/npm/v/create-canary.svg)](https://www.npmjs.com/package/create-canary)
8
8
  [![license](https://img.shields.io/npm/l/create-canary.svg)](https://github.com/usecanary/canary)
9
9
 
10
- One command to get Canary, its browser runtime, and the agent integration set up — no flags to
11
- remember. Every step just shells out to the same published commands you could run by hand, so there's
12
- no magic and nothing bespoke to uninstall.
10
+ One command to get Canary and its browser runtime set up — no flags to remember. Every step just
11
+ shells out to the same published commands you could run by hand, so there's no magic and nothing
12
+ bespoke to uninstall. Agent integration (skills, Claude Code plugin) is deliberately left to you:
13
+ after setup the wizard prints the exact commands to run.
13
14
 
14
15
  ## Use
15
16
 
@@ -24,14 +25,13 @@ You'll get a checklist (space toggles, enter confirms). Recommended items are pr
24
25
  | --- | --- | --- |
25
26
  | Install the `canary` command globally | ✓ | `npm i -g @usecanary/cli` |
26
27
  | Install the browser runtime (Chromium) | ✓ | `canary install` |
27
- | Install the agent skills (any tool) | ✓ | `npx skills add usecanary/canary` |
28
- | Install the Claude Code plugin (slash commands) | ✓ | `claude plugin marketplace add …` + `plugin install …` |
29
28
  | Also install `canary-browser` globally | — | `npm i -g @usecanary/browser` |
30
29
  | Also install the `canary-viewer` viewer globally | — | `npm i -g @usecanary/ui` |
31
30
 
32
31
  Installing the CLIs globally puts `canary`, `canary-browser`, and `canary-viewer` on your `PATH` so
33
- day-to-day use drops the `npx` prefix. If the Claude Code CLI isn't found, the wizard prints the
34
- in-app `/plugin …` commands to run instead.
32
+ day-to-day use drops the `npx` prefix. The wizard never installs agent skills or plugins itself
33
+ once setup completes it prints the commands (`npx skills add usecanary/canary`, Claude Code
34
+ `/plugin …`) so each agent's own mechanism does the work.
35
35
 
36
36
  ### Non-interactive
37
37
 
@@ -40,6 +40,15 @@ inspect before executing.
40
40
 
41
41
  ## After setup
42
42
 
43
+ Add the agent integration yourself (one-time):
44
+
45
+ ```bash
46
+ npx skills add usecanary/canary # agent skills (any Agent Skills tool)
47
+ # Claude Code: /plugin marketplace add usecanary/canary then /plugin install canary@canary-marketplace
48
+ ```
49
+
50
+ Then record a session:
51
+
43
52
  ```bash
44
53
  canary session start --name "checkout" # start a recorded session (prints an id)
45
54
  canary run ./step.js --session <id> --step "open"
package/dist/cli.js CHANGED
@@ -9918,7 +9918,7 @@ var require_jsx_runtime = __commonJS({
9918
9918
  });
9919
9919
 
9920
9920
  // src/cli.tsx
9921
- import { execSync, spawn } from "node:child_process";
9921
+ import { spawn } from "node:child_process";
9922
9922
 
9923
9923
  // ../../node_modules/.pnpm/ink@5.2.1_@types+react@18.3.30_react@18.3.1/node_modules/ink/build/render.js
9924
9924
  import { Stream } from "node:stream";
@@ -16553,19 +16553,7 @@ var cursor3 = source_default.inverse(" ");
16553
16553
 
16554
16554
  // src/cli.tsx
16555
16555
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
16556
- function claudeAvailable() {
16557
- try {
16558
- execSync(
16559
- process.platform === "win32" ? "where claude" : "command -v claude",
16560
- { stdio: "ignore" }
16561
- );
16562
- return true;
16563
- } catch {
16564
- return false;
16565
- }
16566
- }
16567
16556
  function buildSteps() {
16568
- const hasClaude = claudeAvailable();
16569
16557
  return [
16570
16558
  {
16571
16559
  id: "cli-global",
@@ -16590,30 +16578,6 @@ function buildSteps() {
16590
16578
  label: "Also install the session viewer `canary-viewer` globally",
16591
16579
  commands: [{ file: "npm", args: ["i", "-g", "@usecanary/ui"] }],
16592
16580
  defaultSelected: false
16593
- },
16594
- {
16595
- id: "skills",
16596
- label: "Install the agent skills (any tool \u2014 ~/.claude/skills, etc.)",
16597
- commands: [
16598
- { file: "npx", args: ["-y", "skills", "add", "usecanary/canary"] }
16599
- ],
16600
- defaultSelected: true
16601
- },
16602
- {
16603
- id: "plugin",
16604
- label: hasClaude ? "Install the Claude Code plugin (slash commands)" : "Claude Code plugin (manual \u2014 Claude CLI not found)",
16605
- commands: hasClaude ? [
16606
- {
16607
- file: "claude",
16608
- args: ["plugin", "marketplace", "add", "usecanary/canary"]
16609
- },
16610
- {
16611
- file: "claude",
16612
- args: ["plugin", "install", "canary@canary-marketplace"]
16613
- }
16614
- ] : [],
16615
- manualHint: "/plugin marketplace add usecanary/canary then /plugin install canary@canary-marketplace",
16616
- defaultSelected: true
16617
16581
  }
16618
16582
  ];
16619
16583
  }
@@ -16679,13 +16643,6 @@ async function runSelected(steps, selected) {
16679
16643
  \u25B6 ${step.label}
16680
16644
  `);
16681
16645
  const commands = step.id === "runtime" && cliGlobal ? [{ file: "canary", args: ["install"] }] : step.commands;
16682
- if (commands.length === 0) {
16683
- if (step.manualHint) {
16684
- process.stdout.write(` ${step.manualHint}
16685
- `);
16686
- }
16687
- continue;
16688
- }
16689
16646
  let ok = true;
16690
16647
  for (const cmd of commands) {
16691
16648
  const code = await runInherit(cmd);
@@ -16708,6 +16665,11 @@ async function runSelected(steps, selected) {
16708
16665
  ` Open the viewer: ${viewer}`,
16709
16666
  " Demos: see examples/ in the repo",
16710
16667
  "",
16668
+ "Add the agent integration yourself (one-time):",
16669
+ " Agent skills (any tool): npx skills add usecanary/canary",
16670
+ " Claude Code plugin: /plugin marketplace add usecanary/canary",
16671
+ " /plugin install canary@canary-marketplace",
16672
+ "",
16711
16673
  ""
16712
16674
  ].join("\n")
16713
16675
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-canary",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "description": "Set up canary — browser automation + recorded QA sessions. Run `npm create canary`.",
6
6
  "license": "MIT",