ccppccpp home
Browse the documentation

General

How plugins work

A ccpp plugin is a CLI command plus a Claude Code plugin that routes hooks to it.

Two halves

HalfWhereRole
CLI commandccpp <plugin>All the logic: reading configuration, evaluating, answering hooks, maintenance subcommands.
Claude Code pluginplugins/<plugin>/ in the marketplaceA hooks.json that routes Claude Code events to ccpp <plugin> hook, and a bin/ccpp launcher.

Keeping the logic in the CLI means the same rules run in a hook, in a terminal (ccpp cpo trace) and in CI (ccpp cpo lint).

Install a plugin in Claude Code

The repository is a Claude Code marketplace. Add it once, then install the plugins you want:

claude plugin marketplace add CCPP-dev/CCPP   # or the path of a local clone
claude plugin install cpo@ccpp

No settings.json edit is needed: the plugin's hooks are registered by Claude Code.

The launcher

A plugin's bin/ccpp runs, in this order:

  1. the binary in the plugin's libexec/, present only in local marketplaces built with --bundle;
  2. the ccpp found on PATH.

Without either, hooks fail open with a hint telling the user how to install ccpp. A missing binary never blocks Claude Code.

Regenerating the marketplace

The marketplace files are generated from the plugins compiled into the CLI:

ccpp marketplace            # writes .claude-plugin/marketplace.json, manifests, hooks and launchers
ccpp marketplace --check    # exit 1 when a file differs from what would be written
ccpp marketplace --bundle   # also copies this binary into each plugin's libexec/ (local use, not committed)

--out <dir> writes the marketplace somewhere other than the current directory.

Edit this page on GitHub