diff --git a/docs/features.md b/docs/features.md index 797a64aa3..3aea458de 100644 --- a/docs/features.md +++ b/docs/features.md @@ -3,101 +3,94 @@ uv supports the full Python development experience โ€” from installing Python and hacking on simple scripts to working on large projects that support multiple Python versions and platforms. -uv's commands can be broken down into sections of discrete features which can be used independently. +uv's commands can be broken down into sections of discrete features, which can be used independently. -## Python version management +## Python versions Installing and managing Python itself. -- `uv python install` -- `uv python list` -- `uv python find` -- `uv python pin` -- `uv python uninstall` +- `uv python install`: Install Python versions. +- `uv python list`: View available Python versions. +- `uv python find`: Find an installed Python version. +- `uv python pin`: Pin the current project to use a specific Python version. +- `uv python uninstall`: Uninstall a Python version. See the [guide on installing Python](./guides/install-python.md) to get started. -## Running scripts +## Scripts Executing standalone Python scripts, e.g., `example.py`. -- `uv run` +- `uv run`: Run a script. See the [guide on running scripts](./guides/scripts.md) to get started. -## Project management +## Projects Creating and working on Python projects, i.e., with a `pyproject.toml`. -- `uv init` -- `uv add` -- `uv remove` -- `uv sync` -- `uv lock` -- `uv run` -- `uv tree` +- `uv init`: Create a new Python project. +- `uv add`: Add a dependency to the project. +- `uv remove`: Remove a dependency from the project. +- `uv sync`: Sync the project's dependencies with the environment. +- `uv lock`: Create a lockfile for the project's dependencies. +- `uv run`: Run a command in the project environment. +- `uv tree`: View the dependency tree for the project. See the [guide on projects](./guides/projects.md) to get started. -## Tool installation +## Tools Running and installing tools published to Python package indexes, e.g., `ruff` or `black`. -- `uvx` / `uv tool run` -- `uv tool install` -- `uv tool uninstall` -- `uv tool list` -- `uv tool update-shell` +- `uvx` / `uv tool run`: Run a tool in a temporary environment. +- `uv tool install`: Install a tool user-wide. +- `uv tool uninstall`: Uninstall a tool. +- `uv tool list`: List installed tools. +- `uv tool update-shell`: Update the shell to include tool executables. See the [guide on tools](./guides/tools.md) to get started. -## Low-level commands +## Low-level Manually managing environments and packages โ€” intended to be used in legacy workflows or cases where the high-level commands do not provide enough control. Creating virtual environments (replacing `venv` and `virtualenv`): -- `uv venv` +- `uv venv`: Create a new virtual environment. See the documentation on [using environments](./pip/environments.md) for details. -Managing packages in an environment (replacing [`pip`](https://github.com/pypa/pip)): +Managing packages in an environment (replacing [`pip`](https://github.com/pypa/pip) and [`pipdeptree`](https://github.com/tox-dev/pipdeptree)): -- `uv pip install` -- `uv pip show` -- `uv pip freeze` -- `uv pip check` -- `uv pip list` -- `uv pip uninstall` +- `uv pip install`: Install packages into the current environment. +- `uv pip show`: Show details about an installed package. +- `uv pip freeze`: List installed packages and their versions. +- `uv pip check`: Check that the current environment has compatible packages. +- `uv pip list`: List installed packages. +- `uv pip uninstall`: Uninstall packages. +- `uv pip tree`: View the dependency tree for the environment. See the documentation on [managing packages](./pip/packages.md) for details. Locking packages in an environment (replacing [`pip-tools`](https://github.com/jazzband/pip-tools)): -- `uv pip compile` -- `uv pip sync` +- `uv pip compile`: Compile requirements into a lockfile. +- `uv pip sync`: Sync an environment with a lockfile. See the documentation on [locking environments](./pip/compile.md) for details. -Viewing package dependencies in an environment (replacing [`pipdeptree`](https://github.com/tox-dev/pipdeptree)): - -- `uv pip tree` - !!! important These commands do not exactly implement the interfaces and behavior of the tools they are based on. The further you stray from common workflows, the more likely you are to encounter differences. Consult the [pip-compatibility guide](./pip/compatibility.md) for details. -## Internal commands +## Internal Managing and inspecting uv's state, such as the cache, storage directories, or performing a self-update: -- `uv cache clean` -- `uv cache prune` -- `uv cache dir` -- `uv tool dir` -- `uv python dir` -- `uv self update` - -## Next steps - -Check out the [documentation overview](./overview.md) for a list of guides and concepts. +- `uv cache clean`: Remove cache entries. +- `uv cache prune`: Remove outdated cache entries. +- `uv cache dir`: Show the uv cache directory path. +- `uv tool dir`: Show the uv tool directory path. +- `uv python dir`: Show the uv installed Python versions path. +- `uv self update`: Update uv to the latest version. diff --git a/docs/first-steps.md b/docs/first-steps.md index 1fecb76f6..c5526d080 100644 --- a/docs/first-steps.md +++ b/docs/first-steps.md @@ -56,4 +56,4 @@ When using the long help menu, uv will attempt to use `less` or `more` to "page" ## Next steps -Now that you've confirmed uv is installed and know how to get help, check out the [feature overview](./features.md) to start using uv. +Now that you've confirmed uv is installed and know how to get help, check out an [overview of features](./features.md) or jump straight into the [guides](./guides/overview.md) to start using uv. diff --git a/docs/guides/install-python.md b/docs/guides/install-python.md index 5c3501ccb..171e677fd 100644 --- a/docs/guides/install-python.md +++ b/docs/guides/install-python.md @@ -2,6 +2,10 @@ If Python is already installed on your system, uv will [detect and use](#using-an-existing-python-installation) it without configuration. However, uv can also install and manage Python versions for you. +!!! tip + + uv will [automatically fetch Python versions](#automatic-python-downloads) as needed โ€” you don't need to install Python to get started. + To install the latest Python version: ```console @@ -59,10 +63,10 @@ Note that Python does not need to be explicitly installed to use uv. By default, $ uv run --python 3.12 python -c 'print("hello world")' ``` -Even if a specific Python version is not requested, uv will download the latest version on demand. For example, the following will create a new virtual environment and download a managed Python version if one hasn't been installed yet: +Even if a specific Python version is not requested, uv will download the latest version on demand. For example, the following will create a new virtual environment and download a managed Python version if Python is not found: ```console -$ uv venv --python-preference only-managed +$ uv venv ```