How to try the ty type checker
This guide shows you how to try out ty, a new static type checker and language server, in your project.
⚠️
ty is pre-alpha software and is not production-ready. You may encounter bugs or incomplete features. It is released for preview and community feedback.
Prerequisites
To proceed, you’ll need uv.
Run ty from the command line
uvx ty check .
This checks all Python files recursively from the current directory.
Use the ty Language Server
Ty includes a Language Server Protocol (LSP) implementation compatible with modern editors.
VS Code and Cursor
Install the official ty extension from the Visual Studio Marketplace.
Other LSP-Compatible Editors
Install ty
with uv install ty
. Configure your editor to launch the ty server
using its LSP support.
If you’re using nvim-lspconfig for Neovim, add this block:
lspconfig.ty_ls = {
default_config = {
cmd = { "ty", "lsp" },
filetypes = { "python" },
root_dir = lspconfig.util.root_pattern("pyproject.toml", ".git"),
}
}
-- Optional: attach manually
lspconfig.ty_ls.setup{}
For Emacs, add the following to your init file:
(require 'lsp-mode)
(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection '("ty" "lsp"))
:major-modes '(python-mode)
:server-id 'ty-lsp))
(add-hook 'python-mode-hook #'lsp)
Also Mentioned In
Last updated on
How to switch from pyenv to uv for managing Python versionsHow to Use `--exclude-newer` for Reproducible Python Environments