linchpin is Linchpin's command line tool for WordPress and agent workflows — git worktree
management, local environment setup, and deterministic verbs that agents can call without
tripping approval prompts.
npm install -g @linchpinagency/cli
linchpin --help
What it solves
One WordPress install, many branches. A plugin or theme repo has many git worktrees, but a
local WordPress install has exactly one directory slot for it. linchpin wt switch repoints
that slot's symlink at the worktree you want, so a single install serves every branch without
copying files. → Worktrees and the symlink swap
Agents that stop asking permission. Claude Code cannot statically analyse a heredoc or a pipe, so it prompts for approval every time — and those prompts cannot be permanently dismissed. Passing a file path instead of piping content keeps a command to one statically analysable subcommand, which an allowlist rule matches once and keeps matching. → Agent integration
Hooks at every lifecycle point. Twelve pre/post hooks let a project run its own build,
cache flush, or environment fixup around each worktree operation.
→ Hooks
Pages
| Page | What's in it |
|---|---|
| Worktrees and the symlink swap | The core mechanic, why symlinks rather than checkouts, and how this differs from plain git worktree |
| Configuration | .linchpin.json and .clickup.json — what each file owns and what is optional |
| Hooks | The 12 hook points, the environment contract, and why hooks are sourced rather than executed |
| Agent integration | Output modes, exit codes, and the approval-friction problem this CLI exists to remove |
| Conventions from the skills library | The conventions every command must honour, extracted from linchpin/skills |
Status
The CLI is mid-rewrite from CommonJS to TypeScript behind a declarative command registry.
Per-command reference — every flag, its type, and each command's effect classification — is
generated from that registry rather than written by hand, so --help, linchpin schema and
these pages cannot disagree. Until that generator lands, this section carries authored narrative
only, and command specifics live in linchpin <command> --help.