affaan-m/ECC · error · Error

Unknown argument: ${arg}

Error message

Unknown argument: ${arg}

What it means

Thrown by parseInstallArgs() when it encounters a token beginning with -- that does not match any recognized flag (--target, --config, --profile, --modules, --with, --skill(s), --without, --locale, --dry-run, --json, --help/-h). It is a hard stop against silently swallowing typo'd flags.

Source

Thrown at scripts/lib/install/request.js:78

      if (componentId.trim()) {
        parsed.excludeComponentIds.push(componentId.trim());
      }
      index += 1;
    } else if (arg === '--locale') {
      const locale = args[index + 1] || '';
      if (!locale || locale.startsWith('--')) {
        throw new Error('Missing value for --locale');
      }
      parsed.locale = locale;
      index += 1;
    } else if (arg === '--dry-run') {
      parsed.dryRun = true;
    } else if (arg === '--json') {
      parsed.json = true;
    } else if (arg === '--help' || arg === '-h') {
      parsed.help = true;
    } else if (arg.startsWith('--')) {
      throw new Error(`Unknown argument: ${arg}`);
    } else {
      parsed.languages.push(arg);
    }
  }

  return parsed;
}

function normalizeInstallRequest(options = {}) {
  const config = options.config && typeof options.config === 'object'
    ? options.config
    : null;
  const profileId = options.profileId || config?.profileId || null;
  const target = options.target || config?.target || 'claude';
  const moduleIds = validateInstallModuleIds(
    dedupeStrings([...(config?.moduleIds || []), ...(options.moduleIds || [])])
  );
  const locale = options.locale || config?.locale || null;

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Run with --help to list the accepted flags for your ECC version.
  2. Correct the typo or remove the unsupported flag.
  3. If you expected the flag to exist, upgrade ECC or open a feature request.

Example fix

# before
npx ecc install --lang python
# after
npx ecc install python
Defensive patterns

Strategy: validation

Validate before calling

const KNOWN_FLAGS = new Set(['--target','--config','--profile','--modules','--with','--skill','--skills','--without','--locale','--dry-run','--json','--help','-h']);
function findUnknownFlags(argv) {
  return argv.slice(2).filter(a => a.startsWith('--') && !KNOWN_FLAGS.has(a));
}

Try / catch

try {
  const parsed = parseInstallArgs(argv);
} catch (e) {
  if (/^Unknown argument: /.test(e.message)) {
    console.error(`${e.message}\nRun 'ecc install --help' for the accepted flags.`);
    process.exit(2);
  }
  throw e;
}

Prevention

When it happens

Trigger: Passing an unsupported flag like `--force`, `--global`, `--lang`, or a typo such as `--withh` or `--modoules`.

Common situations: Using flags from an older/newer ECC version; assuming an unimplemented option exists; copy-pasting flags from a different tool.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/a6090444f8066fa6. Report an issue: GitHub.