Skip to main content

Introduction

The Paperclip CLI (paperclipai) is the primary tool for setting up, configuring, and running your Paperclip instance. It provides interactive wizards, diagnostic tools, and utilities for managing your AI agent control plane.

Installation

Install the Paperclip CLI globally via npm:
Or use it directly with npx:

Quick Start

Get started with a new Paperclip instance in three commands:

CLI Version

Current version: 0.2.5 Check your installed version:

Global Options

These options are available across all commands:

--config <path>

Path to custom config file. Defaults to ~/.paperclip/instances/default/config.json.

--data-dir <path>

Paperclip data directory root. Isolates state from the default ~/.paperclip directory.

Core Commands

Setup & Configuration

onboard

Interactive first-run setup wizard

configure

Update configuration sections

Operations

run

Bootstrap and run Paperclip server

doctor

Run diagnostic checks and repairs

Additional Commands

env

Print environment variables for deployment:
Generates an export block with all required and optional environment variables for production deployment.

allowed-hostname

Add a hostname to the allowed list for authenticated/private mode:
Arguments:
  • <host> - Hostname to allow (e.g., dotta-macbook-pro)

heartbeat run

Run one agent heartbeat and stream live logs:
Required Options:
  • --agent-id <agentId> - Agent ID to invoke
Optional:
  • --source <source> - Invocation source: timer, assignment, on_demand, automation (default: on_demand)
  • --trigger <trigger> - Trigger detail: manual, ping, callback, system (default: manual)
  • --timeout-ms <ms> - Max time to wait before giving up (default: 0 = no timeout)
  • --json - Output raw JSON where applicable
  • --debug - Show raw adapter stdout/stderr JSON chunks

auth bootstrap-ceo

Create a one-time bootstrap invite URL for the first instance admin:
Options:
  • --force - Create new invite even if admin already exists
  • --expires-hours <hours> - Invite expiration window in hours (default: 72, max: 720)
  • --base-url <url> - Public base URL used to print invite link
This command is only required for authenticated deployment mode. It’s skipped in local_trusted mode.

Client API Commands

The CLI includes client commands for interacting with a running Paperclip instance:
  • context - Manage CLI context profiles
  • company - Company operations
  • issue - Issue management
  • agent - Agent operations
  • approval - Approval workflows
  • activity - Activity logs
  • dashboard - Dashboard views
Use --context <path> or --profile <name> to specify connection details.

Configuration Files

The CLI manages several configuration files:

Environment Variables

PAPERCLIP_HOME

Override the Paperclip home directory (default: ~/.paperclip):

PAPERCLIP_INSTANCE_ID

Set the instance ID for multi-instance setups (default: default):

PAPERCLIP_CONFIG

Explicit path to config file:

Instance Management

Paperclip supports multiple isolated instances using the PAPERCLIP_INSTANCE_ID environment variable or --instance flag. Each instance has its own:
  • Configuration
  • Database (if using embedded-postgres)
  • Logs
  • Secrets
  • Storage
Example: Running multiple instances
Instance data is stored in ~/.paperclip/instances/<instance-id>/.

Troubleshooting

Command not found

If paperclipai is not found after installation:
  1. Verify installation:
  2. Check npm global bin path:
  3. Ensure global bin directory is in your PATH:

Permission errors

If you encounter permission errors during installation:

Config file location

Find your active config file:
View instance paths:

Next Steps

Set up your instance

Run the interactive setup wizard

Diagnose issues

Check your Paperclip installation