How to try the ty type checker
This guide shows you how to try out ty, a static type checker and language server, in your project.
Prerequisites
To proceed, you’ll need uv.
Run ty from the command line
uvx ty checkThis checks all Python files in the working directory or project.
Try ty online
ty has an online playground for trying it out on snippets or small projects. The playground is useful for sharing code examples with others.
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.
Then disable the language server from the Python extension to avoid running two language servers. Add this to your settings.json:
{
"python.languageServer": "None"
}Neovim
For Neovim 0.10 or earlier with nvim-lspconfig:
require('lspconfig').ty.setup({
settings = {
ty = {
-- ty language server settings go here
}
}
})For Neovim 0.11+ with vim.lsp.config:
-- Optional: Only required if you need to update the language server settings
vim.lsp.config('ty', {
settings = {
ty = {
-- ty language server settings go here
}
}
})
-- Required: Enable the language server
vim.lsp.enable('ty')Zed
ty is included with Zed out of the box. Enable ty and disable basedpyright by adding this to your settings.json:
{
"languages": {
"Python": {
"language_servers": ["ty", "!basedpyright", "..."]
}
}
}PyCharm
Starting with version 2025.3, PyCharm has native ty support:
- Go to Python | Tools | ty in the Settings dialog.
- Select the Enable checkbox.
- Choose an execution mode: Interpreter (uses ty from your interpreter) or Path (uses ty from
$PATH).
Other editors
ty works with any editor that supports the Language Server Protocol. Start the language server with:
ty serverRefer to your editor’s documentation for connecting to an LSP server.