| Optogenetics and chemogenetics comprise a wide variety of applications in which genetically encoded actuators and indicators are used to modulate and monitor activity with high cellular specificity. Over the past 10 years, development of these genetically encoded tools has contributed tremendously to our understanding of integrated physiology. In concert with the continued refinement of probes, strategies to target transgene expression to specific cell types have also made much progress in the past 20 years. In addition, the successful implementation of optogenetic and chemogenetic techniques thrives thanks to ongoing advances in live imaging microscopy and optical technology. Although innovation of optogenetic and chemogenetic methods has been primarily driven by researchers studying the central nervous system, these techniques also hold great promise to boost research in neurogastroenterology. In this Review, we describe the different classes of tools that are currently available and give an overview of the strategies to target them to specific cell types in the gut wall. We discuss the possibilities and limitations of optogenetic and chemogenetic technology in the gut and provide an overview of their current use, with a focus on the enteric nervous system. Furthermore, we suggest some experiments that can advance our understanding of how the intrinsic and extrinsic neural networks of the gut control gastrointestinal function.