Wash and soak rice for at least 20 to 30 mins. Drain it completely in a colander
Heat ghee or oil in a pressure cooker or a pot.
Saute spices until they begin to sizzle. Roast cumin on a low flame until they get roasted well.
Add sliced onions and green chili. Fry until they turn golden.
Add drained rice and roast for 2 to 3 mins.
Pour 2.5 cups water and add salt.
Bring it to a boil and cook. Cover the pressure cooker with a lid. Cook on a high heat for 1 whistle. For cooking in pot, cook on a medium heat until the water is absorbed. when the rice is still soggy, cover and cook until done.