{"record":{"id":"4ba91a9ff8cd4dc7","repo":"affaan-m/ECC","slug":"unsupported-it-command-command-missing","errorCode":null,"errorMessage":"Unsupported Itô command \"${command || \"(missing)\"}\"; ECC permits only login, logout, auth, find, status, and evals.","messagePattern":"Unsupported Itô command \"(.+?)\"; ECC permits only login, logout, auth, find, status, and evals\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ito.js","lineNumber":166,"sourceCode":"    return Object.freeze({ help: true, invocationArgs: [] });\n  }\n\n  if (environment.ECC_DRY_RUN === \"1\" || args.includes(\"--dry-run\")) {\n    throw new Error(\n      \"Itô compute has no paper or dry-run success mode. No CLI operation was invoked.\"\n    );\n  }\n\n  const jsonIndexes = args\n    .map((value, index) => (value === \"--json\" ? index : -1))\n    .filter((index) => index >= 0);\n  if (jsonIndexes.length > 1) {\n    throw new Error(\"--json may only be provided once\");\n  }\n  const withoutJson = args.filter((value) => value !== \"--json\");\n  const command = withoutJson.shift();\n  if (!SUPPORTED_COMMANDS.includes(command)) {\n    throw new Error(\n      `Unsupported Itô command \"${command || \"(missing)\"}\"; ECC permits only login, logout, auth, find, status, and evals.`\n    );\n  }\n  if (command === \"auth\" && withoutJson.includes(\"--no-browser\")) {\n    throw new Error(\"--no-browser is valid only for ecc ito login; auth is validation-only.\");\n  }\n  if (command === \"evals\") {\n    validateNodeQualificationArgs(withoutJson, environment);\n  }\n\n  return Object.freeze({\n    help: false,\n    invocationArgs: Object.freeze([\n      ...(jsonIndexes.length === 1 ? [\"--json\"] : []),\n      command,\n      ...withoutJson,\n    ]),\n  });","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ito.js#L148-L184","documentation":"parseArgs validates the first non-json argument against SUPPORTED_COMMANDS (login, logout, auth, find, status, evals). Any other or missing command throws this error listing the permitted set. The interpolated command shows \"(missing)\" when no command argument was supplied.","triggerScenarios":"Running `ecc ito deploy`, `ecc ito` (no subcommand), misspellings like `ecc ito statu` or `ecc ito login --json login`, or accidentally passing an option as the first argument, e.g. `ecc ito --json`.","commonSituations":"Typos in the subcommand; calling the script directly (node scripts/ito.js) with the wrong argv shape; older command names removed from the supported set; copy-pasted invocations from other ECC tools.","solutions":["Use one of the supported commands: ecc ito login | logout | auth | find | status | evals","Fix typos in the subcommand (check against the list in the error message)","Ensure the command is the first argument after any --json flag: `ecc ito --json status` is parsed as command=\"status\"","If running the script directly, pass argv as node scripts/ito.js status, not extra program name args"],"exampleFix":"// before\necc ito evaluate --live-sixtytwo ...\n// after\necc ito evals --live-sixtytwo ...","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['login', 'logout', 'auth', 'find', 'status', 'evals'];\nif (!SUPPORTED.includes(command)) throw new Error(`unknown ito command: ${command}`);","typeGuard":"const isItoCommand = (c) => ['login','logout','auth','find','status','evals'].includes(c);","tryCatchPattern":"try {\n  dispatch(command);\n} catch (e) {\n  if (e.message.includes('Unsupported Itô command')) {\n    printUsageAndExit(1);\n  } else throw e;\n}","preventionTips":["Validate the subcommand in wrapper scripts against the supported list before invoking","Read the supported commands from the error message rather than guessing command names","Guard against option-as-first-argument mistakes by always passing the command explicitly first"],"tags":["cli","invalid-command","argument-validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}