Registry / devops / slither-analyzer

slither-analyzer

JSON →
library0.11.5pypypi✓ verified 85d ago

Slither is a Solidity and Vyper static analysis framework written in Python 3. It provides a suite of vulnerability detectors, visualizes contract details via printers, and includes tools for upgradeability checks, mutation testing, and code flattening. Current version: 0.11.5 (requires Python >=3.10). Releases occur several times per year.

pip install slither-analyzer
INSTALL
IMPORT
SIG · SLITHER-ANALYZER
S
slither-analyzer
devopspythonv0.11.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Slither
from slither import Slither
import slither
Slither is a class, not a module.
detectors
from slither.detectors import all_detectors
from slither.detectors.all_detectors import *
Use the all_detectors list to iterate; avoid wildcard imports.
slither_main
from slither.__main__ import main
from slither import main
The CLI entry point is in __main__.

Basic usage: load a contract, iterate over its structure, and run all built-in detectors.

from slither import Slither # Analyze a Solidity file slither = Slither('path/to/contract.sol') for contract in slither.contracts: print(f"Contract: {contract.name}") for function in contract.functions: print(f" Function: {function.name}") # Run all detectors from slither.detectors import all_detectors results = slither.run_detectors(all_detectors) for detector_result in results: print(detector_result)
slither --version
Debug
Known issues
breakingPython 3.10 or higher is required as of version 0.11.5. Older Python versions (3.8, 3.9) are no longer supported.
fix
Upgrade to Python 3.10+ or pin slither-analyzer<0.11.5.
affects: >=0.11.5
breakingIn version 0.11.0, the Contract class properties for variables and the *Calls API were refactored. Code accessing contract.variables or contract.functions may break.
fix
Use contract.variables_as_dict() or contract.functions_as_dict() for dictionary access. Refer to the changelog for details.
affects: >=0.11.0
gotchaSlither requires a Solidity compiler (solc) installed. If solc is not in PATH, analysis fails. Use solc-select to manage versions.
fix
Install solc-select and set the desired version: pip install solc-select && solc-select install 0.8.20 && solc-select use 0.8.20
affects: all
deprecatedThe detector 'similar-names' was removed in version 0.10.3.
fix
Remove --detect similar-names from your command line.
affects: >=0.10.3
gotchaWhen using slither in a script, you must call slither.run_detectors() explicitly; just creating a Slither object does not run detectors.
fix
Call slither.run_detectors() with the list of detectors you wish to execute.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'crytic_compile'
crytic-compile is an optional dependency but required for compilation. It is not installed automatically in all environments.
fix
pip install crytic-compile
slither: error: unrecognized arguments: --detect similar-names
The 'similar-names' detector was removed in slither 0.10.3.
fix
Remove --detect similar-names from your command. Use a different detector or update your scripts.
Exception: Solc is not in PATH. Is Solidity installed?
Slither cannot find the solc binary. It is required to compile contracts.
fix
Install solc (e.g., via solc-select: pip install solc-select && solc-select install 0.8.20 && solc-select use 0.8.20) or ensure solc is in your PATH.
Upgrade
Version history
0.11.5latest on PyPI · released Jan 16, 2026
Audit
Dependencies
solc-selectoptionalManaging multiple Solidity compiler versions
crytic-compilerequiredUnderlying compilation infrastructure for Solidity and Vyper
Agent activity
4 hits · last 30 days
node
4
Resources
slither-analyzer — pip install slither-analyzer · libregistry