mirror of
https://github.com/astral-sh/uv
synced 2026-01-10 16:13:44 -05:00
Add --bare option to uv init (#11192)
People are looking for a less opinionated version of `uv init`. The goal here is to create a `pyproject.toml` and nothing else. With the `--lib` or `--package` flags, we'll still configure a build backend but we won't create the source tree. This disables things like the default `description`, author behavior, and VCS. See - https://github.com/astral-sh/uv/issues/8178 - https://github.com/astral-sh/uv/issues/7181 - https://github.com/astral-sh/uv/issues/6750
This commit is contained in:
@@ -555,6 +555,10 @@ uv init [OPTIONS] [PATH]
|
||||
|
||||
<li><code>none</code>: Do not infer the author information</li>
|
||||
</ul>
|
||||
</dd><dt><code>--bare</code></dt><dd><p>Only create a <code>pyproject.toml</code>.</p>
|
||||
|
||||
<p>Disables creating extra files like <code>README.md</code>, the <code>src/</code> tree, <code>.python-version</code> files, etc.</p>
|
||||
|
||||
</dd><dt><code>--build-backend</code> <i>build-backend</i></dt><dd><p>Initialize a build-backend of choice for the project.</p>
|
||||
|
||||
<p>Implicitly sets <code>--package</code>.</p>
|
||||
@@ -632,6 +636,8 @@ uv init [OPTIONS] [PATH]
|
||||
<p>Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.</p>
|
||||
|
||||
<p>May also be set with the <code>UV_NO_CONFIG</code> environment variable.</p>
|
||||
</dd><dt><code>--no-description</code></dt><dd><p>Disable the description for the project</p>
|
||||
|
||||
</dd><dt><code>--no-package</code></dt><dd><p>Do not set up the project to be built as a Python package.</p>
|
||||
|
||||
<p>Does not include a <code>[build-system]</code> for the project.</p>
|
||||
|
||||
Reference in New Issue
Block a user