Skip to content

init

init

init(path: Path | None = None, quiet: bool = False) -> None

Initialize a new project with cluv.

This does the following:

  • Runs uv init --package --build-backend hatch --python 3.11 to initialize a new uv project in the current directory (if there isn't one already).
  • Adds a configuration for Cluv in the [tool.cluv] section of pyproject.toml, from the answers to a few questions. When quiet is True, or when stdin isn't a terminal, no question is asked and the default answers are used.
  • Adds job script templates in the scripts/ directory of the project.