Prepare a water bath canner, jars, and lids, and keep the jars hot until you fill them.
Core the green tomatoes, dice them, and measure the diced tomatoes into a large stainless pot.
Dice the onions and peppers, chop the garlic fine, and add them to the pot.
Add the vinegar, lime juice, cumin, oregano, salt, hot pepper flakes, and cilantro if you are using it.
Bring to a boil over medium high heat, stirring constantly so the mixture does not scorch.
Reduce the heat, cover the pot, and simmer gently for 20 minutes, until the tomatoes have completely fallen apart.
Blend the sauce smooth with an immersion blender, then bring it back to a boil. Do not skip the blending, since green tomatoes do not break down on their own.
Ladle the hot sauce into hot jars, leaving 1/2 inch headspace. Remove air bubbles, adjust the headspace, and wipe the rims clean.
Center the lids on the jars and screw the bands down to fingertip tight.
Process half pints and pints in a boiling water bath canner for 15 minutes, adjusting for altitude (see notes).
Turn off the heat, remove the canner lid, and wait 5 minutes before lifting the jars out onto a towel.
Cool 12 to 24 hours, check the seals, take the bands off, and store in a cool, dark place.