You can find the script for running PyCharm in the installation directory under bin. To use this script as the command-line launcher, add it to your system PATH as described in Command-line interface.
Syntax
pycharm.sh format [<options>] <path...>
Examples
Format two specific files from the ~/Data/src directory using the default code style settings:
$
pycharm.sh format ~/Data/src/hello.html ~/Data/src/world.html
Recursively format all files in the ~/Data/src directory including all subdirectories using the default code style settings:
$
pycharm.sh format -r ~/Data/src
Non-recursively format all the .xml and .html files in the ~/Data/src directory using code style settings from ~/Data/settings.xml:
$
pycharm.sh format -s ~/Data/settings.xml -m *.xml,*.html ~/Data/src