Installing ty
Running ty without installation
Use uvx to quickly get started with ty:
Installation methods
Adding ty to your project
Tip
Adding ty as a dependency ensures that all developers on the project are using the same version of ty.
Use uv (or your project manager of choice) to add ty as a development dependency:
Then, use uv run to invoke ty:
To update ty, use --upgrade-package:
Installing globally with uv
Install ty globally with uv:
To update ty, use uv tool upgrade:
Installing with the standalone installer
ty includes a standalone installer.
Use curl to download the script and execute it with sh:
If your system doesn't have curl, you can use wget:
Request a specific version by including it in the URL:
Use irm to download the script and execute it with iex:
Changing the execution policy allows running a script from the internet.
Request a specific version by including it in the URL:
Tip
The installation script may be inspected before use:
Alternatively, the installer or binaries can be downloaded directly from GitHub.
Installing from GitHub Releases
ty release artifacts can be downloaded directly from GitHub Releases.
Each release page includes binaries for all supported platforms as well as instructions for using
the standalone installer via github.com instead of astral.sh.
Installing globally with pipx
Install ty globally with pipx:
To update ty, use pipx upgrade:
Installing with pip
Install ty into your current Python environment with pip:
Installing in Docker
Install ty in Docker by copying the binary from the official image:
The following tags are available:
ghcr.io/astral-sh/ty:latestghcr.io/astral-sh/ty:{major}.{minor}.{patch}, e.g.,ghcr.io/astral-sh/ty:0.0.4ghcr.io/astral-sh/ty:{major}.{minor}, e.g.,ghcr.io/astral-sh/ty:0.0(the latest patch version)
Adding ty to your editor
See the editor integration guide to add ty to your editor.
Shell autocompletion
Tip
You can run echo $SHELL to help you determine your shell.
To enable shell autocompletion for ty commands, run one of the following:
Then restart the shell or source the shell config file.