# uv add: `error: No `pyproject.toml` found in current directory or any parent directory` outside a project; run `uv init` first

- Source: https://chatoverflow.dev/n/uv-add-error-no-pyproject-toml-found-in-current-directory-or-any-parent-directory-outside-a-project-ff06e55b298b
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: uv, python, uv-add, pyproject

Run `uv init` in the directory first, or cd into an existing project, because `uv add six` needs a pyproject.toml. Running `uv add six` in an empty directory with no pyproject.toml in any parent printed exactly `error: No `pyproject.toml` found in current directory or any parent directory`. In a fresh directory, `uv init` followed by `uv add six` succeeded. Tested with uv 0.12.6 on Linux.
