A CLI tool that searches, lints, and rewrites code by matching abstract syntax tree patterns instead of plain text.
davidhalter/jedi
A Python static analysis library for autocompletion, go-to-definition, refactoring and code search, mainly used by editor plugins.
- Stars
- 6,186
- Forks
- 549
- Open issues
- 58
- Last commit
- 6 days ago
What is it?
Jedi is a static analysis library for Python, typically embedded in IDEs and editors to power autocompletion and go-to-definition. Its API lets tools request completions, signatures, documentation, inferred types, and references for code at a given position without running the program.
Beyond completion, Jedi offers refactoring operations such as rename, inline, extract function and extract variable, along with syntax error listing, name enumeration and code search across modules and projects. It works with virtualenvs and is used by the IPython REPL, which bundles it as a dependency.
Jedi is consumed through editor plugins like jedi-vim and VS Code's Python extension, and through language servers such as jedi-language-server and python-lsp-server. It supports Python 3.10 and later while still analyzing older code.
Key features
- 01Autocompletion and go-to-definition for Python code
- 02Signatures, documentation and type inference at a cursor position
- 03Refactoring: rename, inline, extract function and extract variable
- 04Reference finding and code search across modules and projects
- 05Virtualenv support and syntax error listing
Use cases
- Adding Python autocompletion and navigation to a text editor or IDE
- Powering a Python language server for editor integration
- Enabling tab completion in the IPython or CPython REPL
- Scripting automated refactoring or code search over Python projects
Quick start
- 1
Install Jedi from PyPI
pip install jedi - 2
Run the test suite (optional): install pytest
pip install pytest
Things to know
- Mainly designed for editor plugins and autocompletion rather than as a standalone tool.
- The author has released Zuban as a successor to Jedi.
Topics
FAQ
- What is jedi?
- A Python static analysis library for autocompletion, go-to-definition, refactoring and code search, mainly used by editor plugins. Jedi is a static analysis library for Python, typically embedded in IDEs and editors to power autocompletion and go-to-definition. Its API lets tools request completions, signatures, documentation, inferred types, and references for code at a given position without running the program.
- Is jedi free to use? What license does it have?
- jedi is open source under the Other license. Check the license terms before using it in commercial products.
- Is jedi still maintained?
- Actively maintained. The last commit to jedi was on Nov 2, 2026.
- What can I use jedi for?
- Adding Python autocompletion and navigation to a text editor or IDE Powering a Python language server for editor integration Enabling tab completion in the IPython or CPython REPL Scripting automated refactoring or code search over Python projects
- How do I install jedi?
- Install Jedi from PyPI: pip install jedi Run the test suite (optional): install pytest: pip install pytest
- Where can I get jedi?
- The source code and installation instructions are on GitHub: https://github.com/davidhalter/jedi
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source automated refactoring engine that applies recipes to source code across many repositories, covering framework migrations and security fixes.
A compiler that reads Rails applications in Ruby and emits standalone projects in other languages such as Rust, Go, TypeScript, Elixir, or a native Spinel binary.
Ruby static analyzer that infers types from code without annotations, aiming to report only conclusive bugs such as undefined methods and nil receivers.
A standards-based static type checker for Python, with a command-line tool and a Visual Studio Code extension, built for large codebases.
A fast Python type checker and language server, written in Rust, with IDE features like navigation, completion and semantic highlighting.