In addition to having a graphical user interface to make paintings, the Krita executable is also a command line tool. If you aren’t familiar with command line tools, it is a way to automate common functions. Programmers like these tools since they can create scripts that automate common tasks. This area in Krita is very limited, so there aren’t many functions you can do.
The command line tool can be a helpful way to automate exporting files.
To start using the command line tool, you can add the Krita executable directory to your environmental variables. I added the following value to my PATH variable in Windows: C:\Program Files\Krita (x64)\bin
Once you add the Krita executable path to your environmental variable, you can open up the command prompt and type krita --help. You will get a list of options that are available as shown in the image above.
For a quick example, we are going to open a KRA file and print it. To start, I navigated to the folder that has my KRA files. Open the sphere.kra file, then print it (this will open up the GUI).
krita --print sphere.kra
Commands do not give a response if an error happens. If you enjoy working with Krita and would like to expand the command line tool, you can check out the source code. The source code is mostly in the Krita > main.cc and source > calligra > krita > ui folders.