What is called the “BRST complex” in physics literture is the qDGCA which is the Chevalley-Eilenberg algebra of the -algebroid which is the differential version in Lie theory if the -groupoid
whose space of objects is the space of configurations/histories of a given physical system;
whose morphisms describe the gauge transformations between these configurations/histories;
whose -morphisms descrive the -fold gauge-of-gauge transformations.
The generators of the BRST complex are called
in degree 0: fields;
in degree 1: ghosts;
in degree 2: ghosts of ghosts;
etc.
In as far as the BRST complex can be regarded as being the algebra of functions on an -algebroid, the theory of integration over this -algebroid is given by the BV formalism.