There are many compact-size generators on our list that you can use for charging phones and running fans in a tent.
If your camping generator runs on fuel, it can emit carbon monoxide that may be hazardous to your health if used in a poorly ventilated area. These should ideally be used at least 20 feet away from your tent.