Chock.sh Build your plugin

CLI reference

chock plugin

Ask the user before running chock plugin: what it takes and prints, from the engine at the pinned commit.

Package policies as installable plugins (plugin build [--format claude] [--check])

Syntax

This is the usage line argparse builds from this command's parser.

chock plugin [-h] [--repo REPO] [--policies-dir POLICIES_DIR]
             [--format {agent-plugins,claude,copilot,cursor,codex,devin,goose,grok,antigravity,openhands,kimi,droid,all}]
             [--out-dir OUT_DIR] [--policy ID] [--out OUT] [--check]
             {build}

Arguments and options

The table lists every argument the parser declares, except -h, --help, written as argparse prints it. Default is the value the parser uses when you leave the option out. It is empty for a flag or when the parser sets none.

ArgumentDefaultHelp
{build} one of: build (required)Build: render each policy's plugin files
--repo REPO.Repo root
--policies-dir POLICIES_DIRDirectory of policy folders relative to --repo (default: discover .agents/policies)
--format one of: agent-plugins, claude, copilot, cursor, codex, devin, goose, grok, antigravity, openhands, kimi, droid, allagent-pluginsPlugin format to emit (default: agent-plugins)
--out-dir OUT_DIRDistribution root: plugins are written to <out-dir>/<format>/<id>/ (required for every hook-carrying format)
--policy IDPackage only this policy (manifest id or directory name); repeat for more than one
--out OUTWrite the selected policy's plugin directly to this path, instead of <out-dir>/<format>/<id>/. Requires exactly one --policy.
--checkReport policies whose packaged output is missing or stale, and exit non-zero. Writes nothing.

Exit codes

  • 2: argparse rejected the arguments, for example an option this command does not have. The site's tests run every command with an unknown option and check that it exits 2.
  • Chock documents no other exit codes, and this page has no recorded run.

Help as printed

This is what --help prints, from the same parser. The usage line names the program as the engine's parser does.

usage: chock plugin [-h] [--repo REPO] [--policies-dir POLICIES_DIR]
                    [--format {agent-plugins,claude,copilot,cursor,codex,devin,goose,grok,antigravity,openhands,kimi,droid,all}]
                    [--out-dir OUT_DIR] [--policy ID] [--out OUT] [--check]
                    {build}

Package policies as installable plugin directories

positional arguments:
  {build}               build: render each policy's plugin files

options:
  -h, --help            show this help message and exit
  --repo REPO           Repo root
  --policies-dir POLICIES_DIR
                        Directory of policy folders relative to --repo (default: discover
                        .agents/policies)
  --format {agent-plugins,claude,copilot,cursor,codex,devin,goose,grok,antigravity,openhands,kimi,droid,all}
                        Plugin format to emit (default: agent-plugins)
  --out-dir OUT_DIR     Distribution root: plugins are written to <out-dir>/<format>/<id>/
                        (required for every hook-carrying format)
  --policy ID           Package only this policy (manifest id or directory name); repeat for more
                        than one
  --out OUT             Write the selected policy's plugin directly to this path, instead of <out-
                        dir>/<format>/<id>/. Requires exactly one --policy.
  --check               Report policies whose packaged output is missing or stale, and exit non-
                        zero. Writes nothing.

Built from engine 5a4b6287a46e and catalog 1e60d211c1bb.