fix(cli): default capture output to ./capture/ (auto-suffix capture-2/, capture-3/ on re-run)

`hyperframes capture <url>` (no -o) used to dump into `./captures/<hostname>/`,
which buries the project two levels deep and silently merges re-runs into the
previous dir — file-by-file, so leftover screenshots / assets from the prior
run stay mixed in and any later `glob` sees both.

Switch the default to `./capture/`. When it already exists, auto-suffix to
`./capture-2/`, `./capture-3/`, … (up to -99). Each capture is its own clean
directory — no crud, no friction, no clobber. The CLI prints a one-line note
when the suffix kicks in so the user sees which dir actually got written.
Explicit `-o <name>` is unaffected (still overwrite-tolerant).
This commit is contained in:
ukimsanov
2026-06-16 22:26:31 -07:00
parent cc7c206e9c
commit 969d6a334b
5 changed files with 34 additions and 18 deletions
+2 -2
View File
@@ -84,8 +84,8 @@ async function extractVideoFrameToBuffer(
}
export const examples: Example[] = [
["Capture 5 key frames from a composition", "snapshot captures/stripe"],
["Capture 10 evenly-spaced frames", "snapshot captures/stripe --frames 10"],
["Capture 5 key frames from a composition", "snapshot capture"],
["Capture 10 evenly-spaced frames", "snapshot capture --frames 10"],
];
/**