Astral previews uv and ty integration with a new uv check command

Astral, the company behind the Python tools uv (package manager), Ruff (linter and formatter) and ty (type checker and language server), has announced an experimental integration between uv and ty, available in preview. The pitch is that uv understands a project's environment and dependencies, while ty understands the code, so combining them can do things neither tool does alone. Astral frames this as a step toward an integrated toolchain in which each tool stays usable and interoperable on its own but is more capable when used together.
The first feature is first-class support for Python scripts. PEP 723 lets a script declare its dependencies and Python version requirements as inline metadata, and uv already uses that metadata to prepare an environment when it runs a script. Now ty reads the same metadata. On both the command line and in the editor, ty discovers scripts throughout a project and calls uv to prepare an environment for each one, then checks the script against its declared requirements. Scripts in the same repository can have different requirements: each is checked against its own dependency declarations, even if those differ from the surrounding project. In an editor with the integration enabled, ty invokes uv in the background to build the script's environment, and uses it for type checking, code navigation, completions, hover information and Go to Definition.
The second feature is uv check, a unified diagnostic interface in uv that starts with support for ty. Running it prepares the project's environment, installs the required dependencies and checks the project with ty. Astral says it "just works". Users who never run uv check see no change in uv; the ty binary is installed separately on first invocation. In a workspace, uv check --package <name> checks one package and uv check --all-packages checks every package, with uv using the workspace configuration to decide what to check. Standalone PEP 723 scripts have independent environments and are checked separately with uv check --script example.py. uv check also uses the ty version recorded in the project's lockfile, so developers and CI that commit the configuration and lockfile share one ty version without separately maintained pins. The ty pre-commit hook now uses uv check under the hood too, so it sets up the environment from the project's dependency declarations.
Under the hood, the integration is powered by uv workspace metadata, which gives ty a structured view of the packages, dependencies and Python environment of a project or script. Because installing dependencies can require executing third-party Python code, automatic environment setup for scripts is currently opt-in. To try it in VS Code, install uv and the ty VS Code extension, then set "ty.experimental.useUv": "on" in settings.json. From the command line, TY_UV=scripts ty check checks a project and its PEP 723 scripts; running uv check enables the integration automatically with no extra configuration. PEP 723 script support and uv check need uv 0.12.3 or later and ty 0.0.76 or later.
Astral says it plans, over time, to enable script support by default and to turn on automatic environment setup for standard Python projects, and to add Ruff to uv check so linting and type checking run in one command. It is also working on a new category of checks that combine uv's knowledge of dependencies with ty's understanding of code, for example detecting unused dependencies, to be covered in a future post. In parallel, it is continuing toward ty's stable release. The post thanks Aria Desires, Micha Reiser and Zsolt Dollenstein of the Astral team for implementing the features, and asks for feedback.
Key facts
- Astral announced an experimental, preview integration of uv (package manager) and ty (type checker and language server).
- ty now reads PEP 723 inline metadata, finds scripts across a project and uses uv to build a separate environment for each, on the CLI and in the editor.
- The new
uv checkcommand prepares the environment, installs dependencies and checks the project with ty;--package,--all-packagesand--scriptselect what to check. uv checkuses the ty version pinned in the project's lockfile, so developers and CI share one version; the ty pre-commit hook uses it too.- It requires uv 0.12.3 or later and ty 0.0.76 or later; script setup is opt-in, and Ruff support in
uv checkis only planned.
Why it matters
Until now each Astral tool covered one part of Python development. This is the first announced step toward a toolchain that shares one view of a project: uv knows the environment and dependencies, ty knows the code. For scripts, it means a type checker and editor that follow each script's own inline dependencies instead of the surrounding project's. For projects, uv check collapses syncing dependencies and type checking into one command. Astral also says the shared knowledge should allow new checks, such as spotting unused dependencies, though that is future work.
Who it affects
Python developers who already use uv and ty, especially those with PEP 723 scripts that declare different dependencies from the rest of their repository. Teams with workspaces of several packages get --package and --all-packages. Teams running type checks in CI or pre-commit get a shared ty version through the lockfile. People who never run uv check are unaffected: Astral says nothing changes in their uv experience.
How to use it
Install uv 0.12.3 or later and ty 0.0.76 or later. For the simplest route, run uv check in a project: it enables the integration automatically and needs no configuration. In a workspace, add --package <name> for one package or --all-packages for all of them. For a standalone script, run uv check --script example.py. From the command line, TY_UV=scripts ty check checks a project and its PEP 723 scripts. In VS Code, install uv and the ty extension, then add "ty.experimental.useUv": "on" to settings.json. Commit the lockfile so CI uses the same ty version.
How solid is it
This is a first-party announcement on Astral's own blog, and the commands, settings and version requirements come straight from it. Astral labels the integration experimental and in preview, and asks for feedback. The post gives no benchmarks or performance figures, and no user reactions, adoption numbers or known issues. It gives no dates for the planned changes, and none for ty's stable release.
Risks and caveats
The integration is experimental, so behaviour and settings may still change; the VS Code setting is itself named experimental. Automatic environment setup for scripts is opt-in because installing dependencies can execute third-party Python code. ty is not yet at a stable release. Ruff support in uv check, default-on script support and automatic setup for standard projects are plans without timescales, and the unused-dependency check is only an example of future work.
“uv understands your Python project’s environment and dependencies, while ty understands your code.”
— Astral, announcement post