← Back to issue list

Dynamically import charmcraft init template

View original Github issue

Metadata

Project
charmcraft
Number
#762
Type
issue
State
closed
Author
PietroPasotti
Labels
Created
Updated
Closed

Current evaluation

Closed as superseded by broader init profiles work. Dynamic template fetching was deferred to avoid internet dependency. Template customization will instead rely on vendored profiles and init-time substitutions.

Suggested action:

No scores available.

Issue body

Right now there are a few places where a starter can bootstrap their new charm project. The first (most documented) way is charmcraft init; the second would be to clone from a template repo such as https://github.com/canonical/template-operator (a personal favourte, there may be more) My proposal is to make charmcraft init fetch the code from a public template repository. The default should be https://github.com/canonical/template-operator (main branch) equivalent: ``` charmcraft init charmcraft init --branch=main ``` Then we could pass a flag to target a specific branch where we could host for example a machine charm template ``` charmcraft init --branch=machine ``` or a 'minimal' charm template for those among us who don't wish to spend the first 30m on a new project deleting stuff we don't need or use such as (for example) actions.yaml, removing the links to the config from the headers, removing all the httpbin stuff, removing _stored, etc... Related: #568

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Closed as superseded by broader init profiles work. Dynamic template fetching was deferred to avoid internet dependency. Template customization will instead rely on vendored profiles and init-time substitutions.
qwen/qwen3.6-35b-a3b Closed as superseded. Remote template fetching was rejected due to offline dependency concerns. Maintainers implemented init profiles using bundled templates with substitution options instead, deferring this request to broader profile work.
qwen3.6-35b-a3b-mtp-q6 Closed as superseded by other open issues tracking charmcraft init profiles. The dynamic template repository proposal was deferred in favor of vendoring templates directly into charmcraft to avoid internet dependency and streamline profile management.
qwen3.6-35b-a3b-mtp-q6 Closed as superseded by other tracking issues for charmcraft init profiles. Maintainers declined remote template fetching to avoid internet dependency, noting existing profile work covers the request.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#828 Automatically update template operator based on latest charmcraft init charmcraft closed Rejected and closed. Maintainer declined automatic template updates due to upcoming charmcraft init profiles, potential divergence, and policy against cross-repo automation. May revisit once profiles are widely adopted.
73%