# CLI Reference Paperclip CLI now supports both: - installation and lifecycle management (`install`, `uninstall`, `update`, `upgrade`, `service`) - instance setup/diagnostics (`onboard`, `doctor`, `configure`, `env`, `allowed-hostname`, `env-lab`) - control-plane client operations (issues, approvals, agents, activity, dashboard) ## Security: safe invocation for content-bearing arguments Use `pnpm exec paperclipai` for any command whose argument can hold untrusted or semi-trusted content. Untrusted content includes issue text, comment bodies, Markdown, pasted snippets, and model output. `pnpm exec` runs the installed binary directly. It passes the argument as an inert `argv` value. It does not run a shell over the value. Do not use `pnpm paperclipai` for a content-bearing argument. The safe form and the unsafe form differ only by the `exec` keyword, so read the command with care. `pnpm paperclipai` is a `package.json` script. `pnpm` runs the argument through `/bin/sh` first. The shell interprets these metacharacters before the CLI starts: - command substitution: a backtick pair or `$( )` - variable expansion: `$NAME` or `${NAME}` (this can leak a secret value into the persisted argument) - other shell syntax: `; | & < >` A crafted value can run an arbitrary command as the invoking user. A crafted value can also expand an environment variable into the stored argument. No CLI-side check stops this, because the shell runs before `cli/src` starts. Safe forms: - `pnpm exec paperclipai ` — the documented default - `npx paperclipai ` — also injection-safe; use it when no local install is present. `npx` fetches the package from the npm registry when the binary is not installed locally, so a mistyped name can start a network fetch. `pnpm exec` never does this; it runs only the locally installed binary. - `node /dist/index.js ` — trusted direct-binary call Unsafe forms for a content-bearing argument: - `pnpm paperclipai ` - `pnpm run