diff --git a/README.md b/README.md index ffa7fee..e266451 100644 --- a/README.md +++ b/README.md @@ -118,8 +118,8 @@ The agent then picks up `watch ` as a first-class command. Pin a specific version: ```bash -WATCH_CLI_VERSION=0.3.0 curl -fsSL \ - https://github.com/sonpiaz/watch-cli/releases/download/v0.3.0/install.sh | bash +curl -fsSL https://github.com/sonpiaz/watch-cli/releases/download/v0.3.3/install.sh \ + | WATCH_CLI_VERSION=0.3.3 bash ``` Or from a clone: @@ -257,9 +257,11 @@ to see what's behind the alias today. Most YouTube / TikTok / Reddit / Vimeo / public X work without setup. LinkedIn, private X posts, and Facebook need a session. -watch-cli auto-detects cookies from any signed-in browser +watch-cli tries every URL anonymously first. On a login wall it +retries with cookies from a signed-in browser on this machine (Chrome → Firefox → Safari → Edge → Brave → Chromium). Just sign in -normally and re-run. +normally and re-run. `WATCH_BROWSER=none` turns the browser step off; +cookies are read locally by yt-dlp and never stored or uploaded. For servers / CI without browsers, pass a manual cookies file: diff --git a/SKILL.md b/SKILL.md index 0c1122f..331b4f7 100644 --- a/SKILL.md +++ b/SKILL.md @@ -9,12 +9,18 @@ metadata: bins: - watch install: - - id: curl-install + - id: brew + kind: brew + formula: sonpiaz/tap/watch-cli + bins: + - watch + label: "Install watch-cli (Homebrew)" + - id: release-0.3.3 kind: shell - command: "curl -fsSL https://raw.githubusercontent.com/sonpiaz/watch-cli/main/install.sh | bash" + command: "curl -fsSL https://github.com/sonpiaz/watch-cli/releases/download/v0.3.3/install.sh | WATCH_CLI_VERSION=0.3.3 bash" bins: - watch - label: "Install watch-cli (curl)" + label: "Install watch-cli v0.3.3 (pinned release, SHA256-verified tarball)" --- Watch any social video → get an architecture diagram, working component, runnable notebook, or step-by-step cheat sheet — automatically. @@ -30,7 +36,7 @@ Reach for `watch` whenever the user gives you a video URL and wants you to do so - The user asks to "implement", "clone", "build", or "replicate" what is on screen in a video. - The user asks to "extract architecture from", "diagram", or "turn this paper talk into code" at a video URL. -Supported platforms: YouTube, X / Twitter, LinkedIn, TikTok, Vimeo, Reddit, Facebook. Login-walled sources fall back to the user's signed-in browser cookies automatically. +Supported platforms: YouTube, X / Twitter, LinkedIn, TikTok, Vimeo, Reddit, Facebook. Every URL is fetched anonymously first. Only when the platform answers with a login wall does `watch` retry with the cookies of a browser the user is already signed in to on this machine (Chrome, Firefox, Safari, Edge, Brave, Chromium, in that order); `WATCH_BROWSER=none` turns that step off and `--cookies ` replaces it with an exported cookie file. Cookies are read from the local browser profile by yt-dlp and sent only to the platform that issued them; watch-cli never stores or uploads them. ## What you get back @@ -89,4 +95,11 @@ Pass `--no-cache` only when the source itself has changed. A failed transcriptio - Do not surface API keys or environment variable names in chat. `KYMA_API_KEY` setup lives in the README. - Do not embed the locked pitch into a longer marketing paragraph. The description line above is the source of truth; reuse it verbatim where the host shows skill metadata. +## What leaves the machine + +- The video download goes to the platform hosting it, through yt-dlp. +- The extracted audio track is uploaded to Kyma API for transcription; frames and the video file stay on disk under `~/.watch-cli/archive`. With `--with-local` installed, transcription runs offline through whisper.cpp instead and nothing is uploaded. +- Browser cookies, when used, go only to the platform that set them (see above). +- Installation is pinned: the release installer downloads a tagged tarball and verifies its SHA256 against the checksum published on the same GitHub Release. Homebrew does the same through the formula's `sha256`. + Transcription runs through Kyma API. Get a key at https://kymaapi.com/?src=skill:watch and set `KYMA_API_KEY`; a one-hour video costs about $0.05. diff --git a/bin/dl-video b/bin/dl-video index 8da93fe..ac5c99c 100755 --- a/bin/dl-video +++ b/bin/dl-video @@ -149,15 +149,20 @@ fi # Tier 2: auto-detect signed-in browser. # Order: Chrome → Firefox → Safari → Edge → Brave → Chromium. -# Override via env: WATCH_BROWSER=firefox. +# Override via env: WATCH_BROWSER=firefox. WATCH_BROWSER=none skips +# this tier entirely, so a login wall fails with tag=download-auth +# instead of touching any browser profile. declare -a BROWSERS -if [[ -n "${WATCH_BROWSER:-}" ]]; then +if [[ "${WATCH_BROWSER:-}" == "none" ]]; then + BROWSERS=() +elif [[ -n "${WATCH_BROWSER:-}" ]]; then BROWSERS=("$WATCH_BROWSER") else BROWSERS=(chrome firefox safari edge brave chromium) fi -for BROWSER in "${BROWSERS[@]}"; do +# ${arr[@]+"${arr[@]}"} keeps `set -u` happy on an empty array (bash 3.2). +for BROWSER in ${BROWSERS[@]+"${BROWSERS[@]}"}; do echo "[dl-video] anonymous fetch failed, retrying with $BROWSER cookies…" >&2 if run_dl --cookies-from-browser "$BROWSER" 2>/tmp/dl-video.last.log; then if [[ -s "$OUT" ]]; then diff --git a/docs/cookies.md b/docs/cookies.md index 98370e7..8bcd7db 100644 --- a/docs/cookies.md +++ b/docs/cookies.md @@ -34,6 +34,16 @@ To force a specific browser: WATCH_BROWSER=firefox watch ``` +To never touch a browser profile (servers, shared machines, or when you +would rather see a login wall fail than have a session reused): + +```bash +WATCH_BROWSER=none watch +``` + +The download then stops at `tag=download-auth` for login-walled URLs; +pass `--cookies ` if you still need them. + ### Why this works `yt-dlp` reads cookies directly from your browser's local profile. The diff --git a/docs/releases.md b/docs/releases.md index 35f6e7f..f9d435e 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -287,8 +287,8 @@ tagged release tarball. curl -fsSL https://github.com/sonpiaz/watch-cli/releases/latest/download/install.sh | bash # pin a specific version -WATCH_CLI_VERSION=0.3.0 curl -fsSL \ - https://github.com/sonpiaz/watch-cli/releases/download/v0.3.0/install.sh | bash +curl -fsSL https://github.com/sonpiaz/watch-cli/releases/download/v0.3.3/install.sh \ + | WATCH_CLI_VERSION=0.3.3 bash ``` `releases/latest/download/` is a GitHub-managed redirect that @@ -350,7 +350,7 @@ The implementer must verify end to end before declaring done: against `watch-cli.tar.gz.sha256`, unpack and run `./watch-cli-0.3.0/install.sh` on a clean container. `watch --version` prints `watch-cli v0.3.0`. -3. **Pinned install.** Run the `WATCH_CLI_VERSION=0.3.0` curl form +3. **Pinned install.** Run the `WATCH_CLI_VERSION=0.3.3` curl form (the variable goes on the `bash` side of the pipe) on a second clean container. Same result. 4. **Latest install.** Run the `releases/latest/download/install.sh` form. Resolves to v0.3.0. diff --git a/install.sh b/install.sh index 231e189..0871bff 100755 --- a/install.sh +++ b/install.sh @@ -3,8 +3,8 @@ # Usage: # curl -fsSL https://github.com/sonpiaz/watch-cli/releases/latest/download/install.sh | bash # or pin a version: -# WATCH_CLI_VERSION=0.3.0 curl -fsSL \ -# https://github.com/sonpiaz/watch-cli/releases/download/v0.3.0/install.sh | bash +# curl -fsSL https://github.com/sonpiaz/watch-cli/releases/download/v0.3.3/install.sh \ +# | WATCH_CLI_VERSION=0.3.3 bash # or, from a clone: # ./install.sh # @@ -52,12 +52,13 @@ watch-cli installer Usage: curl -fsSL https://github.com/sonpiaz/watch-cli/releases/latest/download/install.sh | bash - WATCH_CLI_VERSION=0.3.0 curl -fsSL \ - https://github.com/sonpiaz/watch-cli/releases/download/v0.3.0/install.sh | bash + curl -fsSL https://github.com/sonpiaz/watch-cli/releases/download/v0.3.3/install.sh \ + | WATCH_CLI_VERSION=0.3.3 bash ./install.sh [--with-skill] [--with-mcp] [--with-local] Env: - WATCH_CLI_VERSION Pin to a specific release (e.g. 0.3.0). + WATCH_CLI_VERSION Pin to a specific release (e.g. 0.3.3). Set it on + the bash side of the pipe, not on curl. Unset → install the latest release. Flags: diff --git a/lib/version.sh b/lib/version.sh index 6f5abab..ed9d04b 100644 --- a/lib/version.sh +++ b/lib/version.sh @@ -12,5 +12,5 @@ # titled `release: vX.Y.Z`, merge, then tag the merge commit `vX.Y.Z` # and push. The tag fires the release workflow. -export WATCH_CLI_VERSION="0.3.2" +export WATCH_CLI_VERSION="0.3.3" export WATCH_CLI_VERSION_STRING="watch-cli v${WATCH_CLI_VERSION}"