CLI reference
tama policy
Imports, lists and removes retained inactive policy bundles: hook policy trees validated and kept beside the runtime without being installed or enabled. Nothing here changes which hooks a machine runs; tama enforcement decides that.
#Invocation
tama policy import --source <dir> [--replace] [--json] [--home <path>]
tama policy list [--json] [--home <path>]
tama policy remove --source <path|key> [--json] [--home <path>]
#Inputs and options
| Option | Meaning |
|---|---|
--source <dir> | import: required; the bundle directory to validate and keep. remove: required; the path or source key an imported bundle was recorded under |
--replace | import only. Overwrites a bundle already retained from the same source whose content differs; without it that case is a conflict and nothing is written |
--home <path> | The home whose policy store is read or written instead of this account's; the value must be a directory |
--json | Prints the result document instead of the text report |
#What import answers
One transaction validates the whole bundle and then writes it, or writes nothing. Its status is one of imported, replaced (an earlier bundle from the same source was overwritten under --replace), unchanged (the same content is already retained), conflict (a different bundle from the same source is retained and --replace was not given) or rejected (the bundle is not valid; the result names what is wrong). The desktop's Settings screen runs the same transaction. tama request policy-bundles/import answers the same document.
list prints one line per retained bundle — source path, source digest, hook count, file count, inactive — or No inactive policy bundles imported.; remove prints Removed the inactive policy bundle imported from <path>. or No imported policy bundle came from <source>; nothing changed., and under --json {"source":String,"removed":Boolean}.
#Exit status
import exits one on conflict or rejected and zero otherwise; list and remove exit zero, a removal of nothing included. A wrong invocation exits two:
policy import requires --source <dir>
--home requires a directory
unknown policy import option: <argument>
unknown policy list option: <argument>
tama policy remove needs --source <path or source key> of an imported bundle
usage: tama policy import --source <dir> [--replace] [--json] [--home <path>] | tama policy list [--json] [--home <path>] | tama policy remove --source <path|key> [--json] [--home <path>]
A store that cannot be read or written is reported with its path and cause and exits one.
Return to the complete CLI tree.