Files
PaperClipAI/packages/plugins/create-paperclip-plugin
Harold KimandPaperclip 98df214917 fix: fail closed on unusable Codex auth during sandbox auth merge
When reusing a Codex sandbox, the workspace-restore step now performs
an auth-merge check before adopting the sandbox's auth.json. The merge
fails closed when:

- host or sandbox Codex auth is unusable (missing token or account)
- the subscription payload shapes differ between host and sandbox
- subscription account identities do not match

Additional hardening: node absence on PATH during the embedded decision
script now exits non-zero instead of silently falling through. Co-change
comments link parseAuth (the embedded script) to hasUsableAuthPayload
(codex-home.ts) so a future auth-format change cannot silently diverge
between the two implementations.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-09 10:08:57 +00:00
..

@paperclipai/create-paperclip-plugin

Scaffolding tool for creating new Paperclip plugins.

npx @paperclipai/create-paperclip-plugin my-plugin

Or with options:

npx @paperclipai/create-paperclip-plugin @acme/my-plugin \
  --template connector \
  --category connector \
  --display-name "Acme Connector" \
  --description "Syncs Acme data into Paperclip" \
  --author "Acme Inc"

Supported templates: default, connector, workspace
Supported categories: connector, workspace, automation, ui

Generates:

  • typed manifest + worker entrypoint
  • example UI widget using the supported @paperclipai/plugin-sdk/ui hooks
  • test file using @paperclipai/plugin-sdk/testing
  • esbuild and rollup config files using SDK bundler presets
  • dev server script for hot-reload (paperclip-plugin-dev-server)

The scaffold starts with plain React elements so the generated plugin stays minimal. For Paperclip-native controls, import shared host components such as MarkdownEditor, FileTree, AssigneePicker, and ProjectPicker from @paperclipai/plugin-sdk/ui.

Inside this repo, the generated package uses @paperclipai/plugin-sdk via workspace:*.

Outside this repo, the scaffold snapshots @paperclipai/plugin-sdk from your local Paperclip checkout into a .paperclip-sdk/ tarball and points the generated package at that local file by default. You can override the SDK source explicitly:

node packages/plugins/create-paperclip-plugin/dist/bin.js @acme/my-plugin \
  --output /absolute/path/to/plugins \
  --sdk-path /absolute/path/to/paperclip/packages/plugins/sdk

That gives you an outside-repo local development path before the SDK is published to npm.

Workflow after scaffolding

cd my-plugin
pnpm install
pnpm dev       # watch worker + manifest + ui bundles
pnpm dev:ui    # local UI preview server with hot-reload events
pnpm test