paperclip_cli is a small Bash wrapper repo for running a self-contained local
Paperclip instance.
It is not the upstream Paperclip project. It is an operator-friendly wrapper
around upstream paperclipai/paperclip that:
- bootstraps a local Paperclip checkout into
vendor/paperclip - manages a repo-local runtime under
.paperclip-runtime/ - starts and stops Paperclip as a background
launchdservice on macOS - exposes the instance through Tailscale Serve when available
- falls back to local-only mode when Tailscale is not installed
- adds a few direct agent-control commands for listing agents and updating heartbeat / reasoning settings against the managed embedded Postgres instance
Prerequisites:
- macOS
gitnode20+pnpm9.xpython3curllsof- optional:
tailscale - optional for
agent ...commands:psql
Clone the repo and run:
git clone git@github.com:funcountry/paperclip_cli.git
cd paperclip_cli
chmod +x paperclip
./paperclip doctor
./paperclip start
./paperclip statusIf you do not want Tailscale exposure, force local-only mode:
PAPERCLIP_ENABLE_TAILSCALE=never ./paperclip startThe bootstrap invite for the first CEO login is written to:
.paperclip-runtime/bootstrap-invite.txt
This repo stays small. The first start clones upstream Paperclip into:
vendor/paperclip
Runtime state stays local to this repo:
.paperclip-runtime/
paperclip.env
logs/
home/
bootstrap-invite.txt
Nothing under .paperclip-runtime/ or vendor/ is committed by default.
./paperclip start
./paperclip stop
./paperclip status
./paperclip doctor
./paperclip agent list [--tree]
./paperclip agent heartbeat set <agent-name-or-id> <seconds|Ns|Nm|Nh> [--self|--self-and-reports] [--dry-run]
./paperclip agent thinking set <agent-name-or-id> <minimal|low|medium|high|xhigh> [--self|--self-and-reports] [--dry-run]
Examples:
./paperclip doctor
./paperclip start
./paperclip agent list --tree
./paperclip agent heartbeat set CEO 10m --self
./paperclip agent thinking set CEO xhigh --dry-runThe wrapper is driven by environment variables. The most useful ones are:
PAPERCLIP_ENABLE_TAILSCALE=auto|always|neverPAPERCLIP_PUBLIC_URL=https://example.com:8443PAPERCLIP_PUBLIC_HOST=<hostname>PAPERCLIP_PUBLIC_PORT=8443PAPERCLIP_DB_PORT=54329PAPERCLIP_APP_DIR=/path/to/paperclipPAPERCLIP_UPSTREAM_REPO=https://github.com/paperclipai/paperclip.gitPAPERCLIP_RUNTIME_DIR=/path/to/runtimeHOST=127.0.0.1PORT=3100
Default networking behavior:
auto: use Tailscale if it is installed and the machine has a tailnet identity; otherwise run local-only onhttp://127.0.0.1:<PORT>always: require Tailscale and expose throughhttps://<tailnet-host>:8443never: do not configure Tailscale; keep the instance local
Default database behavior:
- the embedded Postgres port defaults to
54329 + (PORT - 3100) - if you run multiple local wrappers, giving each instance a different
PORTautomatically gives it a different embedded DB port too - you can still override it directly with
PAPERCLIP_DB_PORT - if Paperclip still has to bump to the next free DB port at runtime, the
wrapper follows the live port from Postgres runtime state for
agent ...commands
- The wrapper currently supports macOS only because it manages the server with
launchd. - The
agent ...commands are intentionally narrow. They assume the managed instance is using the embedded Postgres mode generated by this wrapper. - Upstream Paperclip still owns the actual server, UI, schema, and official CLI. This repo is just a thin operator shell around it.
MIT