CLI reference
chock emit
Ask the user before running chock emit: what it takes and prints, from the engine at the pinned commit.
Write a vendor's managed-settings bundle under --out for an admin to deploy (emit --managed claude_code --python <abs> --on-failure block|allow --out <dir>); refuses an --out that is a filesystem root or inside a system folder
Syntax
This is the usage line argparse builds from this command's parser.
chock emit [-h] --managed {claude_code} --out OUT [--repo REPO] [--policies POLICIES]
--python PYTHON --on-failure {block,allow} [--platform {linux,macos,windows}]
[--deploy-root DEPLOY_ROOT] [--lock]
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.
| Argument | Default | Help |
|---|---|---|
--managed one of: claude_code (required) | The vendor to emit for | |
--out OUT (required) | A folder outside any system path; <out>/<vendor>/ must not exist | |
--repo REPO | . | The repository whose policies are emitted (default: .) |
--policies POLICIES | Comma-separated policy ids, named ones emitted even if the config disables them (default: every enabled policy with a guard or gate) | |
--python PYTHON (required) | Absolute path of the Python 3.11+ interpreter on the target machines; the hooks start it directly | |
--on-failure one of: block, allow (required) | When the hook cannot run (no interpreter, a missing bundle file, a crash or timeout): block refuses the matched tool call, allow lets it through with a note | |
--platform one of: linux, macos, windows | The OS the file is for (default: this one) | |
--deploy-root DEPLOY_ROOT | Absolute folder the admin copies bundle/ to (default: the vendor's admin folder + /chock) | |
--lock | Also emit the vendor's managed-hooks-only key, which stops every user, project and plugin hook on the machine |
Exit codes
- 2: argparse rejected the arguments, for example an option this command does not have. The site's tests give every command's parser 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 emit [-h] --managed {claude_code} --out OUT [--repo REPO] [--policies POLICIES]
--python PYTHON --on-failure {block,allow} [--platform {linux,macos,windows}]
[--deploy-root DEPLOY_ROOT] [--lock]
Write one vendor's managed-settings file, the self-contained hook bundle it runs, deploy.json
(where an admin places each part, what it needs, what --on-failure does, how to undo it) and
labels.json, all under --out. It refuses an --out that is a filesystem root or resolves into a
system folder (per OS: /etc, /usr, /var, /Library, C:/Program Files, C:/Windows and the others in
chock's managed_channels.json); it elevates nothing and deploys nothing. Every label is vendor-
docs evidence, unwitnessed, at most best-effort; a local administrator can still edit or remove
the file.
options:
-h, --help show this help message and exit
--managed {claude_code}
the vendor to emit for
--out OUT a folder outside any system path; <out>/<vendor>/ must not exist
--repo REPO the repository whose policies are emitted (default: .)
--policies POLICIES comma-separated policy ids, named ones emitted even if the config disables
them (default: every enabled policy with a guard or gate)
--python PYTHON absolute path of the Python 3.11+ interpreter on the target machines; the
hooks start it directly
--on-failure {block,allow}
when the hook cannot run (no interpreter, a missing bundle file, a crash
or timeout): block refuses the matched tool call, allow lets it through
with a note
--platform {linux,macos,windows}
the OS the file is for (default: this one)
--deploy-root DEPLOY_ROOT
absolute folder the admin copies bundle/ to (default: the vendor's admin
folder + /chock)
--lock also emit the vendor's managed-hooks-only key, which stops every user,
project and plugin hook on the machine
Built from engine 5088f2f17df0 and catalog e3d71d03e4dd.