A time-saving CLI tool to quickly start new Python projects with uv using the simple-modern-uv template.
uvx uvtemplate createThis will guide you through creating a new project step by step.
AI coding agents like Claude Code can create projects programmatically:
uvx uvtemplate --yes --destination my-project \
--data package_name=my-project \
--data package_description="My awesome project" \
--data package_author_name="Your Name" \
--skip-gitYes. You will need to have uv installed. Read that page or my template docs for background on why uv is such an improved package manager for Python.
It’s the tool I wish I’d had when setting up projects with uv.
uvx uvtemplate create will clone a new project template and help you set up your
GitHub repo. The template is tiny and sets up uv, ruff linting and formatting,
GitHub Actions, publishing to PyPI, type checking, and more.
| Command | Description |
|---|---|
uvtemplate |
Show help and available options |
uvtemplate create |
Start interactive project creation |
uvtemplate migrate |
Analyze an existing project and show migration recommendations |
uvtemplate update |
Update a template-based project to the latest template version |
uvtemplate readme |
Print this documentation |
| Option | Description |
|---|---|
--destination DIR |
Destination directory for the project |
--data KEY=VALUE |
Set a template value (can be repeated) |
--yes |
Auto-confirm all prompts (non-interactive mode) |
--skip-git |
Skip GitHub repository and git setup |
--template URL |
Use a custom copier template |
--answers-file FILE |
Load defaults from a .copier-answers.yml file |
--no-gh-cli |
Don't use gh CLI to create repo |
--public |
Create a public repository (default: private) |
| `--git-protocol ssh | https` |
Use --data KEY=VALUE to set these values:
| Key | Description | Example |
|---|---|---|
package_name |
Package name (kebab-case) | my-project |
package_module |
Python module name (snake_case) | my_project |
package_description |
Short description | "A useful tool" |
package_author_name |
Author's name | "Jane Doe" |
package_author_email |
Author's email | "jane@example.com" |
package_github_org |
GitHub username or org | "janedev" |
Start the interactive wizard:
uvx uvtemplate createSkip git setup (just create the project files):
uvx uvtemplate create --skip-gitCreate a complete project without any prompts:
uvx uvtemplate --yes --destination my-cli-tool \
--data package_name=my-cli-tool \
--data package_module=my_cli_tool \
--data package_description="A command-line tool for doing things" \
--data package_author_name="Claude" \
--data package_author_email="ai@example.com" \
--data package_github_org="myorg" \
--skip-gitCreate a project and set up a private GitHub repo:
uvx uvtemplate --yes --destination my-project \
--data package_name=my-project \
--data package_description="My project" \
--data package_github_org="myorg"Create a project with a public GitHub repo:
uvx uvtemplate --yes --destination my-project \
--data package_name=my-project \
--publicIf you have a .copier-answers.yml from a previous project:
uvx uvtemplate --yes --destination new-project \
--answers-file /path/to/existing/.copier-answers.ymlThis tool is designed to work well with AI coding agents like Claude Code, Cursor, GitHub Copilot, etc.
-
Use
--yesflag: This auto-confirms all prompts, making the tool fully non-interactive. -
Provide all values via
--data: Set template values upfront to avoid interactive prompts. -
Use
--skip-gitif you want to handle git setup separately or don’t need it. -
The tool uses exit codes:
0for success,1for failure/cancellation. -
Values are derived intelligently: If you provide
--destination my-project, the tool will automatically derivepackage_name=my-projectandpackage_module=my_projectunless you override them.
The simplest non-interactive usage:
uvx uvtemplate --yes --destination my-project --skip-gitThis creates a project with sensible defaults derived from the destination name and your git/GitHub config.
For full control:
uvx uvtemplate --yes --destination my-project \
--data package_name=my-project \
--data package_module=my_project \
--data package_description="Project description here" \
--data package_author_name="Author Name" \
--data package_author_email="author@example.com" \
--data package_github_org="github-org" \
--skip-gitThe simple-modern-uv template. See that repo for full docs and this thread for a bit more context.
The template includes:
-
uv for project setup and dependencies
-
ruff for modern linting and formatting
-
GitHub Actions for CI and publishing workflows
-
Dynamic versioning from git tags
-
PyPI publishing workflows
-
BasedPyright for type checking
-
Pytest for tests
-
Codespell for spell checking
If you prefer, you can use that template directly; uvtemplate is just a CLI wrapper.
If you have another copier-format template you want to use, specify it with
--template.
Use the migrate command to analyze an existing project and get migration
recommendations:
cd my-existing-project
uvx uvtemplate migrateThis will detect your current build system (Poetry, setuptools, Pipenv, etc.) and provide a step-by-step guide for migrating to uv. It analyzes your project and outputs recommendations—it does not automatically modify any files.
The migrate command works well with AI agents, providing structured recommendations that an agent can follow to perform the migration.
You can also create a fresh template as a reference and manually copy what you need:
uvtemplate create --skip-git --destination .uvtemplate-refThen copy the relevant files (pyproject.toml structure, Makefile, workflows, etc.) into your existing project.
Projects created with uvtemplate can be updated to the latest template version:
cd my-project
uvx uvtemplate updateThis uses copier under the hood to apply template updates while preserving your customizations. The command will show you what changed and let you resolve any conflicts.
For non-interactive updates (useful for AI agents):
uvx uvtemplate update --yesNote: The update command only works on projects that were created with uvtemplate (or
copier directly). If you migrated a project manually, use uvtemplate migrate to see
recommendations.
This project was (of course) built using simple-modern-uv.
