  Active matter constantly dissipates energy to power the self-propulsion of
its microscopic constituents. This opens the door to designing innovative
cyclic engines without any equilibrium equivalent. We offer a consistent
thermodynamic framework to characterize and optimize the performances of such
cycles. Based on a minimal model, we put forward a protocol which extracts work
by controlling only the properties of the confining walls at boundaries, and we
rationalize the transitions between optimal cycles. We show that the
corresponding power and efficiency are generally proportional, so that they
reach their maximum values at same cycle time in contrast with thermal cycles,
and we provide a generic relation constraining the fluctuations of the power.
