chenhg5/cc-connect · error
--video requires a path
Error message
--video requires a path
What it means
The --video flag of `cc-connect send` requires a path argument. parseSendArgs returns "--video requires a path" when the flag is last or is followed by another flag. Validation happens in the parser, before the file is loaded or sent.
Source
Thrown at cmd/cc-connect/send.go:133
return req, "", fmt.Errorf("--image requires a path")
}
i++
imagePaths = append(imagePaths, args[i])
case "--file":
if i+1 >= len(args) {
return req, "", fmt.Errorf("--file requires a path")
}
i++
filePaths = append(filePaths, args[i])
case "--audio":
if i+1 >= len(args) {
return req, "", fmt.Errorf("--audio requires a path")
}
i++
audioPaths = append(audioPaths, args[i])
case "--video":
if i+1 >= len(args) {
return req, "", fmt.Errorf("--video requires a path")
}
i++
videoPaths = append(videoPaths, args[i])
case "--stdin":
useStdin = true
case "--at-users":
if i+1 >= len(args) {
return req, "", fmt.Errorf("--at-users requires a value")
}
i++
for _, uid := range strings.Split(args[i], ",") {
uid = strings.TrimSpace(uid)
if uid != "" {
req.AtUsers = append(req.AtUsers, uid)
}
}
case "--at-all":
req.AtAll = trueView on GitHub (pinned to 4000b2338a)
Solutions
- Provide the path: `--video ./clip.mp4`.
- Quote paths containing spaces.
- Validate the file exists (and variable non-empty) before invoking cc-connect.
- Repeat --video per file.
Example fix
// before cc-connect send --video // after cc-connect send --video ./clips/demo.mp4
Defensive patterns
Strategy: validation
Validate before calling
V=./demo.mp4
[ -n "$V" ] || { echo "video path empty"; exit 1; }
cc-connect send --video "$V" Prevention
- Place the path immediately after --video.
- Confirm the recording pipeline produced the file.
- Quote paths with spaces.
- Check argument order when combining many flags.
When it happens
Trigger: `cc-connect send --video` with no trailing path; `cc-connect send --video --stdin`; the video filename consumed by a different flag due to argument ordering mistakes.
Common situations: Screen-recording step produced no file so the variable is empty; command built from a config where the video path key was missing; quoting mangled when copying commands between shells.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- --image requires a path
- --file requires a path
- --audio requires a path
- unknown flag: %s
- unknown top-level command: %s
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/1ce47bb8c3766c49.
Report an issue: GitHub.