{"record":{"id":"0b8831c15041cf49","repo":"JuliusBrussee/caveman","slug":"unknown-option-value","errorCode":null,"errorMessage":"unknown option ${value}","messagePattern":"unknown option (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/create-caveman-agent/src/index.ts","lineNumber":75,"sourceCode":"  provider?: string;\n  install: boolean;\n} {\n  let provider: string | undefined;\n  let install = true;\n  const positional: string[] = [];\n  for (let index = 0; index < args.length; index++) {\n    const value = args[index]!;\n    if (value === \"--provider\") {\n      const candidate = args[++index];\n      if (!candidate || candidate.startsWith(\"--\")) throw new Error(\"--provider requires a value\");\n      provider = candidate;\n      continue;\n    }\n    if (value === \"--no-install\") {\n      install = false;\n      continue;\n    }\n    if (value.startsWith(\"--\")) throw new Error(`unknown option ${value}`);\n    positional.push(value);\n  }\n  if (positional.length !== 1) {\n    throw new Error(\n      USAGE,\n    );\n  }\n  return {\n    target: positional[0]!,\n    ...(provider === undefined ? {} : { provider }),\n    install,\n  };\n}\n\nasync function installDependencies(directory: string): Promise<void> {\n  const npmExecPath = process.env.npm_execpath;\n  const windowsShell = !npmExecPath && process.platform === \"win32\";\n  const command = npmExecPath","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/create-caveman-agent/src/index.ts#L57-L93","documentation":"The initializer's argv loop accepts exactly three options: --provider <value>, --no-install, and one positional project name. Any other token starting with `--` is unknown and rejected with its literal text, preventing silently ignored typos from changing scaffold behavior. It fails fast before files are created.","triggerScenarios":"Passing flags like --yes, --template, --force, or a typo such as --noinstall or --providr; anything beginning with `--` that is not --provider or --no-install.","commonSituations":"Users carrying habits from other create-* scaffolds (create-next-app flags), docs drift between versions of the initializer, or shell autocomplete injecting unexpected flags.","solutions":["Remove the unsupported flag — the tool supports only --provider <name> and --no-install.","For a typo, correct it (e.g. --noinstall → --no-install).","Check `npm create @caveman-ai/agent@latest -- --help` style output or the README for the current flag set of your version."],"exampleFix":"# before\nnpm create @caveman-ai/agent@latest myapp --template ts\n# after\nnpm create @caveman-ai/agent@latest myapp --provider anthropic --no-install","handlingStrategy":"validation","validationCode":"const KNOWN = new Set([\"--provider\", \"--no-install\"]);\nfunction argsSupported(args: string[]): boolean {\n  return args.filter(a => a.startsWith(\"--\")).every(a => KNOWN.has(a));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the initializer's README for the supported flag set of your version before scripting it.","Do not carry create-next-app style flags over to this tool.","Pin the initializer version in CI so flag sets do not drift under you."],"tags":["cli","arguments","validation"],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}