paperclipai/paperclip · error · Error
Usage: pnpm smoke:local-provider -- --profile <${PROFILE_IDS
Error message
Usage: pnpm smoke:local-provider -- --profile <${PROFILE_IDS.join("|")}|all> What it means
parseProfiles in the local provider smoke script validates its --profile CLI argument loop. If any argument is not exactly `--profile` or the flag has no following value, it immediately throws the usage message. The script supports only the known PROFILE_IDS (or `all`).
Source
Thrown at packages/paperclip-runner/scripts/run-local-provider-smoke.mjs:20
import { access, mkdir, mkdtemp, readdir, rm, stat } from "node:fs/promises";
import { tmpdir } from "node:os";
import { basename, join, resolve } from "node:path";
import { withIsolatedProfileCredentials } from "./local-provider-smoke-environment.mjs";
const PROFILE_IDS = [
"runner-acpx-claude",
"runner-acpx-codex",
"runner-codex",
"runner-opencode",
];
function parseProfiles(args) {
const selected = [];
for (let index = 0; index < args.length; index += 1) {
if (args[index] !== "--profile" || !args[index + 1]) {
throw new Error(
`Usage: pnpm smoke:local-provider -- --profile <${PROFILE_IDS.join("|")}|all>`,
);
}
selected.push(args[++index]);
}
if (selected.length === 0) return ["runner-acpx-claude"];
const expanded = selected.flatMap((profile) =>
profile === "all" ? PROFILE_IDS : [profile],
);
for (const profile of expanded) {
if (!PROFILE_IDS.includes(profile)) {
throw new Error(`Unsupported local provider smoke profile: ${profile}`);
}
}
return [...new Set(expanded)];
}
function liveCandidate(id, candidateSlots) {View on GitHub (pinned to 01ad858492)
Solutions
- Pass profiles as repeated flags: `pnpm smoke:local-provider -- --profile <id>` (repeat --profile for multiple, or use --profile all).
- Run `pnpm smoke:local-provider -- --profile all` to select every profile without listing IDs.
- Check PROFILE_IDS in packages/paperclip-runner/scripts/run-local-provider-smoke.mjs for the exact accepted profile names.
Example fix
// before pnpm smoke:local-provider -- claude // after pnpm smoke:local-provider -- --profile runner-acpx-claude
Defensive patterns
Strategy: validation
Validate before calling
const VALID = ['runner-acpx-claude','all'];
const i = process.argv.indexOf('--profile');
if (i === -1 || !process.argv[i+1]) throw new Error('pass --profile <id|all>'); Try / catch
try { execSync('pnpm smoke:local-provider -- --profile all', {stdio:'inherit'}); } catch (e) { console.error('usage:', e.message); process.exit(2); } Prevention
- Always use the --profile flag form
- Use --profile all when unsure of ids
- Check PROFILE_IDS before scripting invocations
When it happens
Trigger: Running `pnpm smoke:local-provider` with any argument that is not `--profile <id>`: passing an unknown flag (e.g. `--prof`), passing `--profile` as the last argument with no value, or passing positional arguments like a profile name without the flag.
Common situations: Typos in the flag name, forgetting the value after --profile, copying an invocation from another script that used positional args, or shell quoting dropping the value.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- unknown argument: ${args[index] ?? ""}
- missing ${args[index]}
- Unsupported local provider smoke profile: ${profile}
- ${flag} requires a comma-separated value
- Managed installs require Node.js ${MINIMUM_NODE_VERSION} or
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10).
Data as JSON: /api/errors/62e39c39d9e9c422.
Report an issue: GitHub.