This invention relates to the in vitro production of cyclic peptides using cyanobacterial enzymes, such as patellamide biosynthesis enzymes. Linear peptide substrates are cyclized using an isolated cyanbacterial macrocyclase, such as PatG from Prochloron spp. Before cyclization, residues in the linear peptide substrates may be heterocyclized using isolated cyanbacterial heterocyclasses, such as PatD or TruD heterocyclase. Methods of the invention may be useful, for example, for the production of cyclic peptidyl molecules, including cyclotides, such as katalas, and cyanobactins, such as patellamides and telomestatins, for example for use in the development of therapeutics.