paperclipai/paperclip · error · UsageError

Missing required --${name}

Error message

Missing required --${name}

What it means

CLI usage validation in the paperclip-task bridge skill: a required --flag was absent or had no value (a following token starting with -- is treated as the next flag, so --key --other yields key=true). The UsageError tells the operator which flag is missing; supply the required string value and rerun.

Source

Thrown at packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs:89

    if (!next || next.startsWith("--")) {
      out[key] = true;
      continue;
    }
    out[key] = next;
    i += 1;
  }
  return out;
}

function readStringFlag(args, name) {
  const value = args[name];
  if (typeof value !== "string" || value.trim().length === 0) return null;
  return value;
}

function requireStringFlag(args, name) {
  const value = readStringFlag(args, name);
  if (!value) throw new UsageError(`Missing required --${name}`);
  return value;
}

function boolFlag(args, name) {
  return args[name] === true;
}

function normalizeApiBaseUrl(raw) {
  if (!raw || typeof raw !== "string" || raw.trim().length === 0) {
    throw new UsageError("PAPERCLIP_API_URL is required");
  }
  const trimmed = raw.trim().replace(/\/+$/, "");
  return trimmed.endsWith("/api") ? trimmed : `${trimmed}/api`;
}

function getConfig() {
  const apiKey = process.env.PAPERCLIP_BRIDGE_API_KEY?.trim() || process.env.PAPERCLIP_API_KEY?.trim();
  if (!apiKey) throw new UsageError("PAPERCLIP_BRIDGE_API_KEY is required");

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Pass the required --<name> flag with a value when invoking the command.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs:89 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/f22d0c2b41e801a5. Report an issue: GitHub.