uv init is not the first run
uv init only writes files. The command that actually runs the entrypoint is uv run.
uv init writes pyproject.toml. It does not run the entrypoint. The first command that actually executes the script is uv run hello-world. To line up that command list, open a room on oakmeet.
The searchable mistake is treating uv init as the first run. The official projects guide tries uv run hello-world and prints Hello from hello-world!. .venv and uv.lock appear after the first project command, not at init.
init writes files; run executes
What uv init creates
uv init hello-world then cd, or mkdir and uv init in place. Official tree: .git/, .gitignore, .python-version, pyproject.toml, README.md, src/hello_world/__init__.py.
uv run is the first real run
The same page says try the entrypoint with uv run hello-world. .venv/ and uv.lock appear on the first uv run, uv sync, or uv lock. A toml file is not a running process.
| Job | uv | pip / venv |
|---|---|---|
| Project metadata | uv init → pyproject.toml | Hand-written or a template, often with requirements.txt |
| Dependencies | uv add requests (toml, lock, env) | pip install after activate |
| First entrypoint run | uv run hello-world | source .venv/bin/activate then python |
Three commands through the first run
- 01Install uv
macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh. Windows:irm https://astral.sh/uv/install.ps1 | iex. Orbrew install uv/pipx install uv.uvshould print help. - 02uv init, then uv add
uv init hello-worldthencd hello-world. Need a library?uv add requests. From an old file:uv add -r requirements.txt. That still does not run the entrypoint. - 03The first command that runs the project
Run
uv run hello-world. The docs printHello from hello-world!. For a script:uv run example.py. Each run syncs lock and env. Extra packages are not pruned by default. - 04source only on the old activate path
Fallback in the same guide:
uv sync, thensource .venv/bin/activate(PowerShell:.venv\Scripts\activate), thenpythonorflask run. Skip activate and you cannot dropuv run. Prefer run on a new repo.
curl -LsSf https://astral.sh/uv/install.sh | sh
uv init hello-world
cd hello-world
uv add requests
uv run hello-worldSeeing pyproject is not a run. uv run is the first cut.
- Why there is no .venv yet
- init does not create the project environment. Official: the first
uv run/uv sync/uv lockcreates.venvanduv.lock. - If you already think in pip
- You can
uv sync, activate, thenpython. That is the fallback. A new repo can stay onuv run. - Are extra packages removed
- Official:
uv rundoes not remove packages absent from the lockfile by default. One run is not a full prune.
Put the commands on one page
If two people need to agree which command counts as “it runs,” draw init / add / run on one board. oakmeet is a browser whiteboard with a space code and no signup. It is not a Python package manager.
Align, then run the repo on your own machines. Next: start a room, or see create and join a space and features.
Why isn’t hello-world a system command after uv init?
init only writes the [project.scripts] mapping. The documented trial is uv run hello-world. Until a project command creates the env, there is no .venv to activate.
Do I still need python -m venv?
No. uv creates .venv on the first project command. You only source it if you choose the sync-then-activate path and skip uv run.
How is uv add different from pip install?
Official: uv add edits pyproject.toml and updates the lockfile and project environment. pip install fills the currently activated env and does not maintain uv.lock for you.
Does oakmeet run uv for me?
No. oakmeet is a short-lived browser room and board. The start link is only so you can spread the command list for a colleague.