Invoking Xnt from the command line is very simple and very similar to how other build tools are invoked (this was intentional).
The most simplistic use of Xnt is as follows:
$ xnt
This will attempt to invoke the default target in the current directory’s build.py.
To invoke a particular target, use:
$ xnt {target}
Where the value of {target} is dependent on your particular build.py file.
Xnt now supports executing multiple targets in one go. That is, if you want to chain targets together, you now can without separate executions of Xnt. For example:
$ xnt {target1} {target2} ... {targetN}
Will execute target1 through targetN in order of listing.
Xnt has a number of other commands that can be invoked besides those defined in the current directory’s build.py file. One will need a build file to run. The others, however, do not.
Usage:
$ xnt --help
Usage:
$ xnt --list-targets
Usage:
$ xnt --version
Xnt also has a few “options” that may be provided along with a regular targets.
Usage:
$ xnt [options] [target]
Where options can be any and all of the following (unless otherwise specified):
Xnt now has the ability to accept command line parameters and forward them to your build.py file. This can be useful for a number of reasons: flipping debug flags, deployment flags and the like or whatever else you can imagine.
The general semantic for passing the parameters is as follows:
$ xnt [-D{name}={value}]+ [options] [target]
Notice: the -D is used to distinguish values to be passed to the build file from regular options. You may specify as many parameters as you like and there is no other real ordering required to be parsed correctly. Just know, spaces are used to delimit arguments; if your passed value must have a space, remember to quote it.
Please see Build Properties to see how this works on the build.py side.