Lektor comes with a handy
lektor command line executable you can use from
your terminal to manage all of Lektor in addition to the GUI. If you do
not have the Lektor command available because you only installed the GUI,
have a look at Installation Documentation to see
how to remedy this.
All the commands documented here show up as subcommands to the global
lektor command. So to invoke
build you would write
There are some general options that can be set on the
to change the behavior.
--project PATH: explicitly provide the path to the project to work on. If this is not provided then the project is searched upwards from the current working directory until a folder is found with a single
.lektorprojectfile in it.
--version: if this is passed it prints out the version of Lektor and aborts further execution.
--help: prints out help about the command line interface.
There are a few environment variables which control how Lektor executes:
This can be used alternatively to
--projectto set the path to a project that Lektor should be using. If neither this variable nor
--projectis set, Lektor will look for a project upwards from the current working directory.
Overrides the default output path with a different path. By default the output path will be a path unique to the project but in a default cache folder under Lektor's control.
--output-pathon some commands overrides this value.
Launch a local server.