Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an initialization or generation command for quick starts #1906

Open
wgordon17 opened this issue Dec 26, 2024 · 3 comments
Open

Add an initialization or generation command for quick starts #1906

wgordon17 opened this issue Dec 26, 2024 · 3 comments

Comments

@wgordon17
Copy link

Actual Situation

As a new user (or even long time user, just wanting to get a quick template skeleton set up), I'm left manually (oh, so painful) setting up a new template directory, with all the right structure and files.

Desired Situation

It would be ideal to have an "official" quick start/new start/skeleton template that can be used as the basis for creating new templates.

Proposed solution

copier is an awesome tool, and uniquely set up to solve this easily. I think it would make sense for copier-org to publish a "starter" template, something that copier copy could easily just set up. And then alias it as a copier init or copier generate command. It really doesn't even need to be anything more than https://copier.readthedocs.io/en/latest/creating/#minimal-example, it's more about having it as an "official" template, published by copier-org, and then the alias just makes it even more user friendly

@pawamoy
Copy link
Contributor

pawamoy commented Dec 26, 2024

Thanks for the request @wgordon17 🙂

I could see a copier new command indeed, generating a minimal template.

@sisp
Copy link
Member

sisp commented Dec 26, 2024

I'm not sure how much value a template starter would add. Even the minimal example contains some Python-specific content. A generic template for updatable projects would reduce to this:

📁
├── 📄 copier.yml
└── 📄 {{ _copier_conf.answers_file }}.jinja

Preferably, e.g. _subdirectory: template would be set in copier.yml, so a template with best practices settings would have a modified filesystem layout:

📁
├── 📄 copier.yml
└── 📁 template
     └── 📄 {{ _copier_conf.answers_file }}.jinja

Copier could automatically initialize a Git repository (if git is found), but more than git init can't be automated generically. If we implement #983, even the templated answers file will become obsolete.

IMHO, there is little benefit of Copier bootstrapping a new template project because there's almost no work to be done unless we make assumptions about the template.

@pawamoy
Copy link
Contributor

pawamoy commented Dec 26, 2024

Ah, yeah, good point. Then unless Copier provides some minimal templates for a few languages, there's no real value indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants