Files
paperclip/docs/cli/overview.md
Dotta cabf09e7b1 feat(cli): add --data-dir flag to isolate local state
Add --data-dir option to all CLI commands, allowing users to override
the default ~/.paperclip root for config, context, database, logs, and
storage. Includes preAction hook to auto-derive --config and --context
paths when --data-dir is set. Add unit tests and doc updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:20:37 -06:00

1.5 KiB

title, summary
title summary
CLI Overview CLI installation and setup

CLI Overview

The Paperclip CLI handles instance setup, diagnostics, and control-plane operations.

Usage

pnpm paperclip --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:

pnpm paperclip run --data-dir ./tmp/paperclip-dev

Context Profiles

Store defaults to avoid repeating flags:

# Set defaults
pnpm paperclip context set --api-base http://localhost:3100 --company-id <id>

# View current context
pnpm paperclip context show

# List profiles
pnpm paperclip context list

# Switch profile
pnpm paperclip context use default

To avoid storing secrets in context, use an env var:

pnpm paperclip 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 — instance bootstrap, diagnostics, configuration
  2. Control-plane commands — issues, agents, approvals, activity