A copier template for a production-ready fullstack web application.
uvx copier copy gh:gmolveau/cookiecutter-fastapi-svelte ./my-project
Follow the prompts:
project_name - Human-readable project name (e.g. My App)project_slug - URL and Docker image name (e.g. my-app)python_package_name - Python package identifier (e.g. myapp)description - Short app descriptionauthor_name - Your namegithub_username - GitHub username (for image registry)uvx copier copy gh:gmolveau/cookiecutter-fastapi-svelte /tmp/test-app \
--data project_name="Test App" \
--data project_slug="test-app" \
--data python_package_name="testapp" \
--data description="Testing the template" \
--defaults
Because copier saves answers in .copier-answers.yml, you can pull template updates into an existing project:
cd my-project
uvx copier update
Instantiate the template by using :
uvx copier copy . ./app \
--data project_name="MyApp" \
--data project_slug="my-app" \
--data python_package_name="myapp" \
--data description="My app from template" \
--defaults
This will create the app, then run it :
cd app
just dev-up
Then see what changed between the app and the template using the helper scripts in the ./scripts folder, to easily update the template.
$ ./scripts/list-changed.sh
.copier-answers.yml
compose.yml
uvx copier copy ~/dev/cookiecutter-fastapi-svelte /tmp/test-app \
--data project_name="Test App" \
--data project_slug="test-app" \
--data python_package_name="testapp" \
--data description="Testing the template" \
--defaults