{"record":{"id":"b10501e9ae32b46e","repo":"paperclipai/paperclip","slug":"source-path-or-url-is-required","errorCode":null,"errorMessage":"Source path or URL is required.","messagePattern":"Source path or URL is required\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/company.ts","lineNumber":1665,"sourceCode":"      .option(\"--target <mode>\", \"Target mode: new | existing\")\n      .option(\"-C, --company-id <id>\", \"Existing target company ID\")\n      .option(\"--new-company-name <name>\", \"Name override for --target new\")\n      .option(\"--agents <list>\", \"Comma-separated agent slugs to import, or all\", \"all\")\n      .option(\"--collision <mode>\", \"Collision strategy: rename | skip | replace\", \"rename\")\n      .option(\"--ref <value>\", \"Git ref to use for GitHub imports (branch, tag, or commit)\")\n      .option(\"--paperclip-url <url>\", \"Alias for --api-base on this command\")\n      .option(\"--yes\", \"Accept default selection and skip the pre-import confirmation prompt\", false)\n      .option(\"--dry-run\", \"Run preview only without applying\", false)\n      .action(async (fromPathOrUrl: string, opts: CompanyImportOptions) => {\n        try {\n          if (!opts.apiBase?.trim() && opts.paperclipUrl?.trim()) {\n            opts.apiBase = opts.paperclipUrl.trim();\n          }\n          const ctx = resolveCommandContext(opts);\n          const interactiveView = isInteractiveTerminal() && !ctx.json;\n          const from = fromPathOrUrl.trim();\n          if (!from) {\n            throw new Error(\"Source path or URL is required.\");\n          }\n\n          const include = resolveImportInclude(opts.include);\n          const agents = parseAgents(opts.agents);\n          const collision = (opts.collision ?? \"rename\").toLowerCase() as CompanyCollisionMode;\n          if (![\"rename\", \"skip\", \"replace\"].includes(collision)) {\n            throw new Error(\"Invalid --collision value. Use: rename, skip, replace\");\n          }\n\n          const inferredTarget = opts.target ?? (opts.companyId || ctx.companyId ? \"existing\" : \"new\");\n          const target = inferredTarget.toLowerCase() as CompanyImportTargetMode;\n          if (![\"new\", \"existing\"].includes(target)) {\n            throw new Error(\"Invalid --target value. Use: new | existing\");\n          }\n\n          const existingTargetCompanyId = opts.companyId?.trim() || ctx.companyId;\n          const targetPayload =\n            target === \"existing\"","sourceCodeStart":1647,"sourceCodeEnd":1683,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/company.ts#L1647-L1683","documentation":"The positional source argument for company import trimmed to an empty string, so there is no local path, zip, or URL to import from.","triggerScenarios":"Thrown at cli/src/commands/client/company.ts:1665 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a source argument: a GitHub URL, owner/repo shorthand, or a local directory path."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}