Bacterial microcompartments (BMCs) are organelles composed of a selectively permeable protein shell that encapsulates enzymes involved in CO2 fixation (carboxysomes) or carbon catabolism (metabolosomes). Confinement of sequential reactions by the BMC shell presumably increases the efficiency of the pathway by reducing the crosstalk of metabolites, release of toxic intermediates, and accumulation of inhibitory products. Because BMCs are composed entirely of protein and self-assemble, they are an emerging platform for engineering nanoreactors and molecular scaffolds. However, testing designs for assembly and function through in vivo expression is labor-intensive and has limited the potential of BMCs in bioengineering. Here, we developed a new method for in vitro assembly of defined nanoscale BMC architectures: shells and nanotubes. By inserting a "protecting group", a short ubiquitin-like modifier (SUMO) domain, self-assembly of shell proteins in vivo was thwarted, enabling preparation of concentrates of shell building blocks. Addition of the cognate protease removes the SUMO domain and subsequent mixing of the constituent shell proteins in vitro results in the self-assembly of three types of supramolecular architectures: a metabolosome shell, a carboxysome shell, and a BMC protein-based nanotube. We next applied our method to generate a metabolosome shell engineered with a hyper-basic luminal surface, allowing for the encapsulation of biotic or abiotic cargos functionalized with an acidic accessory group. This is the first demonstration of using charge complementarity to encapsulate diverse cargos in BMC shells. Collectively, our work provides a generally applicable method for in vitro assembly of natural and engineered BMC-based architectures.