From 1f9b0b96c4449de3138808c92934f47b1d632c19 Mon Sep 17 00:00:00 2001 From: Eric Rodriguez Date: Tue, 16 Jun 2026 10:10:48 +0200 Subject: [PATCH 1/8] docs: replace hand-built demo SVG with a VHS recording MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README demo was a 720px hand-authored SMIL SVG with fabricated output — narrow enough that real output lines clipped ('truncated'). Switch to VHS (charmbracelet/vhs): docs/demo.tape records REAL pdcli at 1200px/16px into a crisp, brand-themed animated WebP, regenerable via 'npm run docs:demo'. - add docs/demo.tape (read-only aggregate commands; no PII; repeatable) - docs:demo now runs 'vhs docs/demo.tape' → docs/demo.webp - README → docs/demo.webp; CONTRIBUTING documents the vhs requirement - retire scripts/gen-demo.mjs, its test, and docs/demo.svg NOTE: docs/demo.webp must be generated (vhs needed; not in CI). Run 'npm run docs:demo' against a sandbox profile and commit the webp before merge. --- CONTRIBUTING.md | 4 +- README.md | 2 +- docs/demo.svg | 19 ----- docs/demo.tape | 43 +++++++++++ package.json | 2 +- scripts/gen-demo.mjs | 162 ------------------------------------------ test/gen-demo.test.js | 123 -------------------------------- 7 files changed, 48 insertions(+), 307 deletions(-) delete mode 100644 docs/demo.svg create mode 100644 docs/demo.tape delete mode 100644 scripts/gen-demo.mjs delete mode 100644 test/gen-demo.test.js diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d92e11..3783ceb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,7 +89,9 @@ Some files are produced by scripts; edit the generator, not the output: - `docs/commands.md` and the website command reference — `npm run docs:commands` (run after `npm run build`, which writes the oclif manifest). -- `docs/demo.svg` (the animated README terminal) — `npm run docs:demo`. +- `docs/demo.webp` (the animated README terminal) — `npm run docs:demo`, which + runs [VHS](https://github.com/charmbracelet/vhs) on `docs/demo.tape`. Requires + `vhs` installed and an authenticated pdcli profile (point it at a sandbox). `oclif.manifest.json` is generated and git-ignored; never commit it. diff --git a/README.md b/README.md index 444c808..63718b0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![Docs](https://img.shields.io/badge/docs-wavyx.github.io%2Fpdcli-1292EE)](https://wavyx.github.io/pdcli/)

- pdcli demo — running pipeline health and a winning deal update + pdcli demo — pipeline health, deal summary, and pipeline coverage

Command-line interface for [Pipedrive](https://www.pipedrive.com/) — fast, scriptable, built for terminals, CI pipelines, and AI agents. diff --git a/docs/demo.svg b/docs/demo.svg deleted file mode 100644 index 10d94e1..0000000 --- a/docs/demo.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - -zsh · ~/acme -pdcli pipeline health┌ SALES PIPELINE ───────────────── Q2 ┐Qualified 18 deals €142,000Contact 11 deals € 98,500Proposal 7 deals € 76,200Negotiation 4 deals € 51,000─────────────────────────────────────weighted forecast €221,480win rate 32% · avg cycle 24dpdcli deal update 4821 --status won✓ Acme renewal → Won · activity logged - - diff --git a/docs/demo.tape b/docs/demo.tape new file mode 100644 index 0000000..bf58276 --- /dev/null +++ b/docs/demo.tape @@ -0,0 +1,43 @@ +# docs/demo.tape — regenerate the animated README terminal with VHS. +# +# brew install vhs # or: go install github.com/charmbracelet/vhs@latest +# npm run docs:demo # runs: vhs docs/demo.tape → docs/demo.webp +# +# This records REAL pdcli output, so run it against an AUTHENTICATED profile — +# point it at a sandbox/demo account, not production. The commands below are +# read-only and show aggregates only (no contact PII). Swap them freely, but +# avoid mutating commands so the recording is repeatable. + +Output docs/demo.webp + +Require pdcli + +# --- look & feel ------------------------------------------------------------- +Set Shell bash +Set FontSize 16 +Set Width 1200 # wide enough that no output line clips (the old SVG was 720) +Set Height 760 +Set Padding 28 +Set BorderRadius 12 +Set TypingSpeed 45ms +Set CursorBlink true +# Brand palette (matches the docs site / old demo): dark green ground, mint accent. +Set Theme { "name": "pdcli", "background": "#0c1611", "foreground": "#c9d4cd", "cursor": "#4ade80", "selection": "#1f2b24", "black": "#0a120e", "brightBlack": "#6b7d72", "red": "#e06c75", "brightRed": "#e06c75", "green": "#4ade80", "brightGreen": "#4ade80", "yellow": "#e5c07b", "brightYellow": "#e5c07b", "blue": "#61afef", "brightBlue": "#61afef", "magenta": "#c678dd", "brightMagenta": "#c678dd", "cyan": "#56b6c2", "brightCyan": "#56b6c2", "white": "#c9d4cd", "brightWhite": "#ffffff" } + +# --- start clean ------------------------------------------------------------- +Hide +Type "clear" Enter +Show + +# --- scenes (read-only, aggregate output) ------------------------------------ +Type "pdcli pipeline health" Sleep 400ms Enter +Sleep 2.8s + +Type "pdcli deal summary --status open" Sleep 400ms Enter +Sleep 2.8s + +Type "pdcli metrics coverage --target 500000" Sleep 400ms Enter +Sleep 3s + +# hold the final frame so the loop doesn't appear cut off +Sleep 1.8s diff --git a/package.json b/package.json index db2bc5e..5590e08 100644 --- a/package.json +++ b/package.json @@ -197,7 +197,7 @@ "scripts": { "build": "oclif manifest", "docs:commands": "npm run build && node scripts/gen-commands.mjs", - "docs:demo": "node scripts/gen-demo.mjs", + "docs:demo": "vhs docs/demo.tape", "lint": "eslint . && prettier --check .", "lint:fix": "eslint --fix . && prettier --write .", "test": "vitest run", diff --git a/scripts/gen-demo.mjs b/scripts/gen-demo.mjs deleted file mode 100644 index 37a9251..0000000 --- a/scripts/gen-demo.mjs +++ /dev/null @@ -1,162 +0,0 @@ -// Generates docs/demo.svg — a self-contained, animated SVG terminal that types -// two real pdcli commands and reveals their output, on a ~12s loop. -// -// Constraints (so it renders inside a GitHub README ): -// - SMIL only — no