httk.core.project.cli¶
The core-owned httk project command.
httk project owns the anchor: init creates one (like git init),
show describes it, export creates a signed redistribution,
verify-export checks one, and import-v1 migrates a legacy project.
Attributes¶
Functions¶
|
Describe one project's anchor. |
|
Repair a project's anchor and every member, or report only under dry run. |
|
Build the core-owned project command tree. |
|
Handle the registered top-level project command. |
Module Contents¶
- httk.core.project.cli.Handler¶
- httk.core.project.cli.describe_project(root=None)¶
Describe one project’s anchor.
- Parameters:
root (str | pathlib.Path | None) – Project root, or None to discover the nearest project.
- Returns:
JSON-ready description of project metadata and trust keys.
- Raises:
ValueError – If no project exists or its metadata is invalid.
- Return type:
- httk.core.project.cli.project_repair(project_root=None, *, apply=True, adopt=True)¶
Repair a project’s anchor and every member, or report only under dry run.
Core owns the anchor checks — the key pin and the manifest — and each member handler contributes its own findings, concatenated after them. Repairs are applied by default;
apply=Falseis a dry run that mutates nothing. Member adoption is driven through each kind’s project-scope scan, gated by adopt.- Parameters:
project_root (str | pathlib.Path | None) – Project root, or None to discover the nearest project.
apply (bool) – Whether to apply repairs;
Falsereports only.adopt (bool) – Whether the kind-scope scan should adopt members on this machine.
- Returns:
JSON-compatible repair report.
- Return type:
- httk.core.project.cli.build_parser(program)¶
Build the core-owned project command tree.
- Parameters:
program (str) – Program name used by the parser in help and errors.
- Returns:
Configured project command parser.
- Return type:
- httk.core.project.cli.command(argv, context)¶
Handle the registered top-level project command.
- Parameters:
argv (collections.abc.Sequence[str]) – Arguments following the project command name.
context (httk.core.cli.CLIContext) – Root CLI invocation context.
- Returns:
Command exit status.
- Return type: