zorphy_cli library

CLI entry point - only imports what's needed for entity creation This avoids pulling in heavy dependencies like analyzer, source_gen, etc.

Classes

DoctorResult
Aggregated result of the doctor command.
DoctorService
Service that performs the "doctor" workflow:
EntityConfig
Configuration for entity creation
EntityCreator
Main orchestrator for creating Zorphy entities
EntityResult
Result of entity creation
EnumConfig
Configuration for enum creation
EnumResult
Result of enum creation
FieldDefinition
Field definition for an entity
NamingUtils
Utility class for naming conventions
ProjectValidator
Runs all validation checks against a project directory and returns an aggregated ValidationResult.
SubtypeResult
Result for subtype generation
UpdateCheckResult
Result of checking for a CLI update.
UpdateResult
Result of performing the self-update.
ValidationFinding
A single validation finding.
ValidationResult
Aggregated result of running all validation checks.
VersionChecker
Service that checks the latest published version of zorphy on pub.dev and can perform a self-update via dart pub global activate.

Enums

DoctorHealth
Overall health status after running doctor.
ValidationSeverity
Severity levels for validation findings.

Typedefs

DeleteFileFunction = bool Function(String path)
Functional type for deleting a single file. Returns true if the file was successfully deleted.
DoctorProcessRunner = Future<ProcessResult> Function(String executable, List<String> args, {String? workingDirectory})
Functional type for running a subprocess (named differently to avoid export collision with version_checker's RunProcessFunction).
FetchJsonFunction = Future<String> Function(String url, {Duration? timeout})
Functional type for fetching JSON from a URL. Returns the response body as a string, or throws on network/HTTP errors. Used to allow injecting a mock in tests without implementing HttpClientResponse.
FindGeneratedFilesFunction = List<String> Function(String projectDir, {List<String> sourceDirs})
Functional type for listing .zorphy.dart files recursively. Returns absolute paths of all matching files.
ReadFileFunction = String Function(String path)
Functional type for reading a file's content.
RunProcessFunction = Future<ProcessResult> Function(String executable, List<String> args)
Functional type for running a subprocess.