# 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 `npx 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. `npx` runs the CLI binary directly. It passes the argument as an inert `argv` value. It does not run a shell over the value. `npx paperclipai` works on any machine with Node: it runs a local install of the `paperclipai` package, and it fetches the published package when no local install is present. Do not use `pnpm paperclipai` for a content-bearing argument. `pnpm paperclipai` is a `package.json` script. `pnpm` builds a `/bin/sh` command string and appends the argument to it, so the shell reads the argument first. The shell interprets these spans 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) 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. This is true even when the argument comes from a quoted shell variable, because `pnpm` re-evaluates the value in its own shell. Safe forms: - `npx paperclipai ` — the documented default. It passes an inert `argv` value and runs on any machine. - `node cli/node_modules/tsx/dist/cli.mjs cli/src/index.ts ` — the safe form to run the local source from a monorepo checkout. It is the exact command that the `pnpm paperclipai` script wraps, but it runs directly, so no shell reads the argument. Use it when you must test your local `cli/src` changes with a content-bearing argument. Unsafe or broken forms: - `pnpm paperclipai ` — unsafe. `pnpm` runs the argument through a shell first. - `pnpm run