yera.cli.resources.creds
Credential-related helpers shared across CLI commands.
Symbols
ensure_authorised_credential_group
ensure_authorised_credential_group(
ctx: AppContext,
group_name: str,
) → CredentialGroupInfoResolve or create an authorized version-two credential group.
Parameters
Active CLI application context.
Configured credential-group name.
Returns
Non-sensitive metadata for the authorized group.
Raises
If an existing group does not authorize the current project root.
raise_if_bare_leaf_for_prefix_command
raise_if_bare_leaf_for_prefix_command(
path: str,
creds: CredentialGroupMap,
single_leaf_command: str,
purpose_phrase: str,
) → NoneReject a single credential leaf where a namespace is required.
Parameters
Dotted credential path supplied to the prefix operation.
Credential mapping in which to classify the path.
Suggested command for operating on the leaf, such
as yera cred put my.key.
Description appended to the recovery message, such as
single-leaf writes.
Raises
If the path identifies a leaf but not a namespace.
read_json_object_from_cli
read_json_object_from_cli(
json_str: str | None,
from_file: str | None,
) → dict[str, Any]Resolve JSON input from inline string or file path.
Exactly one of json_str or from_file must be provided.
--from-file - reads from sys.stdin.
read_json_raw_from_path_or_stdin
read_json_raw_from_path_or_stdin(
path_or_dash: str,
) → strRead raw text from a filesystem path, or stdin when path_or_dash is '-'.
require_authorised_credential_group
require_authorised_credential_group(
ctx: AppContext,
group_name: str,
) → CredentialGroupInfoResolve an existing credential group authorized for this project.
Parameters
Active CLI application context.
Configured credential-group name.
Returns
Non-sensitive metadata for the authorized group.
Raises
If the group does not exist.
If the current project is not authorized for the group.
tool_secret_info
tool_secret_info(
ctx: AppContext,
owner_id: str,
) → tuple[SecretInfo, ...]List ordinary tool secrets owned by a credential group.
Parameters
Active CLI application context.
Stable credential-group identity.
Returns
Tool-secret metadata ordered by credential name.