Spaces:
Paused
Paused
File size: 1,556 Bytes
b152fd5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | ---
title: CLI Overview
summary: CLI installation and setup
---
The Paperclip CLI handles instance setup, diagnostics, and control-plane operations.
## Usage
```sh
pnpm paperclipai --help
```
## Global Options
All commands support:
| Flag | Description |
|------|-------------|
| `--data-dir <path>` | Local Paperclip data root (isolates from `~/.paperclip`) |
| `--api-base <url>` | API base URL |
| `--api-key <token>` | API authentication token |
| `--context <path>` | Context file path |
| `--profile <name>` | Context profile name |
| `--json` | Output as JSON |
Company-scoped commands also accept `--company-id <id>`.
For clean local instances, pass `--data-dir` on the command you run:
```sh
pnpm paperclipai run --data-dir ./tmp/paperclip-dev
```
## Context Profiles
Store defaults to avoid repeating flags:
```sh
# Set defaults
pnpm paperclipai context set --api-base http://localhost:3100 --company-id <id>
# View current context
pnpm paperclipai context show
# List profiles
pnpm paperclipai context list
# Switch profile
pnpm paperclipai context use default
```
To avoid storing secrets in context, use an env var:
```sh
pnpm paperclipai context set --api-key-env-var-name PAPERCLIP_API_KEY
export PAPERCLIP_API_KEY=...
```
Context is stored at `~/.paperclip/context.json`.
## Command Categories
The CLI has two categories:
1. **[Setup commands](/cli/setup-commands)** — instance bootstrap, diagnostics, configuration
2. **[Control-plane commands](/cli/control-plane-commands)** — issues, agents, approvals, activity
|