@opul/cli 0.1.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.
- package/README.md +49 -0
- package/dist/index.js +1391 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# opul
|
|
2
|
+
|
|
3
|
+
Record a polished product-demo video from your running web app — from the terminal.
|
|
4
|
+
|
|
5
|
+
Point Opul at localhost (or staging/production), click through your app once, and get a clean 60 fps MP4: eased cursor, click ripples, captions from your steps, a poster, and an end card. Publish it for a shareable link, or just keep the file.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx opul doctor # check prerequisites
|
|
9
|
+
npx opul record --url http://localhost:3000 # click through your app → steps file
|
|
10
|
+
npx opul demo --url http://localhost:3000 # → ./opul-out/demo.mp4 + poster.jpg
|
|
11
|
+
npx opul publish ./opul-out/demo.mp4 # → https://opul.dev/d/<slug>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
Opul drives your **local Google Chrome** and encodes with **ffmpeg** — both must be installed:
|
|
17
|
+
|
|
18
|
+
- **Google Chrome** (stable). Or set `PUPPETEER_EXECUTABLE_PATH`.
|
|
19
|
+
- **ffmpeg** on your PATH — `brew install ffmpeg` (macOS) · `apt install ffmpeg` (Linux).
|
|
20
|
+
|
|
21
|
+
Run `opul doctor` to verify.
|
|
22
|
+
|
|
23
|
+
## How it works
|
|
24
|
+
|
|
25
|
+
1. **`opul record --url <url>`** opens a browser; you click/type through your flow, and it writes an `opul.steps.json` (preferring `data-demo` selectors, turning button labels into on-screen captions). You can also hand-write or edit the file.
|
|
26
|
+
2. **`opul demo --url <url>`** replays those steps, capturing real 60 fps frames over the Chrome DevTools Protocol, and encodes an MP4 + poster. Capture stays on your machine.
|
|
27
|
+
3. **`opul publish <file>`** uploads it to [opul.dev](https://opul.dev) and returns a link. Recording is free; hosted links are the subscription. `opul login` first.
|
|
28
|
+
|
|
29
|
+
## Commands
|
|
30
|
+
|
|
31
|
+
| Command | |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `opul doctor` | Check Chrome + ffmpeg |
|
|
34
|
+
| `opul init` | Write a starter `opul.steps.json` |
|
|
35
|
+
| `opul record --url <url>` | Click through your app to generate the steps file |
|
|
36
|
+
| `opul demo --url <url> [--steps f] [--out d] [--headed]` | Render the MP4 + poster |
|
|
37
|
+
| `opul login` / `logout` / `whoami` | Account (GitHub) |
|
|
38
|
+
| `opul publish <file> [--title t] [--replace slug]` | Publish and get a link |
|
|
39
|
+
| `opul ls` / `opul rm <slug>` | Manage published demos |
|
|
40
|
+
|
|
41
|
+
Point the CLI at a self-hosted instance with `OPUL_API=https://your-host`.
|
|
42
|
+
|
|
43
|
+
## Steps file
|
|
44
|
+
|
|
45
|
+
Steps are explicit (`opul.steps.json`) — Opul never invents clicks. Actions: `goto`, `wait`, `click`, `type`, `hover`, `scroll`, `pause`. See [opul.dev](https://opul.dev).
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
macOS + Chrome first-class today; Node ≥ 18.
|