Appendix C. The Command Line

Unlike most vector editors, but like the majority of open source software, Inkscape has a powerful command-line interface. It allows you to perform many tasks (exporting, document modifications, queries, and so on) from scripts or from a console, without using Inkscape’s graphical user interface (GUI).

In most cases, ordering Inkscape to perform some task with command-line parameters does not load the GUI at all; after completing the task, Inkscape simply quits. This makes it run faster and consume less memory, since no time and memory are wasted on creating and destroying the GUI.

Note

Microsoft Windows treats command-line programs as second-class citizens compared to the “normal” (GUI) applications. You cannot create a single program which can run both as a GUI application and as a command-line application, so the developers of Inkscape on Windows had to make a choice. Naturally, they chose to position Inkscape as a GUI application, which inevitably damaged its command-line functionality.

More specifically, while Inkscape on Windows takes command-line parameters and acts on them, it cannot output anything to the command prompt window (which makes the query parameters totally unusable). Also, it returns control to the command interpreter immediately, even though the action you have ordered (such as export) may not finish for several more seconds. This makes it nearly impossible to use Inkscape in sequential scripts. One more minor inconvenience is that you must always supply full paths for all files you specify on the command line.

It is possible to recompile Inkscape as a Windows command-line application, which in turn will make it less usable as a GUI application (a separate command prompt window will open every time you run such Inkscape). Consult the Inkscape FAQ on the website if you need to obtain such a command-line version of the program.