{"article":{"slug":"bringing-uv-and-ty-together","title":"Bringing uv and ty together","subtitle":null,"summary":"Astral announces an experimental integration between its uv package manager and ty type checker, adding first-class support for Python scripts on the CLI and in the editor and a unified uv check command, as a step toward an integrated Astral toolchain.","content_type":"announcement","language":"en","canonical_url":"https://astral.sh/blog/uv-ty-integration","author":{"name":"Sara Sklenka","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Astral","url":"https://astral.sh/","listing_slug":null,"listing":null},"topics":[{"name":"Developer Tools","slug":"developer-tools","url":"https://listedarticles.com/topics/developer-tools"},{"name":"Programming","slug":"programming","url":"https://listedarticles.com/topics/programming"},{"name":"Open Source","slug":"open-source","url":"https://listedarticles.com/topics/open-source"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":934,"reading_minutes":4,"published_at":"2026-10-13T00:00:00.000Z","added_at":"2026-10-24T02:07:23.195Z","updated_at":"2026-10-24T02:07:23.195Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/bringing-uv-and-ty-together","markdown_url":"https://listedarticles.com/articles/bringing-uv-and-ty-together.md","example":false,"citation":"Sara Sklenka, Astral. \"Bringing uv and ty together.\" 13 Oct 2026. https://astral.sh/blog/uv-ty-integration (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://astral.sh/blog/uv-ty-integration"},"body_markdown":"# Bringing uv and ty together\n\n*October 13, 2026 · Sara Sklenka*\n\n**TL;DR:** Experimental uv-ty integration is now available, enabling first-class support for Python\nscripts (on the CLI and in the editor) and a unified `uv check` command.\n\nThis is a step towards an integrated Astral toolchain, one that uses a shared understanding of your\nproject to enable entirely new capabilities.\n\n---\n\nAt Astral, we build high-performance tools for the Python ecosystem:\n[uv](https://github.com/astral-sh/uv), our package manager;\n[Ruff](https://github.com/astral-sh/ruff), our linter and formatter; and\n[ty](https://github.com/astral-sh/ty), our type checker and language server.\n\nHistorically, each Astral tool has focused on making a different component of Python development\nmore productive. But we see an opportunity to further Python by unifying traditionally separate\ncapabilities into an integrated toolchain.\n\nOur vision for the Astral toolchain is simple: while each tool should be individually usable,\nuseful, and interoperable with the rest of the ecosystem, they should be even more capable when used\ntogether.\n\nToday, we’re announcing an experimental **integration between uv and ty**, available in preview. uv\nunderstands your Python project’s environment and dependencies, while ty understands your code. By\ncombining the two, we can unlock new functionality beyond what either tool can provide individually.\n\n## First-class support for Python scripts \n\n[PEP 723](https://peps.python.org/pep-0723/) enables Python scripts to declare their dependencies\nand Python version requirements through inline metadata. uv already uses this metadata to prepare an\nenvironment when running a script. Now, ty can use this metadata to understand your scripts.\n\nOn both the command line and in the editor, ty now uses inline metadata to discover scripts\nthroughout your project and leverages uv to prepare an environment for each script. These\nenvironments allow ty to check your scripts against their declared requirements.\n\nScripts can have different requirements within the same repository. Each script is checked against\nits own dependency declarations, even if those dependencies or Python requirements differ from the\nsurrounding project.\n\nDeclare dependencies inline with PEP 723, save to sync with uv, and use ty’s completions, hover information, and Go to Definition capabilities in your editor.\n\n*Declare dependencies inline with PEP 723, save to sync with uv, and use ty’s completions, hover\ninformation, and Go to Definition capabilities in your editor.*\n\nWhen the integration is enabled in your editor, ty automatically invokes uv to prepare the script’s\nenvironment in the background, which it uses to provide type checking, code navigation, and\ncompletions based on the script’s declared requirements.\n\nOver time, we plan to enable script support by default, and enable automatic environment setup for\nstandard Python projects.\n\n## A unified checking command \n\n`uv check` introduces a unified diagnostic interface to uv, starting with support for ty. Over time,\nwe plan to support Ruff in `uv check` to unify linting and type checking into a single command.\n\nRunning `uv check` will automatically prepare your project’s environment, install the required\ndependencies, and check your project with ty. It “just works.” (If you never run `uv check`, nothing\nchanges for your uv experience; the ty binary is installed separately on first invocation.)\n\nWith `uv check`, you can check individual packages, or an entire workspace. In a workspace, use\n`uv check --package <name>` to select an individual package, or `uv check --all-packages` to check\nevery package. uv uses your workspace configuration to determine what to check, so the command stays\nthe same as your workspace grows.\n\nSync your project’s dependencies and type-check your code with a single command.\n\n*Sync your project’s dependencies and type-check your code with a single command.*\n\nStandalone PEP 723 scripts have independent environments and are checked separately. Use\n`uv check --script example.py` to check a script using its declared requirements.\n\n`uv check` automatically uses the ty version recorded in your project’s lockfile. Commit your\nproject configuration and lockfile, and developers and CI running `uv check` will share the same ty\nversion without separately maintained pins.\n\nThe [ty pre-commit hook](https://github.com/astral-sh/ty-pre-commit) also uses `uv check` under the\nhood to run ty before each commit over your Python project. By using `uv check`, the hook\nautomatically sets up the environment for ty from your project’s dependency declarations.\n\n## How it works \n\nThe uv-ty integration is powered by\n[`uv workspace metadata`](https://docs.astral.sh/uv/reference/internals/metadata/), which gives ty a\nstructured view of your project or script’s packages, dependencies, and Python environment. ty then\nuses this information to provide type checking and editor features that reflect the configured\nenvironment.\n\nFor PEP 723 scripts, ty invokes uv to prepare the script’s environment, which includes installing\ndeclared dependencies. As dependency installation can require execution of third-party Python code,\nautomatic environment setup is currently opt-in.\n\nTo [try the integration](https://docs.astral.sh/ty/reference/editor-settings/#experimentaluseuv) for\nPEP 723 scripts in VS Code, [install uv](https://docs.astral.sh/uv/getting-started/installation/)\nand the [ty VS Code extension](https://marketplace.visualstudio.com/items?itemName=astral-sh.ty),\nthen enable the uv integration in your VS Code `settings.json`.\n\n```\n{\n  \"ty.experimental.useUv\": \"on\"\n}\n```\n\nYou can also check your project and its PEP 723 scripts from the command line with:\n\n```\nTY_UV=scripts ty check\n```\n\n[Running `uv check`](https://docs.astral.sh/uv/reference/cli/#uv-check) enables the integration\nautomatically and requires no additional configuration.\n\nSupport for PEP 723 scripts and the `uv check` command requires uv 0.12.3 or later, and ty 0.0.76 or\nlater.\n\n## Up next \n\nThis integration is experimental, and we’d love your feedback as we refine the experience.\n\nWhile this initial support largely leverages uv’s environment capabilities to power ty execution,\nwe’re also working on a new category of checks that combine uv’s knowledge of your project’s\ndependencies with ty’s understanding of your code (e.g., to detect unused dependencies), which we’ll\ncover in a future post.\n\nAnd, in parallel, we’re continuing toward ty’s stable release.\n\nThank you for building with us!\n\n*Thanks to [Aria Desires](https://github.com/Gankra),\n[Micha Reiser](https://github.com/MichaReiser), and [Zsolt Dollenstein](https://github.com/zsol)\nfrom the Astral team for implementing the features behind this integration.*\n","body_html":"<h1 id=\"bringing-uv-and-ty-together\">Bringing uv and ty together</h1>\n<p><em>October 13, 2026 · Sara Sklenka</em></p>\n<p><strong>TL;DR:</strong> Experimental uv-ty integration is now available, enabling first-class support for Python\nscripts (on the CLI and in the editor) and a unified <code>uv check</code> command.</p>\n<p>This is a step towards an integrated Astral toolchain, one that uses a shared understanding of your\nproject to enable entirely new capabilities.</p>\n<hr />\n<p>At Astral, we build high-performance tools for the Python ecosystem:\n<a href=\"https://github.com/astral-sh/uv\" rel=\"nofollow ugc noopener\">uv</a>, our package manager;\n<a href=\"https://github.com/astral-sh/ruff\" rel=\"nofollow ugc noopener\">Ruff</a>, our linter and formatter; and\n<a href=\"https://github.com/astral-sh/ty\" rel=\"nofollow ugc noopener\">ty</a>, our type checker and language server.</p>\n<p>Historically, each Astral tool has focused on making a different component of Python development\nmore productive. But we see an opportunity to further Python by unifying traditionally separate\ncapabilities into an integrated toolchain.</p>\n<p>Our vision for the Astral toolchain is simple: while each tool should be individually usable,\nuseful, and interoperable with the rest of the ecosystem, they should be even more capable when used\ntogether.</p>\n<p>Today, we’re announcing an experimental <strong>integration between uv and ty</strong>, available in preview. uv\nunderstands your Python project’s environment and dependencies, while ty understands your code. By\ncombining the two, we can unlock new functionality beyond what either tool can provide individually.</p>\n<h2 id=\"first-class-support-for-python-scripts\">First-class support for Python scripts</h2>\n<p><a href=\"https://peps.python.org/pep-0723/\" rel=\"nofollow ugc noopener\">PEP 723</a> enables Python scripts to declare their dependencies\nand Python version requirements through inline metadata. uv already uses this metadata to prepare an\nenvironment when running a script. Now, ty can use this metadata to understand your scripts.</p>\n<p>On both the command line and in the editor, ty now uses inline metadata to discover scripts\nthroughout your project and leverages uv to prepare an environment for each script. These\nenvironments allow ty to check your scripts against their declared requirements.</p>\n<p>Scripts can have different requirements within the same repository. Each script is checked against\nits own dependency declarations, even if those dependencies or Python requirements differ from the\nsurrounding project.</p>\n<p>Declare dependencies inline with PEP 723, save to sync with uv, and use ty’s completions, hover information, and Go to Definition capabilities in your editor.</p>\n<p>*Declare dependencies inline with PEP 723, save to sync with uv, and use ty’s completions, hover\ninformation, and Go to Definition capabilities in your editor.*</p>\n<p>When the integration is enabled in your editor, ty automatically invokes uv to prepare the script’s\nenvironment in the background, which it uses to provide type checking, code navigation, and\ncompletions based on the script’s declared requirements.</p>\n<p>Over time, we plan to enable script support by default, and enable automatic environment setup for\nstandard Python projects.</p>\n<h2 id=\"a-unified-checking-command\">A unified checking command</h2>\n<p><code>uv check</code> introduces a unified diagnostic interface to uv, starting with support for ty. Over time,\nwe plan to support Ruff in <code>uv check</code> to unify linting and type checking into a single command.</p>\n<p>Running <code>uv check</code> will automatically prepare your project’s environment, install the required\ndependencies, and check your project with ty. It “just works.” (If you never run <code>uv check</code>, nothing\nchanges for your uv experience; the ty binary is installed separately on first invocation.)</p>\n<p>With <code>uv check</code>, you can check individual packages, or an entire workspace. In a workspace, use\n<code>uv check --package &lt;name&gt;</code> to select an individual package, or <code>uv check --all-packages</code> to check\nevery package. uv uses your workspace configuration to determine what to check, so the command stays\nthe same as your workspace grows.</p>\n<p>Sync your project’s dependencies and type-check your code with a single command.</p>\n<p><em>Sync your project’s dependencies and type-check your code with a single command.</em></p>\n<p>Standalone PEP 723 scripts have independent environments and are checked separately. Use\n<code>uv check --script example.py</code> to check a script using its declared requirements.</p>\n<p><code>uv check</code> automatically uses the ty version recorded in your project’s lockfile. Commit your\nproject configuration and lockfile, and developers and CI running <code>uv check</code> will share the same ty\nversion without separately maintained pins.</p>\n<p>The <a href=\"https://github.com/astral-sh/ty-pre-commit\" rel=\"nofollow ugc noopener\">ty pre-commit hook</a> also uses <code>uv check</code> under the\nhood to run ty before each commit over your Python project. By using <code>uv check</code>, the hook\nautomatically sets up the environment for ty from your project’s dependency declarations.</p>\n<h2 id=\"how-it-works\">How it works</h2>\n<p>The uv-ty integration is powered by\n<a href=\"https://docs.astral.sh/uv/reference/internals/metadata/\" rel=\"nofollow ugc noopener\"><code>uv workspace metadata</code></a>, which gives ty a\nstructured view of your project or script’s packages, dependencies, and Python environment. ty then\nuses this information to provide type checking and editor features that reflect the configured\nenvironment.</p>\n<p>For PEP 723 scripts, ty invokes uv to prepare the script’s environment, which includes installing\ndeclared dependencies. As dependency installation can require execution of third-party Python code,\nautomatic environment setup is currently opt-in.</p>\n<p>To <a href=\"https://docs.astral.sh/ty/reference/editor-settings/#experimentaluseuv\" rel=\"nofollow ugc noopener\">try the integration</a> for\nPEP 723 scripts in VS Code, <a href=\"https://docs.astral.sh/uv/getting-started/installation/\" rel=\"nofollow ugc noopener\">install uv</a>\nand the <a href=\"https://marketplace.visualstudio.com/items?itemName=astral-sh.ty\" rel=\"nofollow ugc noopener\">ty VS Code extension</a>,\nthen enable the uv integration in your VS Code <code>settings.json</code>.</p>\n<pre><code>{\n  &quot;ty.experimental.useUv&quot;: &quot;on&quot;\n}</code></pre>\n<p>You can also check your project and its PEP 723 scripts from the command line with:</p>\n<pre><code>TY_UV=scripts ty check</code></pre>\n<p><a href=\"https://docs.astral.sh/uv/reference/cli/#uv-check\" rel=\"nofollow ugc noopener\">Running <code>uv check</code></a> enables the integration\nautomatically and requires no additional configuration.</p>\n<p>Support for PEP 723 scripts and the <code>uv check</code> command requires uv 0.12.3 or later, and ty 0.0.76 or\nlater.</p>\n<h2 id=\"up-next\">Up next</h2>\n<p>This integration is experimental, and we’d love your feedback as we refine the experience.</p>\n<p>While this initial support largely leverages uv’s environment capabilities to power ty execution,\nwe’re also working on a new category of checks that combine uv’s knowledge of your project’s\ndependencies with ty’s understanding of your code (e.g., to detect unused dependencies), which we’ll\ncover in a future post.</p>\n<p>And, in parallel, we’re continuing toward ty’s stable release.</p>\n<p>Thank you for building with us!</p>\n<p>*Thanks to <a href=\"https://github.com/Gankra\" rel=\"nofollow ugc noopener\">Aria Desires</a>,\n<a href=\"https://github.com/MichaReiser\" rel=\"nofollow ugc noopener\">Micha Reiser</a>, and <a href=\"https://github.com/zsol\" rel=\"nofollow ugc noopener\">Zsolt Dollenstein</a>\nfrom the Astral team for implementing the features behind this integration.*</p>","headings":[{"level":1,"text":"Bringing uv and ty together","id":"bringing-uv-and-ty-together"},{"level":2,"text":"First-class support for Python scripts","id":"first-class-support-for-python-scripts"},{"level":2,"text":"A unified checking command","id":"a-unified-checking-command"},{"level":2,"text":"How it works","id":"how-it-works"},{"level":2,"text":"Up next","id":"up-next"}]}}