Saute onions and slit green chilies for 3 mins or until the onions turn slightly pink. Set aside to cool.
If using curry leaves fry them until crisp.
Fry the peanuts on a medium heat until golden. Switch off the stove. Add cumin and garlic to the hot pan and saute for 1 to 2 mins. Cool all these as well.
Blend them together with salt and water as needed. If using fried gram and tamarind paste you can just add it to the jar now.
Serve peanut onion chutney with dosa, idli and uthappam.