verdict policy publish
Replace the active policy after the server accepts and compiles the uploaded source. The acknowledgement does not report policy tests or access verification.
Runs against the selected server connection. Effects: replace active policy.
Arguments and flags
Section titled “Arguments and flags”| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
<file> | positional | no | No parser default | Policy file override, relative to the current directory |
--config | string | no | No parser default | Project configuration path; otherwise discover it |
--json | boolean | no | false | Output as JSON |
--endpoint | string | no | No parser default | Instance base URL, including any subpath (env: VERDICT_HOST, fallback: http://localhost:4891) |
--host | string | no | No parser default | Alias for —endpoint |
--api-key | string | no | No parser default | API key (env: VERDICT_API_KEY takes precedence) |
--profile | string | no | No parser default | Stored profile (env: VERDICT_PROFILE) |
--local | boolean | no | false | Use http://localhost:4891 without stored or environment credentials |
--help (-h) shows command help without executing the command. Boolean flags support --no-<flag>. Defaults stated in descriptions may be resolved by the handler or configuration rather than the argument parser.
Optional UTF-8 file path; defaults to the configured policy or policy.vd. ’-’ is an ordinary path.
File input: supported. Standard input: unsupported.
Result
Section titled “Result”{ "kind": "json-schema", "schema": { "type": "object", "required": [ "file", "published" ], "additionalProperties": false, "properties": { "file": { "type": "string" }, "published": { "type": "boolean", "const": true } } }, "example": { "file": "policy.vd", "published": true }}By default, the command renders human-readable records. --json writes one JSON result to stdout. Operational failures use status 1; JSON failures contain an error object with code and message. See shared output semantics.
Exit status
Section titled “Exit status”- 0: the command completed its operation.
Argument, I/O, and other failures handled by the CLI runner use status 1.
Examples
Section titled “Examples”verdict policy publish policy.vd --json