From composer

This tool can be installed with Composer.

Add the package as a dependency of your project

composer require --dev vincentlanglet/twig-cs-fixer

Then, use it!

vendor/bin/twig-cs-fixer lint /path/to/code
vendor/bin/twig-cs-fixer fix /path/to/code

As a PHAR

You can always fetch the stable version as a Phar archive through the following link with the VERSION you're looking for:

wget -c https://github.com/VincentLanglet/Twig-CS-Fixer/releases/download/VERSION/twig-cs-fixer.phar

The PHAR files are signed with a public key which can be queried at keys.openpgp.org with the id AC0E7FD8858D80003AA88FF8DEBB71EDE9601234.