This project can run fully in local dev without setting up PostgreSQL manually.
For mode definitions and intended CLI behavior, see doc/DEPLOYMENT-MODES.md.
Current implementation status:
- canonical model:
local_trustedandauthenticated(withprivate/publicexposure)
- Node.js 20+
- pnpm 9+
From repo root:
pnpm install
pnpm devThis starts:
- API server:
http://localhost:3100 - UI: served by the API server in dev middleware mode (same origin as API)
Tailscale/private-auth dev mode:
pnpm dev --tailscale-authThis runs dev as authenticated/private and binds the server to 0.0.0.0 for private-network access.
Allow additional private hostnames (for example custom Tailscale hostnames):
pnpm paperclipai allowed-hostname dotta-macbook-proFor a first-time local install, you can bootstrap and run in one command:
pnpm paperclipai runpaperclipai run does:
- auto-onboard if config is missing
paperclipai doctorwith repair enabled- starts the server when checks pass
Build and run Paperclip in Docker:
docker build -t paperclip-local .
docker run --name paperclip \
-p 3100:3100 \
-e HOST=0.0.0.0 \
-e PAPERCLIP_HOME=/paperclip \
-v "$(pwd)/data/docker-paperclip:/paperclip" \
paperclip-localOr use Compose:
docker compose -f docker-compose.quickstart.yml up --buildSee doc/DOCKER.md for API key wiring (OPENAI_API_KEY / ANTHROPIC_API_KEY) and persistence details.
For local development, leave DATABASE_URL unset.
The server will automatically use embedded PostgreSQL and persist data at:
~/.paperclip/instances/default/db
Override home and instance:
PAPERCLIP_HOME=/custom/path PAPERCLIP_INSTANCE_ID=dev pnpm paperclipai runNo Docker or external database is required for this mode.
For local development, the default storage provider is local_disk, which persists uploaded images/attachments at:
~/.paperclip/instances/default/data/storage
Configure storage provider/settings:
pnpm paperclipai configure --section storageWhen a local agent run has no resolved project/session workspace, Paperclip falls back to an agent home workspace under the instance root:
~/.paperclip/instances/default/workspaces/<agent-id>
This path honors PAPERCLIP_HOME and PAPERCLIP_INSTANCE_ID in non-default setups.
In another terminal:
curl http://localhost:3100/api/health
curl http://localhost:3100/api/companiesExpected:
/api/healthreturns{"status":"ok"}/api/companiesreturns a JSON array
To wipe local dev data and start fresh:
rm -rf ~/.paperclip/instances/default/db
pnpm devIf you set DATABASE_URL, the server will use that instead of embedded PostgreSQL.
Agent env vars now support secret references. By default, secret values are stored with local encryption and only secret refs are persisted in agent config.
- Default local key path:
~/.paperclip/instances/default/secrets/master.key - Override key material directly:
PAPERCLIP_SECRETS_MASTER_KEY - Override key file path:
PAPERCLIP_SECRETS_MASTER_KEY_FILE
Strict mode (recommended outside local trusted machines):
PAPERCLIP_SECRETS_STRICT_MODE=trueWhen strict mode is enabled, sensitive env keys (for example *_API_KEY, *_TOKEN, *_SECRET) must use secret references instead of inline plain values.
CLI configuration support:
pnpm paperclipai onboardwrites a defaultsecretsconfig section (local_encrypted, strict mode off, key file path set) and creates a local key file when needed.pnpm paperclipai configure --section secretslets you update provider/strict mode/key path and creates the local key file when needed.pnpm paperclipai doctorvalidates secrets adapter configuration and can create a missing local key file with--repair.
Migration helper for existing inline env secrets:
pnpm secrets:migrate-inline-env # dry run
pnpm secrets:migrate-inline-env --apply # apply migrationCompany deletion is intended as a dev/debug capability and can be disabled at runtime:
PAPERCLIP_ENABLE_COMPANY_DELETION=falseDefault behavior:
local_trusted: enabledauthenticated: disabled
Paperclip CLI now includes client-side control-plane commands in addition to setup commands.
Quick examples:
pnpm paperclipai issue list --company-id <company-id>
pnpm paperclipai issue create --company-id <company-id> --title "Investigate checkout conflict"
pnpm paperclipai issue update <issue-id> --status in_progress --comment "Started triage"Set defaults once with context profiles:
pnpm paperclipai context set --api-base http://localhost:3100 --company-id <company-id>Then run commands without repeating flags:
pnpm paperclipai issue list
pnpm paperclipai dashboard getSee full command reference in doc/CLI.md.
Agent-oriented invite onboarding now exposes machine-readable API docs:
GET /api/invites/:tokenreturns invite summary plus onboarding and skills index links.GET /api/invites/:token/onboardingreturns onboarding manifest details (registration endpoint, claim endpoint template, skill install hints).GET /api/skills/indexlists available skill documents.GET /api/skills/paperclipreturns the Paperclip heartbeat skill markdown.