After using uv init
in a project directory, uv
creates these files:
.git
README.md
pyproject.toml
hello.py
.python-version
.gitignore
I don't want it to generate hello.py. I want the others, but hello.py
is unusable, and I delete it every time I initialize a new environment.
I read the uv help manual and searched, but couldn't find my answer.
How can I prevent this command from generating hello.py
?
After using uv init
in a project directory, uv
creates these files:
.git
README.md
pyproject.toml
hello.py
.python-version
.gitignore
I don't want it to generate hello.py. I want the others, but hello.py
is unusable, and I delete it every time I initialize a new environment.
I read the uv help manual and searched, but couldn't find my answer.
How can I prevent this command from generating hello.py
?
1 Answer
Reset to default 3There's no native support for this exact use case. v0.5.29 introduced the --bare
option, which will only create pyproject.toml
, but it won't work if you want to keep the other boilerplate files.
If you use Bash, you can add this alias for convenience (in pre-0.6.0 versions, replace main.py
with hello.py
):
alias cleanuv="uv init && rm main.py"
Then just use cleanuv
instead of uv init
whenever you want to start a new project.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745413280a4626628.html
评论列表(0条)