Once you've set up your config file, you can run Psalm from your project's root directory with
and Psalm will scan all files in the project referenced by
If you want to run on specific files, use
./vendor/bin/psalm file1.php [file2.php...]
--help to see a list of options that Psalm supports.
Psalm currently offers some GitHub integration with public projects.
--shepherd to send information about your build to https://shepherd.dev.
Currently, Shepherd tracks type coverage (the percentage of types Psalm can infer) on
Running Psalm faster
Psalm has a couple of command-line options that will result in faster builds:
--threads=[n]to run Psalm’s analysis in a number of threads
--diffwhich only checks files you’ve updated (and their dependents).
--diff-methodswhich remembers Psalm’s output when scanning particular methods.
Running them together (e.g.
--threads=8 --diff --diff-methods) will result in the fastest possible Psalm run.