paperclipai/paperclip · error · UsageError
Use either --${textFlag} or --${fileFlag}, not both
Error message
Use either --${textFlag} or --${fileFlag}, not both What it means
Error "Use either --${textFlag} or --${fileFlag}, not both" thrown in paperclipai/paperclip.
Source
Thrown at packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs:120
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");
return {
apiBaseUrl: normalizeApiBaseUrl(process.env.PAPERCLIP_API_URL),
apiKey,
runId: process.env.PAPERCLIP_RUN_ID?.trim() || null,
companyId: process.env.PAPERCLIP_COMPANY_ID?.trim() || null,
agentId: process.env.PAPERCLIP_AGENT_ID?.trim() || null,
};
}
async function readBody(args, textFlag, fileFlag) {
const direct = readStringFlag(args, textFlag);
const file = readStringFlag(args, fileFlag);
if (direct && file) throw new UsageError(`Use either --${textFlag} or --${fileFlag}, not both`);
if (direct) return direct;
if (!file) return null;
if (file === "-") {
return await new Promise((resolve, reject) => {
let data = "";
process.stdin.setEncoding("utf8");
process.stdin.on("data", (chunk) => {
data += chunk;
});
process.stdin.on("end", () => resolve(data));
process.stdin.on("error", reject);
});
}
return fs.readFile(file, "utf8");
}
async function apiFetch(config, path, options = {}) {
const headers = {View on GitHub (pinned to 120ae5428f)
Solutions
- Pass either the inline text flag or the file flag, not both.
When it happens
Trigger: Thrown at packages/adapters/hermes/skills/paperclip-task-bridge/paperclip-task.mjs:120 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/c0bdd3bee42f6209.
Report an issue: GitHub.