{"record":{"id":"49cbb3269f5340ff","repo":"remix-run/remix","slug":"rmx-unknown-argument-49cbb3","errorCode":"RMX_UNKNOWN_ARGUMENT","errorMessage":"Unknown argument: ${argument}","messagePattern":"Unknown argument: (.+?)","errorType":"validation","errorClass":"UsageError","httpStatus":null,"severity":"error","filePath":"packages/cli/src/lib/parse-args.ts","lineNumber":60,"sourceCode":"    [keyof definitions, ParseArgsOptionSpec]\n  >) {\n    values[key] = (\n      spec.type === 'boolean' ? false : undefined\n    ) as ParsedArgsValues<definitions>[typeof key]\n    specsByFlag.set(spec.flag, { key, spec })\n  }\n\n  for (let index = 0; index < argv.length; index++) {\n    let arg = argv[index]!\n    let equalsIndex = arg.indexOf('=')\n    let flag = equalsIndex === -1 ? arg : arg.slice(0, equalsIndex)\n    let inlineValue = equalsIndex === -1 ? undefined : arg.slice(equalsIndex + 1)\n    let resolved = specsByFlag.get(flag)\n\n    if (resolved != null) {\n      if (resolved.spec.type === 'boolean') {\n        if (inlineValue !== undefined) {\n          throw unknownArgument(arg)\n        }\n\n        values[resolved.key] = true as ParsedArgsValues<definitions>[typeof resolved.key]\n        continue\n      }\n\n      if (inlineValue !== undefined) {\n        if (inlineValue.length === 0) {\n          throw missingOptionValue(flag)\n        }\n\n        values[resolved.key] = inlineValue as ParsedArgsValues<definitions>[typeof resolved.key]\n        continue\n      }\n\n      let next = argv[index + 1]\n      if (next == null || next.length === 0 || next.startsWith('-')) {\n        throw missingOptionValue(flag)","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/cli/src/lib/parse-args.ts#L42-L78","documentation":"Thrown by parseArgs when a flag that is registered as a boolean option is given an inline value with `=` (e.g. `--flag=value`). Boolean specs never accept values, so `--bool=false` is treated as an unknown argument form rather than being silently mis-parsed.","triggerScenarios":"Calling the CLI arg parser with `--someBool=true` or `--someBool=anything` where `someBool` is defined in the spec with `type: 'boolean'`.","commonSituations":"Users accustomed to `--flag=false` syntax from other CLI tools passing it to a Remix CLI command whose flag is boolean-only.","solutions":["Drop the `=value` part and pass the bare flag (e.g. `--flag` instead of `--flag=true`)","Check the command's flag definitions to confirm which flags are boolean","If you need value-taking behavior, use a flag defined with a value type"],"exampleFix":"# before\nremix create my-app --force=true\n# after\nremix create my-app --force","handlingStrategy":"validation","validationCode":"const BOOL_FLAGS = new Set(['force', 'verbose'])\nconst args = process.argv.slice(2)\nfor (const arg of args) {\n  if (arg.startsWith('--') && arg.includes('=')) {\n    const [name] = arg.slice(2).split('=')\n    if (BOOL_FLAGS.has(name)) throw new Error(`Boolean flag --${name} must not have a value`) \n  }\n}","typeGuard":"const isBooleanFlagWithInlineValue = (arg: string, boolFlags: Set<string>): boolean =>\n  arg.startsWith('--') && arg.includes('=') && boolFlags.has(arg.slice(2).split('=')[0])","tryCatchPattern":null,"preventionTips":["Document boolean flags in your tool's help text as value-less","Normalize user input before invoking parseArgs"],"tags":["cli","arguments","boolean-flag"],"backgroundTag":"invalid-cli-argument","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}