The ability to perform precise, spatially localized actuation and measurements of electrical activity in the heart is crucial in understanding cardiac electrophysiology and devising new therapeutic solutions for control of cardiac arrhythmias. Current cardiac imaging techniques (i.e. optical mapping) employ voltage- or calcium-sensitive fluorescent dyes to visualize the electrical signal propagation through cardiac syncytium in vitro or in situ with very high-spatiotemporal resolution. The extension of optogenetics into the cardiac field, where cardiac tissue is genetically altered to express light-sensitive ion channels allowing electrical activity to be elicited or suppressed in a precise cell-specific way, has opened the possibility for all-optical interrogation of cardiac electrophysiology. In vivo application of cardiac optogenetics faces multiple challenges and necessitates suitable optical systems employing fiber optics to actuate and sense electrical signals. In this technical perspective, we present a compendium of clinically relevant access routes to different parts of the cardiac electrical conduction system based on currently employed catheter imaging systems and determine the quantitative size constraints for endoscopic cardiac optogenetics. We discuss the relevant technical advancements in microendoscopy, cardiac imaging, and optogenetics and outline the strategies for combining them to create a portable, miniaturized fiber-based system for all-optical interrogation of cardiac electrophysiology in vivo.