anchorectl policy

Policy related operations.

Every command on this page also accepts the global flags.

Subcommands

policy activate

Activate a policy.

anchorectl policy activate POLICY [flags]

Arguments

ArgumentDescription
POLICYThe policy name or ID.

Examples

anchorectl policy activate strict-policy

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

policy add

Adds a new policy bundle to the system.

anchorectl policy add [flags]

Examples

# Upload a policy bundle from a file
anchorectl policy add --input strict-policy.json

# Upload a policy bundle from stdin
cat strict-policy.json | anchorectl policy add --input -

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-i, --inputstringANCHORECTL_INPUT""YesPath to a JSON input file or - to read from stdin.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

policy delete

Delete the specified policy.

anchorectl policy delete POLICY [flags]

Aliases: del

Arguments

ArgumentDescription
POLICYThe policy name or ID.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

policy get

Get the policy content.

anchorectl policy get POLICY [flags]

Arguments

ArgumentDescription
POLICYThe policy name or ID.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--detailboolANCHORECTL_POLICY_DETAILtrueNoInclude policy detail in the form of the full policy content.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

policy list

List all saved policies.

anchorectl policy list [flags]

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--detailboolANCHORECTL_DETAILfalseNoInclude full policy content. Available with output selections of [JSON | json-raw].
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

policy update

Update/replace an existing policy.

anchorectl policy update [flags]

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-i, --inputstringANCHORECTL_INPUT""YesPath to a JSON input file or - to read from stdin.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.
Last modified September 22, 2026