affaan-m/ECC · error · Error

Missing --repo <owner/repo>.

Error message

Missing --repo <owner/repo>.

What it means

Thrown by main() in scripts/github-coordination.js when the --repo flag is not provided (options.repo is falsy). The --repo <owner/repo> flag is mandatory for all commands because every operation targets a specific GitHub repository.

Source

Thrown at scripts/github-coordination.js:170

  throw new Error(`Unknown command: ${options.command}`);
}

function formatOutput(payload, options) {
  if (options.json) {
    process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
  } else if (options.command === 'sync' || options.command === 'unblock') {
    process.stdout.write(formatCollection(payload));
  } else {
    process.stdout.write(formatSummary(payload));
  }
}

async function main() {
  let store = null;
  try {
    const options = parseArgs(process.argv);
    if (options.help) usage(0);
    if (!options.repo) throw new Error('Missing --repo <owner/repo>.');

    const policy = loadPolicy(process.cwd(), options.configPath);
    store = await openStore({
      dbPath: options.dbPath,
      homeDir: options.homeDir || process.env.HOME || os.homedir(),
    });

    const payload = dispatchCommand(options, { store, policy, rootDir: process.cwd() });
    formatOutput(payload, options);
  } catch (error) {
    console.error(`Error: ${error.message}`);
    process.exit(1);
  } finally {
    if (store) store.close();
  }
}

if (require.main === module) {

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Add --repo <owner/repo> to your command.
  2. Verify the repo value is in 'owner/repo' format (e.g. 'affaan-m/ECC').
  3. Check that any shell variable used for the repo value is set and non-empty.
  4. Run --help to confirm the flag name and format.

Example fix

// before
node scripts/github-coordination.js sync
// after
node scripts/github-coordination.js sync --repo owner/repo
Defensive patterns

Strategy: validation

Validate before calling

if (!options.repo || !/^[\w.-]+\/[\w.-]+$/.test(options.repo)) {
  console.error('Missing or invalid --repo. Expected format: owner/repo');
  process.exit(1);
}

Type guard

function isValidRepoRef(repo) {
  return typeof repo === 'string' && /^[\w.-]+\/[\w.-]+$/.test(repo);
}

Prevention

When it happens

Trigger: Running any github-coordination command without the --repo flag, e.g. `node scripts/github-coordination.js sync` or `node scripts/github-coordination.js claim --issue 5`.

Common situations: Forgetting --repo entirely, or misspelling it (e.g. `--repository`), or a shell variable expansion that produces an empty value.

Related errors


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