We present the generic, object-oriented C++ implementation of the completeness-optimization approach (Manninen and Vaara, J. Comput. Chem. 2006, 27, 434) in the freely available ERKALE program, and recommend the addition of basis set stability scans to the completeness-optimization procedure. The design of the algorithms is independent of the studied property, the used level of theory, as well as of the role of the optimized basis set: the procedure can be used to form auxiliary basis sets in a similar fashion. This implementation can easily be interfaced with various computer programs for the actual calculation of molecular properties for the optimization, and the calculations can be trivially parallelized. Routines for general and segmented contraction of the generated basis sets are also included. The algorithms are demonstrated for two properties of the argon atom--the total energy and the nuclear magnetic shielding constant--and they will be used in upcoming work for generation of cost-efficient basis sets for various properties.