In a medium frying pan, heat the olive oil and add the onions. Cook until they have softened and are turning translucent, about 5 minutes.
Add the garlic, chili powder, and cumin. Cook for another minute until fragrant. Add the beans and the water. Stir, cover, and cook for 5 minutes.
Reduce the heat to low and remove the lid from the pan. Mash the beans with a potato masher or the back of a fork until you reach your desired consistency. Cook the beans for 4 more minutes.
Remove the pan from the heat and stir in the cilantro and lime juice. Season with the sea salt and add a splash of water if the beans seem too dry. Your refried beans are ready to serve!