Charmcraft init migrated to InitService
Metadata
Current evaluation
Refactors Charmcraft's init command to use craft-application's InitService, updating argument handling and template renaming, currently triaged and awaiting implementation.
Suggested action: keep open
Reason: The issue is already triaged, well-scoped, and represents a valid planned refactor. There are no signs of obsolescence or supersession, so it should remain open for future implementation.
Staleness:
45
Complexity:
55
Confidence:
90
Support Request:
0
Issue body
### Check existing issues
- [x] I've verified that this request isn't described by any existing issues.
### Request
Replace the current [`init` command](https://github.com/canonical/charmcraft/blob/main/charmcraft/application/commands/init.py) in Charmcraft with the [craft-application `init` command](https://github.com/canonical/craft-application/blob/main/craft_application/commands/init.py), extending the craft-application command and the [InitService](https://github.com/canonical/craft-application/blob/main/craft_application/services/init.py) to make this possible.
### The problem it solves
* All existing args must be accepted. However:
* The `--author` argument (and the general GECOS info) is no longer used and may simply output a warning that it’s not used.
* `--force` can similarly be replaced with a warning. (The craft-application behaviour of initing a project even if files exist in this directory as long as they’re not overwritten is acceptable as the default, so the behaviour of `--force` becomes the default behaviour)
* The command must accept either the positional `project_dir` as in craft-application or `--project-dir` as in existing charmcraft, with a migration note for users.
* `--project-dir` should be removed from the help and documentation
* Extend the craft-application InitService to be able to rename template files, similar to how it’s implemented in [https://github.com/canonical/charmcraft/pull/2242](https://github.com/canonical/charmcraft/pull/2242)
* This should include at least one `testcraft` spread test that uses this feature.
* End-to-end tests in Charmcraft pass without changes
Supersedes #2316
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| 2026-06-15 12:46:19.647352+00:00 | qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
55
Confidence:
90
Support Request:
0
|
keep open | Refactors Charmcraft's init command to use craft-application's InitService, updating argument handling and template renaming, currently triaged and awaiting implementation. |
| 2026-06-15 12:44:18.903871+00:00 | pending | — | — | — |