Expand description
rightkit-control command-line dispatch. Every effectful subcommand is
admitted through one EffectGate (EFF-001); read-only subcommands
(trusted, frontmost, windows, ax, find) are not effects.
Global options (before the subcommand):
--policy <file>(orRIGHTKIT_CONTROL_POLICY=<file>): admission policy (seePolicy). Without one the gate is allow-all, so behaviour is unchanged, but every effect is still validated and settled. A policy that cannot be read or parsed is fatal (exit 2); it never falls back to allow-all.--events(orRIGHTKIT_CONTROL_EVENTS=stderr): print content-free lifecycle events to stderr.
Exit codes: 0 ok, 1 failed, 2 usage/configuration, 3 denied by admission, 4 cancelled.
Structs§
- CliConfig
- Global CLI configuration.
- Policy
- A file-configured admission hook. Line format (
#starts a comment):
Constants§
Functions§
- exit_
code - Exit code for a settled effect; prints the refusal/failure to stderr.
- gate_
for - Build the CLI gate: allow-all unless a policy is configured.
- parse_
global - Split leading global options from the subcommand arguments.
envis consulted forRIGHTKIT_CONTROL_POLICY/RIGHTKIT_CONTROL_EVENTS; flags win over the environment.