In a cooker, heat oil or ghee. Add cumin seeds and let it splutter. Add sliced onion, garlic, and green chilies.