@walkrstudio/cli 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +45 -30
  2. package/package.json +2 -4
package/README.md CHANGED
@@ -1,51 +1,64 @@
1
- # @walkr/cli
1
+ # @walkrstudio/cli
2
2
 
3
- CLI for running Walkr demos in Studio and exporting media.
3
+ CLI for previewing and exporting Walkr walkthroughs.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- npm install -g @walkr/cli
8
+ npm install -g @walkrstudio/cli
9
9
  ```
10
10
 
11
- Or run without global install:
11
+ Or run without a global install:
12
12
 
13
13
  ```bash
14
- npx walkr
14
+ npx walkr <command>
15
15
  ```
16
16
 
17
17
  ## Commands
18
18
 
19
19
  ### `walkr dev <script>`
20
20
 
21
- Opens Walkr Studio with live reload.
21
+ Opens Walkr Studio with live reload. Write your walkthrough script, and the preview updates every time you save.
22
22
 
23
23
  ```bash
24
24
  walkr dev demo.ts
25
25
  ```
26
26
 
27
+ This starts a Vite dev server on port 5174, loads your script, proxies the target website, and opens the Studio UI in your browser.
28
+
27
29
  ### `walkr export <script> [options]`
28
30
 
29
- Exports a walkthrough to `mp4`, `gif`, `webm`, or `embed`.
31
+ Exports a walkthrough to video or a self-contained HTML embed.
30
32
 
31
33
  ```bash
32
- walkr export demo.ts --format mp4 --output demo.mp4
33
- ```
34
+ # MP4 (default)
35
+ walkr export demo.ts
34
36
 
35
- ### `walkr --help`
37
+ # GIF
38
+ walkr export demo.ts --format gif --output demo.gif
36
39
 
37
- Shows command help and examples.
40
+ # Self-contained HTML embed
41
+ walkr export demo.ts --format embed --output demo.html
42
+ ```
38
43
 
39
- ## `walkr export` options
44
+ **Options:**
40
45
 
41
- | Option | Type | Default | Description |
46
+ | Flag | Type | Default | Description |
42
47
  | --- | --- | --- | --- |
43
48
  | `--format` | `mp4 \| gif \| webm \| embed` | `mp4` | Output format. |
44
- | `--output` | `string` | `output.<ext>` | Output path. For `embed`, extension is `.html`. |
49
+ | `--output` | `string` | `output.<ext>` | Output file path. |
45
50
  | `--width` | `number` | `1920` | Render width in px. |
46
51
  | `--height` | `number` | `1080` | Render height in px. |
47
52
 
48
- ## Example `demo.ts`
53
+ ### `walkr --help`
54
+
55
+ Shows command usage and examples.
56
+
57
+ ### `walkr --version`
58
+
59
+ Prints the current version.
60
+
61
+ ## Example walkthrough script
49
62
 
50
63
  ```ts
51
64
  import {
@@ -54,18 +67,17 @@ import {
54
67
  click,
55
68
  type,
56
69
  highlight,
57
- scroll,
58
70
  wait,
59
- sequence,
60
- parallel,
71
+ scroll,
61
72
  zoom,
62
73
  pan,
63
- } from "@walkr/core";
74
+ sequence,
75
+ parallel,
76
+ } from "@walkrstudio/core";
64
77
 
65
78
  export default walkr({
66
- url: "https://example.com",
67
- title: "Walkr CLI demo",
68
- description: "A complete scripted walkthrough for local preview/export",
79
+ url: "https://your-app.com",
80
+ title: "Product demo",
69
81
  cursor: {
70
82
  shape: "circle",
71
83
  color: "#22d3ee",
@@ -74,9 +86,10 @@ export default walkr({
74
86
  clickColor: "#0ea5e9",
75
87
  },
76
88
  steps: [
77
- moveTo(620, 380, { duration: 700 }),
78
- click(620, 380),
79
- type("hello@example.com", { selector: "input[name=email]", delay: 35 }),
89
+ moveTo("#email-input", { duration: 600 }),
90
+ click("#email-input"),
91
+ type("hello@example.com", { selector: "#email-input", delay: 35 }),
92
+
80
93
  parallel(
81
94
  highlight(".submit-btn", {
82
95
  spotlight: true,
@@ -86,10 +99,11 @@ export default walkr({
86
99
  }),
87
100
  sequence(
88
101
  wait(200),
89
- moveTo(810, 505, { duration: 500 }),
102
+ moveTo(".submit-btn", { duration: 500 }),
90
103
  ),
91
104
  ),
92
- click(810, 505),
105
+ click(".submit-btn"),
106
+
93
107
  sequence(
94
108
  wait(300),
95
109
  scroll(0, 700, { smooth: true }),
@@ -103,6 +117,7 @@ export default walkr({
103
117
 
104
118
  ## Requirements
105
119
 
106
- - Node.js `>=18`
107
- - `pnpm`
108
- - `@walkr/playwright` installed in your project for `walkr export`
120
+ - Node.js >= 18
121
+ - `@walkrstudio/core` — defines the walkthrough
122
+ - `@walkrstudio/playwright` required for `walkr export` (peer dependency)
123
+ - `ffmpeg` — required on your system PATH for video encoding (mp4/gif/webm)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walkrstudio/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,10 +13,8 @@
13
13
  "publishConfig": {
14
14
  "access": "public"
15
15
  },
16
- "dependencies": {
17
- "@walkrstudio/core": "0.2.0"
18
- },
19
16
  "peerDependencies": {
17
+ "@walkrstudio/core": "^0.2.0",
20
18
  "@walkrstudio/playwright": "0.2.0"
21
19
  },
22
20
  "peerDependenciesMeta": {