affaan-m/ECC · error
Unknown argument: ${arg}
Error message
Unknown argument: ${arg} What it means
install-plan.js recognizes a fixed flag set: --help/-h, --json, --list-profiles, --list-modules, --list-components, --family, --profile, --modules, --with, --skill/--skills, --without, --config, and --target. Any other token falls through to the final else branch and is rejected as an unknown argument.
Source
Thrown at scripts/install-plan.js:115
}
index += 1;
} else if (arg === '--skill' || arg === '--skills') {
parsed.includeComponentIds.push(...normalizeSkillComponentIds(args[index + 1] || ''));
index += 1;
} else if (arg === '--without') {
const componentId = args[index + 1] || '';
if (componentId.trim()) {
parsed.excludeComponentIds.push(componentId.trim());
}
index += 1;
} else if (arg === '--config') {
parsed.configPath = args[index + 1] || null;
index += 1;
} else if (arg === '--target') {
parsed.target = args[index + 1] || null;
index += 1;
} else {
throw new Error(`Unknown argument: ${arg}`);
}
}
return parsed;
}
function printProfiles(profiles) {
console.log('Install profiles:\n');
for (const profile of profiles) {
console.log(`- ${profile.id} (${profile.moduleCount} modules)`);
console.log(` ${profile.description}`);
}
}
function printModules(modules) {
console.log('Install modules:\n');
for (const module of modules) {
console.log(`- ${module.id} [${module.kind}]`);View on GitHub (pinned to 01e15490f0)
Solutions
- Run node scripts/install-plan.js --help to list accepted flags
- Remove the unsupported flag
- If you meant --profile (install-plan) vs --harness (install-guided), confirm you are invoking the right script
Example fix
// before node scripts/install-plan.js --harness claude // after node scripts/install-plan.js --profile core
Defensive patterns
Strategy: validation
Validate before calling
const KNOWN = new Set(['--help','-h','--json','--list-profiles','--list-modules','--list-components','--family','--profile','--modules','--with','--skill','--skills','--without','--config','--target']);
for (const a of argv) {
if (a.startsWith('-') && !KNOWN.has(a)) throw new Error(`Unknown install-plan argument: ${a}`);
} Type guard
function isKnownInstallPlanArg(arg) {
return ['--help','-h','--json','--list-profiles','--list-modules','--list-components','--family','--profile','--modules','--with','--skill','--skills','--without','--config','--target'].includes(arg);
} Try / catch
try { parseInstallPlanArgs(argv); }
catch (err) {
if (/^Unknown argument:/.test(err.message)) {
console.error(`${err.message}\nRun: node scripts/install-plan.js --help`);
process.exit(2);
}
throw err;
} Prevention
- Note that install-plan and install-guided accept different flags
- Keep a help-output snapshot and assert it in CI
- Resolve typos by diffing against --help before scripting
When it happens
Trigger: Passing --harness (an install-guided flag), --root (a harness-audit flag), --verbose, or a typo like --profil.
Common situations: Cross-contaminating flags from install-guided.js or harness-audit.js, using an outdated flag, or shell autocomplete inserting the wrong option.
Related errors
- --write requires a path
- Unknown argument: ${arg}
- Invalid ${flag}: expected a single cache path segment
- Unknown argument: ${arg}
- Missing value for ${arg}
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/ffb928a984d4a9ec.
Report an issue: GitHub.