Expand description
Generic krypt <group> <name> dispatcher.
This module is the core logic behind both krypt menu and any arbitrary
user-defined group (krypt battery report, krypt kanata toggle, etc.).
It keeps the CLI thin by handling config loading, platform filtering,
dry-run formatting, and runner dispatch from here.
§Step interpolation note
Steps use {name} for named captures and {0}..{9} for positional args
forwarded via krypt <group> <name> -- arg0 arg1 .... The ${VAR} syntax
(e.g. ${HOME}) is not expanded inside step args — that is a
.krypt.toml-level path-variable syntax resolved by crate::paths::Resolver
at config-load time, not at step-execution time. If a step needs $HOME,
use run = ["sh", "-c", "echo $HOME"] or capture it into a named variable
first.
The resolver is used by predicate evaluation (file_exists:${HOME}/.bashrc
etc.) because predicate.rs calls Resolver::resolve internally.
Structs§
- Dispatch
List Entry - One entry returned by
list_in_group. - Dispatch
Opts - Options shared by both listing and running dispatch groups.
- Dispatch
Report - Summary of a completed dispatch run.
Enums§
- Dispatch
Error - Everything that can go wrong in the dispatch subsystem.
Functions§
- list_
groups - Return all distinct group names present in the config, sorted.
- list_
in_ group - Return all commands defined in the given group.
- run_
in_ group - Run the named command in the given group using production process/notify/prompt implementations.
- run_
in_ group_ with - Run the named command in the given group with injected dependencies (used by tests and dry-run).