From d64653291b02d729d72386b7194c456fc5a6d771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon-Martin=20Schr=C3=B6der?= Date: Tue, 30 Sep 2025 10:27:05 +0200 Subject: [PATCH] Short overview of project creation options Added a short overview for project creation options --- docs/concepts/projects/init.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/concepts/projects/init.md b/docs/concepts/projects/init.md index f832c2725..999989e4f 100644 --- a/docs/concepts/projects/init.md +++ b/docs/concepts/projects/init.md @@ -6,6 +6,14 @@ When creating projects, uv supports two basic templates: [**applications**](#app [**libraries**](#libraries). By default, uv will create a project for an application. The `--lib` flag can be used to create a project for a library instead. +| Option | When to Use | Project Layout | +| --------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `--bare` | You only want a minimal `pyproject.toml` without README, pin file, or source | Just `pyproject.toml` (can combine with `--lib` or `--build-backend`) | +| *(default)* / `--app` | You’re building a simple application (script, CLI, web server) | Flat layout with `main.py`, `README.md`, `.python-version`, `pyproject.toml` | +| `--package` | You want an installable packaged app (e.g. CLI on PyPI, tests, entry points) | `src/` layout with package module, `pyproject.toml` including build system | +| `--lib` | You’re creating a reusable library to distribute on PyPI | Like `--package`, but with `py.typed` and intended for import by other projects | + + ## Target directory uv will create a project in the working directory, or, in a target directory by providing a name,