Optogenetic technologies have transformed our ability to precisely control biological processes in time and space. Yet, current eukaryotic optogenetic systems are limited by large or complex optogenetic modules, long illumination times, low tissue penetration or slow activation and deactivation kinetics. Here, we report a red/far-red light-mediated and miniaturized Δphytochrome A (ΔPhyA)-based photoswitch (REDMAP) system based on the plant photoreceptor PhyA, which rapidly binds the shuttle protein far-red elongated hypocotyl 1 (FHY1) under illumination with 660-nm light with dissociation occurring at 730 nm. We demonstrate multiple applications of REDMAP, including dynamic on/off control of the endogenous Ras/Erk mitogen-activated protein kinase (MAPK) cascade and control of epigenetic remodeling using a REDMAP-mediated CRISPR–nuclease-deactivated Cas9 (CRISPR–dCas9) (REDMAPcas) system in mice. We also demonstrate the utility of REDMAP tools for in vivo applications by activating the expression of transgenes delivered by adeno-associated viruses (AAVs) or incorporated into cells in microcapsules implanted into mice, rats and rabbits illuminated by light-emitting diodes (LEDs). Further, we controlled glucose homeostasis in type 1 diabetic (T1D) mice and rats using REDMAP to trigger insulin expression. REDMAP is a compact and sensitive tool for the precise spatiotemporal control of biological activities in animals with applications in basic biology and potentially therapy. © 2021, The Author(s), under exclusive licence to Springer Nature America, Inc.