paperclipai/paperclip · error · Error

Invalid --include value. Use one or more of: company,agents,

Error message

Invalid --include value. Use one or more of: company,agents,projects,issues,tasks,skills

What it means

Thrown by parseInclude() in company.ts when the --include value for `paperclipai company export` parses to NO recognized buckets. The parser splits on commas, lower-cases, and enables buckets company/agents/projects/issues(=tasks)/skills. If none of the provided tokens match any bucket name (or the value is non-empty but only contains unknown tokens), it refuses rather than exporting nothing or everything silently.

Source

Thrown at cli/src/commands/client/company.ts:185

function normalizeSelector(input: string): string {
  return input.trim();
}

function parseInclude(
  input: string | undefined,
  fallback: CompanyPortabilityInclude = DEFAULT_EXPORT_INCLUDE,
): CompanyPortabilityInclude {
  if (!input || !input.trim()) return { ...fallback };
  const values = input.split(",").map((part) => part.trim().toLowerCase()).filter(Boolean);
  const include = {
    company: values.includes("company"),
    agents: values.includes("agents"),
    projects: values.includes("projects"),
    issues: values.includes("issues") || values.includes("tasks"),
    skills: values.includes("skills"),
  };
  if (!include.company && !include.agents && !include.projects && !include.issues && !include.skills) {
    throw new Error("Invalid --include value. Use one or more of: company,agents,projects,issues,tasks,skills");
  }
  return include;
}

function parseAgents(input: string | undefined): "all" | string[] {
  if (!input || !input.trim()) return "all";
  const normalized = input.trim().toLowerCase();
  if (normalized === "all") return "all";
  const values = input.split(",").map((part) => part.trim()).filter(Boolean);
  if (values.length === 0) return "all";
  return Array.from(new Set(values));
}

function parseCsvValues(input: string | undefined): string[] {
  if (!input || !input.trim()) return [];
  return Array.from(new Set(input.split(",").map((part) => part.trim()).filter(Boolean)));
}

View on GitHub (pinned to 67001ec6eb)

Solutions

  1. Use only valid tokens from the message: company, agents, projects, issues, tasks, skills.
  2. Remember 'tasks' is an alias for 'issues' — either works.
  3. Omit --include entirely to get the full default export.
  4. Double-check spelling and casing (the parser lower-cases, so case does not matter, but the token must still match).

Example fix

// before
paperclipai company export --include compnay,agnts
// after
paperclipai company export --include company,agents
# or omit for all
paperclipai company export
Defensive patterns

Strategy: validation

Validate before calling

const VALID_BUCKETS = ['company', 'agents', 'projects', 'issues', 'tasks', 'skills'] as const;
function parseInclude(input: string | undefined): { company: boolean; agents: boolean; projects: boolean; issues: boolean; skills: boolean } {
  if (!input?.trim()) return { company: true, agents: true, projects: true, issues: true, skills: true };
  const tokens = input.split(',').map((s) => s.trim().toLowerCase()).filter(Boolean);
  const unknown = tokens.filter((t) => !VALID_BUCKETS.includes(t as any));
  if (unknown.length) throw new Error(`Unknown --include tokens: ${unknown.join(', ')}. Valid: ${VALID_BUCKETS.join(', ')}`);
  return {
    company: tokens.includes('company'),
    agents: tokens.includes('agents'),
    projects: tokens.includes('projects'),
    issues: tokens.includes('issues') || tokens.includes('tasks'),
    skills: tokens.includes('skills'),
  };
}

Try / catch

try { parseInclude(opts.include); }
catch (err) {
  const msg = err instanceof Error ? err.message : '';
  if (msg.startsWith('Invalid --include value.')) {
    console.error('Valid --include tokens: company,agents,projects,issues,tasks,skills (or omit for all).');
    process.exit(2);
  }
  throw err;
}

Prevention

When it happens

Trigger: Passing --include with only misspelled/unknown tokens, e.g. --include 'Compnay,agnts' or --include 'workflows'. Note: an empty/wholly-empty --include returns the default fallback (company,agents,projects,issues,tasks,skills) and does NOT throw; the throw only fires when at least one token was given but none matched.

Common situations: Typo in a bucket name (e.g. 'task' instead of 'tasks' is tolerated, but 'tasklist' is not). User assumes a bucket that does not exist in V1. Copy-paste from outdated docs.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/3e89bfc37f3fcb1a. Report an issue: GitHub.