CLI Layer
CLI Layer
Understand how Custy turns shell input into resolved arguments and delegated core execution.
app/cli/Category
Quick Command
entrypoint -> callback -> command -> resolver -> coreOverview
The CLI layer owns the public command tree and converts user input into the typed values consumed by core coordinators. It should describe behavior and assemble dependencies, while Git, changelog, release, backup, cleanup, and file mutation logic remain outside command callbacks.
Entrypoints and Registration
Public Command Tree
Package Script
Module Execution
Direct Commands
Command Groups
Request Lifecycle
Workflow Timeline
Command Module Contract
Input Modules
Declare public names, aliases, validation, completion, and help panels.
Collect raw command inputs without deciding final defaults.
Apply CLI -> project configuration -> built-in priority.
Return one typed effective argument dataclass.
Execution Modules
Transport supported values into WorkflowConfig.
Carry global dry-run, debug, and logging state.
Select the internal step configuration for a pipeline-backed command.
Execute registered adapters through a shared GitContext.
Execution Variants
- Most validation, Git-operation, backup, cleanup, version, changelog, and Run callbacks assemble a workflow engine and a registered pipeline.
custy initenters the pipeline through a specialized initialization step, which delegates toInitMainand its builder and scaffold service.- Branch cleanup has a specialized handler and service behind the command boundary.
- The workflow command group is experimental and currently has a documented step-registration mismatch.
Presentation Responsibilities
The CLI layer uses app/ui, app/theme, and app/utils/logging.py for the
shared Rich console, panels, progress, exception rendering, banner, colors, and
rotating logs. Core pipeline and initialization modules also call some of these
presentation helpers, so terminal presentation is currently shared across the
CLI and orchestration layers rather than isolated behind one interface.