graph LR
CLI_Entrypoint_Dispatcher["CLI Entrypoint & Dispatcher"]
Project_Configuration_Template_Manager["Project Configuration & Template Manager"]
Charm_Build_Orchestrator["Charm Build Orchestrator"]
Charmhub_Interaction_Service["Charmhub Interaction Service"]
Remote_Build_Orchestrator["Remote Build Orchestrator"]
Charm_Linter_Analyzer["Charm Linter & Analyzer"]
CLI_Entrypoint_Dispatcher -- "Command Dispatch / Project Initialization" --> Project_Configuration_Template_Manager
CLI_Entrypoint_Dispatcher -- "Build Command Execution" --> Charm_Build_Orchestrator
CLI_Entrypoint_Dispatcher -- "Store Command Execution" --> Charmhub_Interaction_Service
CLI_Entrypoint_Dispatcher -- "Remote Build Command Execution" --> Remote_Build_Orchestrator
CLI_Entrypoint_Dispatcher -- "Analysis Command Execution" --> Charm_Linter_Analyzer
Project_Configuration_Template_Manager -- "Provides Project Metadata" --> Charm_Build_Orchestrator
Project_Configuration_Template_Manager -- "Provides Project Context" --> Charm_Linter_Analyzer
Charm_Build_Orchestrator -- "Charm Upload / Resource Management" --> Charmhub_Interaction_Service
Remote_Build_Orchestrator -- "Manages Remote Build Artifacts via Charmhub" --> Charmhub_Interaction_Service
click CLI_Entrypoint_Dispatcher href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/charmcraft/CLI_Entrypoint_Dispatcher.md" "Details"
click Project_Configuration_Template_Manager href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/charmcraft/Project_Configuration_Template_Manager.md" "Details"
click Charm_Build_Orchestrator href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/charmcraft/Charm_Build_Orchestrator.md" "Details"
click Charmhub_Interaction_Service href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/charmcraft/Charmhub_Interaction_Service.md" "Details"
click Remote_Build_Orchestrator href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/charmcraft/Remote_Build_Orchestrator.md" "Details"
click Charm_Linter_Analyzer href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/charmcraft/Charm_Linter_Analyzer.md" "Details"
Charmcraft's architecture is designed around a modular command-line interface, where the CLI Entrypoint & Dispatcher serves as the central control point, routing user commands to dedicated functional components. The Project Configuration & Template Manager provides foundational project metadata and setup capabilities, which are consumed by the Charm Build Orchestrator for packaging charms and by the Charm Linter & Analyzer for code quality checks. The Charm Build Orchestrator is responsible for the end-to-end charm creation process, often interacting with the Charmhub Interaction Service for publishing artifacts. For distributed build workflows, the Remote Build Orchestrator manages external build processes, potentially leveraging the Charmhub Interaction Service for artifact exchange with the Charmhub store. This clear separation of concerns facilitates maintainability and extensibility, with well-defined data flows enabling efficient charm development and deployment.
CLI Entrypoint & Dispatcher [Expand]
The core user interface, responsible for parsing command-line arguments, initializing the application environment, and routing requests to the appropriate command handlers. It acts as the central orchestrator for all Charmcraft operations.
Related Classes/Methods:
Project Configuration & Template Manager [Expand]
Manages the loading, validation, and interpretation of charm project metadata and configuration files (e.g., charmcraft.yaml, metadata.yaml). It also provides and renders templates for initializing new charm projects.
Related Classes/Methods:
Charm Build Orchestrator [Expand]
Orchestrates the entire charm building process, including preparing the source, resolving and handling dependencies, executing build plugins/parts, and finally packaging the charm into a distributable .charm archive.
Related Classes/Methods:
charmcraft.charm_builder.CharmBuilder:57-376charmcraft.parts.lifecycle.pycharmcraft.services.package.py
Charmhub Interaction Service [Expand]
Provides a unified and authenticated interface for all interactions with the Charmhub store. This includes uploading charms and resources, managing releases, handling charm libraries (fetching/publishing), and managing OCI images (copying/inspecting).
Related Classes/Methods:
Remote Build Orchestrator [Expand]
Manages the process of offloading charm builds to a remote build service. This component handles initiating remote builds, monitoring their status, and retrieving build artifacts and logs upon completion.
Related Classes/Methods:
Charm Linter & Analyzer [Expand]
Performs static analysis and applies linting rules to charm projects. Its purpose is to ensure code quality, adherence to best practices, and to identify potential issues or anti-patterns within the charm's structure and content.
Related Classes/Methods: